Adding hashtag model
This commit is contained in:
parent
6471a548fe
commit
62292797ec
11 changed files with 60 additions and 9 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue