You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update backend service (Phase 1)
Update service to write to both environment_namespace and environment_id columns. Read primarily from environment_id, falling back to environment_namespace if environment_id is NULL. This ensures compatibility with both old and new data.
Backfill any missing data
If any data was written during the deployment of the updated service:
UPDATE`table_name`SET`environment_id`=`environment_namespace`WHERE`environment_id` IS NULL;
Make new column NOT NULL
After verifying all data is populated:
ALTERTABLE`table_name` MODIFY COLUMN `environment_id`varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL;
Update backend service (Phase 2)
Update service to only write to and read from environment_id. Remove all references to environment_namespace.
The text was updated successfully, but these errors were encountered:
As part of the Organization feature, we must migrate to
environment_id
soon to avoid future bugs and conflicts.We will replace the
environment_namespace
column with theenvironment_id
column for all tables; this PR will first add theenvironment_id
column.Here is the migration process:
Add a new column
Add the environment_id column to all relevant tables, allowing NULL initially
Populate a new column
Populate the new environment_id column with data from environment_namespace:
Update backend service (Phase 1)
Update service to write to both
environment_namespace
andenvironment_id
columns. Read primarily fromenvironment_id
, falling back toenvironment_namespace
ifenvironment_id
is NULL. This ensures compatibility with both old and new data.Backfill any missing data
If any data was written during the deployment of the updated service:
Make new column NOT NULL
After verifying all data is populated:
Update backend service (Phase 2)
Update service to only write to and read from environment_id. Remove all references to environment_namespace.
The text was updated successfully, but these errors were encountered: