about summary refs log tree commit diff
path: root/db/migrate/20171114231651_create_lists.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20171114231651_create_lists.rb')
-rw-r--r--db/migrate/20171114231651_create_lists.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20171114231651_create_lists.rb b/db/migrate/20171114231651_create_lists.rb
new file mode 100644
index 000000000..21285e901
--- /dev/null
+++ b/db/migrate/20171114231651_create_lists.rb
@@ -0,0 +1,10 @@
+class CreateLists < ActiveRecord::Migration[5.1]
+  def change
+    create_table :lists do |t|
+      t.references :account, foreign_key: { on_delete: :cascade }
+      t.string :title, null: false, default: ''
+
+      t.timestamps
+    end
+  end
+end