This commit is contained in:
dieriba
2025-10-24 16:38:42 +02:00
parent 3aee427068
commit 7b2aa2c7d8
3 changed files with 35 additions and 7 deletions
+32 -4
View File
@@ -330,10 +330,7 @@ async fn migrate_metadata_tables(
"deployment_metadata",
"draft",
"favorite",
"flow_version",
"workspace_runnable_dependencies",
"asset",
"flow_node",
"folder",
"input",
"raw_app",
@@ -350,7 +347,14 @@ async fn migrate_metadata_tables(
for table in non_auth_tables {
sqlx::query(&format!(
"UPDATE {} SET workspace_id = $1 WHERE workspace_id = $2",
r#"
UPDATE
{}
SET
workspace_id = $1
WHERE
workspace_id = $2
"#,
table
))
.bind(target)
@@ -374,6 +378,30 @@ async fn migrate_metadata_tables(
.execute(&mut **tx)
.await?;
sqlx::query!(
"UPDATE flow_version SET workspace_id = $1 WHERE workspace_id = $2",
target,
source
)
.execute(&mut **tx)
.await?;
sqlx::query!(
"UPDATE flow_node SET workspace_id = $1 WHERE workspace_id = $2",
target,
source
)
.execute(&mut **tx)
.await?;
sqlx::query!(
"UPDATE workspace_runnable_dependencies SET workspace_id = $1 WHERE workspace_id = $2",
target,
source
)
.execute(&mut **tx)
.await?;
sqlx::query!(
"INSERT INTO group_ SELECT $1, name, summary, extra_perms FROM group_ WHERE workspace_id = $2",
target,
@@ -274,7 +274,7 @@
<Modal
bind:open
title={jobMigrationComplete
? '🎉 Migration Complete'
? 'Migration Complete'
: migratingJobs
? 'Step 2: Migrating Jobs'
: 'Change Workspace ID'}
@@ -383,7 +383,7 @@
</div>
<div class="flex items-center gap-3">
<div class="w-4 h-4 rounded-full bg-gray-300 dark:bg-gray-600"></div>
<span class="text-sm text-gray-500">Step 2: Job migration (ready)</span>
<span class="text-sm text-gray-500">Step 2: Job migration</span>
</div>
</div>
</div>
+1 -1
View File
@@ -39,5 +39,5 @@
"smtpReport": "hub/9086/smtp",
"cloneRepoToS3forGitRepoViewer_0": "hub/19825/clone_repo_and_upload_to_instance_storage",
"cloneRepoToS3forGitRepoViewer": "hub/19827/clone_repo_and_upload_to_instance_storage",
"workspaceMigrator": "hub/28066/workspace_job_migrator"
"workspaceMigrator": "hub/28067/workspace_job_migrator"
}