about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-04 19:12:59 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-04 19:12:59 +0100
commit62292797eccc5bcf47abae9f4daaa2c186660644 (patch)
treefb324996024317abc9605015845f7467508d5d73 /db/migrate
parent6471a548feadf34d65fb96660f958bf808331c8f (diff)
Adding hashtag model
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20161104173623_create_tags.rb11
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