fix: empty config projects (#4391)

This commit is contained in:
Piyush Gupta
2024-12-03 13:59:38 +05:30
committed by GitHub
parent 35b2d12e18
commit a2f7b1a780
@@ -52,6 +52,22 @@ async function runMigration(): Promise<void> {
await Promise.all(updateOrganizationPromises);
console.log(`Updated ${updateOrganizationPromises.length.toString()} organizations`);
const updatedemptyConfigProjects = await transactionPrisma.project.updateMany({
where: {
config: {
equals: {},
},
},
data: {
config: {
channel: null,
industry: null,
},
},
});
console.log(`Updated ${updatedemptyConfigProjects.count.toString()} projects with empty config`);
},
{
timeout: TRANSACTION_TIMEOUT,