mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-23 05:16:38 +00:00
Clear the associations first
This commit is contained in:
@@ -271,6 +271,11 @@ export default async function migration() {
|
|||||||
const insertClientSiteResource = db.prepare(
|
const insertClientSiteResource = db.prepare(
|
||||||
`INSERT INTO 'clientSiteResources' ('clientId', 'siteResourceId') VALUES (?, ?)`
|
`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(
|
const insertClientSiteResourceAssocCache = db.prepare(
|
||||||
`INSERT INTO 'clientSiteResourcesAssociationsCache' ('clientId', 'siteResourceId') VALUES (?, ?)`
|
`INSERT INTO 'clientSiteResourcesAssociationsCache' ('clientId', 'siteResourceId') VALUES (?, ?)`
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user