about summary refs log tree commit diff
path: root/db/migrate/20170506235850_create_conversations.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20170506235850_create_conversations.rb')
-rw-r--r--db/migrate/20170506235850_create_conversations.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20170506235850_create_conversations.rb b/db/migrate/20170506235850_create_conversations.rb
new file mode 100644
index 000000000..eaf66ded7
--- /dev/null
+++ b/db/migrate/20170506235850_create_conversations.rb
@@ -0,0 +1,10 @@
+class CreateConversations < ActiveRecord::Migration[5.0]
+  def change
+    create_table :conversations, id: :bigserial do |t|
+      t.string :uri, null: true, default: nil
+      t.timestamps
+    end
+
+    add_index :conversations, :uri, unique: true
+  end
+end