about summary refs log tree commit diff
path: root/db/migrate/20180211015820_create_backups.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20180211015820_create_backups.rb')
-rw-r--r--db/migrate/20180211015820_create_backups.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20180211015820_create_backups.rb b/db/migrate/20180211015820_create_backups.rb
new file mode 100644
index 000000000..9725a3e9f
--- /dev/null
+++ b/db/migrate/20180211015820_create_backups.rb
@@ -0,0 +1,11 @@
+class CreateBackups < ActiveRecord::Migration[5.1]
+  def change
+    create_table :backups do |t|
+      t.references :user, foreign_key: { on_delete: :nullify }
+      t.attachment :dump
+      t.boolean :processed, null: false, default: false
+
+      t.timestamps
+    end
+  end
+end