Archive: ComponentOwl Rails app, DB backups, go redirect script
This commit is contained in:
23
db/migrate/20100819135437_create_articles.rb
Normal file
23
db/migrate/20100819135437_create_articles.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class CreateArticles < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :articles do |t|
|
||||
t.string :title, :null => false
|
||||
t.string :slug, :null => false
|
||||
t.text :content, :null => false
|
||||
t.date :date, :null => false
|
||||
t.string :status, :default => 'draft'
|
||||
t.string :keywords
|
||||
t.text :custom_subtemplate
|
||||
t.integer :screenshot_id
|
||||
|
||||
t.timestamps
|
||||
t.datetime :deleted_at
|
||||
end
|
||||
|
||||
add_index(:articles, :slug, :unique => true)
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :articles
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user