Files
grecia/db/migrate/20170807082243_create_topics.rb
2017-09-05 12:52:14 +02:00

14 lines
359 B
Ruby

class CreateTopics < ActiveRecord::Migration
def change
create_table :topics do |t|
t.string :title, null: false
t.text :description
t.integer :author_id
t.integer "comments_count", default: 0
t.references :community, index: true
t.datetime :hidden_at, index: true
t.timestamps null: false
end
end
end