From 8bd78d7764d483d2285a952d227bc0b4b2f4cfcd Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 25 Jan 2023 20:03:00 -0800 Subject: [PATCH] Add version field --- app/blueprints/api/v1/update_blueprint.rb | 2 +- db/migrate/20230126040207_add_version_to_app_updates.rb | 5 +++++ db/schema.rb | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20230126040207_add_version_to_app_updates.rb diff --git a/app/blueprints/api/v1/update_blueprint.rb b/app/blueprints/api/v1/update_blueprint.rb index 7a2af46..d8c831c 100644 --- a/app/blueprints/api/v1/update_blueprint.rb +++ b/app/blueprints/api/v1/update_blueprint.rb @@ -3,7 +3,7 @@ module Api module V1 class UpdateBlueprint < Blueprinter::Base - fields :update_type, :updated_at + fields :version, :update_type, :updated_at end end end diff --git a/db/migrate/20230126040207_add_version_to_app_updates.rb b/db/migrate/20230126040207_add_version_to_app_updates.rb new file mode 100644 index 0000000..b734840 --- /dev/null +++ b/db/migrate/20230126040207_add_version_to_app_updates.rb @@ -0,0 +1,5 @@ +class AddVersionToAppUpdates < ActiveRecord::Migration[7.0] + def change + add_column :app_updates, :version, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index c90e6a4..fc58d23 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[7.0].define(version: 2023_01_26_030358) do +ActiveRecord::Schema[7.0].define(version: 2023_01_26_040207) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" enable_extension "pg_trgm" @@ -19,6 +19,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_26_030358) do create_table "app_updates", primary_key: "updated_at", id: :datetime, force: :cascade do |t| t.string "update_type", null: false + t.string "version" end create_table "characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|