Skip to content
Snippets Groups Projects
Unverified Commit 6b3dc8e8 authored by adam-james's avatar adam-james Committed by GitHub
Browse files

Fix Wrong Migration IDs for User Parameter Values Migration (#45120)

Per discussion in Slack, I made a mistake with the migration IDs as I wanted to backport to 50 but used 51 IDs.
This PR uses 50 IDs and places the migrations in the correct place.

Not sure if it's mergable in this state because Stats has run with the PR containing the incorrect migration IDs.
parent 9fc1a210
No related branches found
No related tags found
No related merge requests found
......@@ -7926,6 +7926,55 @@ databaseChangeLog:
- sql: "DELETE FROM ${databasechangelog.name} WHERE id = 'v50.2024-04-12T12:33:09'"
rollback: # nothing to do here
- changeSet:
id: v50.2024-07-02T16:48:21
author: adam-james
comment: Remove existing user_parameter_value entries as we want to add dashboard_id, and can't easily backfill
rollback: # none, entries already removed and are non-critical to app functionality
changes:
- delete:
tableName: user_parameter_value
- changeSet:
id: v50.2024-07-02T16:49:29
author: adam-james
comment: Add dashboard_id column to user_parameter_value to keep values unique per dashboard
changes:
- addColumn:
columns:
- column:
name: dashboard_id
type: int
remarks: The ID of the dashboard
tableName: user_parameter_value
- changeSet:
id: v50.2024-07-02T16:55:42
author: adam-james
comment: Add fk constraint to user_parameter_value.dashboard_id
changes:
- addForeignKeyConstraint:
baseTableName: user_parameter_value
baseColumnNames: dashboard_id
referencedTableName: report_dashboard
referencedColumnNames: id
constraintName: fk_user_parameter_value_dashboard_id
nullable: false
deleteCascade: true
- changeSet:
id: v50.2024-07-02T17:07:15
author: adam-james
comment: Index user_parameter_value.dashboard_id
rollback: # not necessary, will be removed with the table
changes:
- createIndex:
tableName: user_parameter_value
indexName: idx_user_parameter_value_dashboard_id
columns:
column:
name: dashboard_id
- changeSet:
id: v51.2024-05-13T15:30:57
author: metamben
......@@ -8010,55 +8059,6 @@ databaseChangeLog:
tableName: login_history
indexName: idx_user_id_device_id
- changeSet:
id: v51.2024-07-02T16:48:21
author: adam-james
comment: Remove existing user_parameter_value entries as we want to add dashboard_id, and can't easily backfill
rollback: # none, entries already removed and are non-critical to app functionality
changes:
- delete:
tableName: user_parameter_value
- changeSet:
id: v51.2024-07-02T16:49:29
author: adam-james
comment: Add dashboard_id column to user_parameter_value to keep values unique per dashboard
changes:
- addColumn:
columns:
- column:
name: dashboard_id
type: int
remarks: The ID of the dashboard
tableName: user_parameter_value
- changeSet:
id: v51.2024-07-02T16:55:42
author: adam-james
comment: Add fk constraint to user_parameter_value.dashboard_id
changes:
- addForeignKeyConstraint:
baseTableName: user_parameter_value
baseColumnNames: dashboard_id
referencedTableName: report_dashboard
referencedColumnNames: id
constraintName: fk_user_parameter_value_dashboard_id
nullable: false
deleteCascade: true
- changeSet:
id: v51.2024-07-02T17:07:15
author: adam-james
comment: Index user_parameter_value.dashboard_id
rollback: # not necessary, will be removed with the table
changes:
- createIndex:
tableName: user_parameter_value
indexName: idx_user_parameter_value_dashboard_id
columns:
column:
name: dashboard_id
# >>>>>>>>>> DO NOT ADD NEW MIGRATIONS BELOW THIS LINE! ADD THEM ABOVE <<<<<<<<<<
########################################################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment