Adding hashtag model
This commit is contained in:
11
db/migrate/20161104173623_create_tags.rb
Normal file
11
db/migrate/20161104173623_create_tags.rb
Normal file
@ -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
|
||||
Reference in New Issue
Block a user