aboutsummaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-01 20:42:03 +0100
committerChristopher Baines <mail@cbaines.net>2018-06-01 20:42:03 +0100
commitf98bdb86d09f803495c9c203c350a7f06d96a8de (patch)
treefef67e02a174a15b0795b3737a2667c9eb6e2206 /db/migrate
parent3fa08e707fbc7899c0964bef4b501e137991d838 (diff)
downloadgovuk-mini-environment-admin-f98bdb86d09f803495c9c203c350a7f06d96a8de.tar
govuk-mini-environment-admin-f98bdb86d09f803495c9c203c350a7f06d96a8de.tar.gz
Add an optional DataSnapshot to the MiniEnvironment model
To store if a DataSnapshot is being used.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180601182655_add_data_snapshot_to_mini_environment.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20180601182655_add_data_snapshot_to_mini_environment.rb b/db/migrate/20180601182655_add_data_snapshot_to_mini_environment.rb
new file mode 100644
index 0000000..8c12cf0
--- /dev/null
+++ b/db/migrate/20180601182655_add_data_snapshot_to_mini_environment.rb
@@ -0,0 +1,9 @@
+class AddDataSnapshotToMiniEnvironment < ActiveRecord::Migration[5.1]
+ def change
+ add_reference(
+ :mini_environments,
+ :data_snapshot,
+ foreign_key: { to_table: :govuk_guix_data_snapshots }
+ )
+ end
+end