Merge branch 'main' into jack/saved-views-empty-state
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user