Merge branch 'main' into jack/saved-views-empty-state

This commit is contained in:
Jack
2025-08-06 20:12:28 +01:00
committed by GitHub
2 changed files with 24 additions and 1 deletions
@@ -0,0 +1,21 @@
import type { Knex } from 'knex'
const TABLE_NAME = 'acc_sync_items'
export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable(TABLE_NAME, (table) => {
table.dropForeign('automationId')
})
}
export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable(TABLE_NAME, (table) => {
// Note: This will fail if any sync items have been created with `automationId` values that violate the constraint.
// Handle those before running this migration.
table
.foreign('automationId')
.references('id')
.inTable('automations')
.onDelete('cascade')
})
}
@@ -257,7 +257,7 @@ export const startQueue = async () => {
// Wait for replication from regional db
await waitForRegionProjectFactory({
getProject: getProjectFactory({ db }),
deleteProject: deleteProjectFactory({ db })
deleteProject: deleteProjectFactory({ db: targetDb })
})({
projectId: project.id,
regionKey,
@@ -279,6 +279,8 @@ export const startQueue = async () => {
}))
})
}
return
}
case 'delete-project-region-data':
default: