aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-03-26 22:09:43 +0100
committerChristopher Baines <mail@cbaines.net>2018-04-03 21:57:39 +0100
commit9649f88d2857e686c59867031aaad228cc4358fa (patch)
tree5486c3ea0a15c4459337d725eb8a4fa63e34e3bc /db
parent4f4fd0694024cbf9051ea1ab88abeadb69dcd1a6 (diff)
downloadgovuk-mini-environment-admin-9649f88d2857e686c59867031aaad228cc4358fa.tar
govuk-mini-environment-admin-9649f88d2857e686c59867031aaad228cc4358fa.tar.gz
Add a new signon_users field to MiniEnvironment
To store the data regarding the Signon users seeded in the database. Store this as JSON, rather than data in different tables to simplify the schema, as I don't expect it to change at all once the MiniEnvironment is created.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180326201857_add_signon_users_to_mini_environment.rb5
-rw-r--r--db/schema.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20180326201857_add_signon_users_to_mini_environment.rb b/db/migrate/20180326201857_add_signon_users_to_mini_environment.rb
new file mode 100644
index 0000000..b78e3c9
--- /dev/null
+++ b/db/migrate/20180326201857_add_signon_users_to_mini_environment.rb
@@ -0,0 +1,5 @@
+class AddSignonUsersToMiniEnvironment < ActiveRecord::Migration[5.1]
+ def change
+ add_column :mini_environments, :signon_users, :jsonb
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 59427c0..5c53432 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20180311125615) do
+ActiveRecord::Schema.define(version: 20180326201857) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -38,6 +38,7 @@ ActiveRecord::Schema.define(version: 20180311125615) do
t.string "backend_type"
t.bigint "backend_id"
t.jsonb "backend_data"
+ t.jsonb "signon_users"
t.index ["backend_type", "backend_id"], name: "index_mini_environments_on_backend_type_and_backend_id"
t.index ["govuk_guix_revision_id"], name: "index_mini_environments_on_govuk_guix_revision_id"
end