diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20161104173623_create_tags.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20161104173623_create_tags.rb b/db/migrate/20161104173623_create_tags.rb new file mode 100644 index 000000000..d6831ff8f --- /dev/null +++ b/db/migrate/20161104173623_create_tags.rb @@ -0,0 +1,11 @@ +class CreateTags < ActiveRecord::Migration[5.0] + def change + create_table :tags do |t| + t.string :name, null: false, default: '' + + t.timestamps + end + + add_index :tags, :name, unique: true + end +end |