docbrown/db/migrate/20151224175814_create_articles.rb
2018-02-28 16:11:08 -05:00

14 lines
300 B
Ruby

class CreateArticles < ActiveRecord::Migration
def change
create_table :articles do |t|
t.integer :author_id
t.string :title
t.text :body_html
t.text :intro_html
t.text :slug
t.timestamps null: false
end
add_index("articles", "author_id")
end
end