about summary refs log tree commit diff
path: root/db/migrate/20200731064236_create_account_metadata.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200731064236_create_account_metadata.rb')
-rw-r--r--db/migrate/20200731064236_create_account_metadata.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20200731064236_create_account_metadata.rb b/db/migrate/20200731064236_create_account_metadata.rb
new file mode 100644
index 000000000..c2eb32b79
--- /dev/null
+++ b/db/migrate/20200731064236_create_account_metadata.rb
@@ -0,0 +1,10 @@
+class CreateAccountMetadata < ActiveRecord::Migration[5.2]
+  disable_ddl_transaction!
+
+  def change
+    create_table :account_metadata do |t|
+      t.references :account, null: false, unique: true, foreign_key: { on_delete: :cascade }
+      t.jsonb :fields, null: false, default: {}
+    end
+  end
+end