Skip to content

Migration to remove old values after MessagePack #1587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions db/migrate/20250519132450_remove_old_columns.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class RemoveOldColumns < ActiveRecord::Migration[7.1]
def change
remove_column :forecast_storage_orders, :order_old, :text
remove_column :heat_network_orders, :order_old, :text
remove_column :households_space_heating_producer_orders, :order_old, :text
remove_column :hydrogen_demand_orders, :order_old, :text
remove_column :hydrogen_supply_orders, :order_old, :text

remove_column :scenarios, :balanced_values_old, :text, size: :medium
remove_column :scenarios, :metadata_old, :text, size: :medium
remove_column :scenarios, :active_couplings_old, :text, size: :medium
end
end
10 changes: 1 addition & 9 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2025_05_12_070901) do
ActiveRecord::Schema[7.1].define(version: 2025_05_19_132450) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "name", limit: 191, null: false
t.string "record_type", limit: 191, null: false
Expand Down Expand Up @@ -41,14 +41,12 @@

create_table "forecast_storage_orders", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "scenario_id"
t.text "order_old"
t.binary "order", size: :medium
t.index ["scenario_id"], name: "index_forecast_storage_orders_on_scenario_id", unique: true
end

create_table "heat_network_orders", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "scenario_id"
t.text "order_old"
t.string "temperature", default: "mt"
t.binary "order", size: :medium
t.index ["scenario_id", "temperature"], name: "index_heat_network_orders_on_scenario_id_and_temperature", unique: true
Expand All @@ -57,21 +55,18 @@

create_table "households_space_heating_producer_orders", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "scenario_id"
t.text "order_old"
t.binary "order", size: :medium
t.index ["scenario_id"], name: "index_households_space_heating_producer_orders_on_scenario_id", unique: true
end

create_table "hydrogen_demand_orders", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "scenario_id"
t.text "order_old"
t.binary "order", size: :medium
t.index ["scenario_id"], name: "index_hydrogen_demand_orders_on_scenario_id", unique: true
end

create_table "hydrogen_supply_orders", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "scenario_id"
t.text "order_old"
t.binary "order", size: :medium
t.index ["scenario_id"], name: "index_hydrogen_supply_orders_on_scenario_id", unique: true
end
Expand Down Expand Up @@ -125,9 +120,6 @@
t.integer "preset_scenario_id"
t.string "area_code"
t.string "source"
t.text "balanced_values_old", size: :medium
t.text "metadata_old", size: :medium
t.text "active_couplings_old", size: :medium
t.binary "user_values", size: :long
t.binary "balanced_values", size: :medium
t.binary "metadata", size: :medium
Expand Down