mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-29 06:10:47 +00:00
Clear the associations first
This commit is contained in:
@@ -271,6 +271,11 @@ export default async function migration() {
|
||||
const insertClientSiteResource = db.prepare(
|
||||
`INSERT INTO 'clientSiteResources' ('clientId', 'siteResourceId') VALUES (?, ?)`
|
||||
);
|
||||
|
||||
// clear the clientSiteResourcesAssociationsCache and clientSitesAssociationsCache tables to prepare for repopulation
|
||||
db.prepare(`DELETE FROM 'clientSiteResourcesAssociationsCache';`).run();
|
||||
db.prepare(`DELETE FROM 'clientSitesAssociationsCache';`).run();
|
||||
|
||||
const insertClientSiteResourceAssocCache = db.prepare(
|
||||
`INSERT INTO 'clientSiteResourcesAssociationsCache' ('clientId', 'siteResourceId') VALUES (?, ?)`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user