From 051c8bf612126fa79699c8bf45a661dde127f4a0 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 16 Mar 2018 08:51:54 +0000 Subject: Add backend controllers, models and views Also annotate existing models. --- db/migrate/20180311125442_add_backend_data_to_mini_environment.rb | 5 +++++ .../20180311125615_remove_start_command_from_mini_environment.rb | 5 +++++ db/schema.rb | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20180311125442_add_backend_data_to_mini_environment.rb create mode 100644 db/migrate/20180311125615_remove_start_command_from_mini_environment.rb (limited to 'db') 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 -- cgit v1.2.3