aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-03-16 08:51:54 +0000
committerChristopher Baines <mail@cbaines.net>2018-03-29 07:55:01 +0100
commit051c8bf612126fa79699c8bf45a661dde127f4a0 (patch)
tree849a3b05b4ab4b59a426761d7cf1da3cc7036349 /db
parenta8c8f68971dd9e20dee01d9f65c64283e41fe4a3 (diff)
downloadgovuk-mini-environment-admin-051c8bf612126fa79699c8bf45a661dde127f4a0.tar
govuk-mini-environment-admin-051c8bf612126fa79699c8bf45a661dde127f4a0.tar.gz
Add backend controllers, models and views
Also annotate existing models.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180311125442_add_backend_data_to_mini_environment.rb5
-rw-r--r--db/migrate/20180311125615_remove_start_command_from_mini_environment.rb5
-rw-r--r--db/schema.rb4
3 files changed, 12 insertions, 2 deletions
diff --git a/db/migrate/20180311125442_add_backend_data_to_mini_environment.rb b/db/migrate/20180311125442_add_backend_data_to_mini_environment.rb
new file mode 100644
index 0000000..57746f8
--- /dev/null
+++ b/db/migrate/20180311125442_add_backend_data_to_mini_environment.rb
@@ -0,0 +1,5 @@
+class AddBackendDataToMiniEnvironment < ActiveRecord::Migration[5.1]
+ def change
+ add_column :mini_environments, :backend_data, :jsonb
+ end
+end
diff --git a/db/migrate/20180311125615_remove_start_command_from_mini_environment.rb b/db/migrate/20180311125615_remove_start_command_from_mini_environment.rb
new file mode 100644
index 0000000..686b7e1
--- /dev/null
+++ b/db/migrate/20180311125615_remove_start_command_from_mini_environment.rb
@@ -0,0 +1,5 @@
+class RemoveStartCommandFromMiniEnvironment < ActiveRecord::Migration[5.1]
+ def change
+ remove_column :mini_environments, :start_command, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e66fa06..59427c0 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: 20180305222157) do
+ActiveRecord::Schema.define(version: 20180311125615) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -35,9 +35,9 @@ ActiveRecord::Schema.define(version: 20180305222157) do
t.datetime "updated_at", null: false
t.jsonb "info"
t.string "govuk_guix_revision_id"
- t.string "start_command"
t.string "backend_type"
t.bigint "backend_id"
+ t.jsonb "backend_data"
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