Add no-seed configuration to database:reset (#9112)
Based on feedback here: https://github.com/twentyhq/twenty/issues/9109#issuecomment-2550198035
This commit is contained in:
@ -178,17 +178,30 @@
|
||||
"database:reset": {
|
||||
"executor": "nx:run-commands",
|
||||
"dependsOn": ["build"],
|
||||
"options": {
|
||||
"cwd": "packages/twenty-server",
|
||||
"commands": [
|
||||
"nx ts-node-no-deps -- ./scripts/truncate-db.ts",
|
||||
"nx ts-node-no-deps -- ./scripts/setup-db.ts",
|
||||
"nx database:migrate",
|
||||
"nx command-no-deps -- cache:flush",
|
||||
"nx command-no-deps -- workspace:seed:dev"
|
||||
],
|
||||
"parallel": false
|
||||
}
|
||||
"configurations": {
|
||||
"no-seed": {
|
||||
"cwd": "packages/twenty-server",
|
||||
"commands": [
|
||||
"nx ts-node-no-deps -- ./scripts/truncate-db.ts",
|
||||
"nx ts-node-no-deps -- ./scripts/setup-db.ts",
|
||||
"nx database:migrate",
|
||||
"nx command-no-deps -- cache:flush"
|
||||
],
|
||||
"parallel": false
|
||||
},
|
||||
"seed": {
|
||||
"cwd": "packages/twenty-server",
|
||||
"commands": [
|
||||
"nx ts-node-no-deps -- ./scripts/truncate-db.ts",
|
||||
"nx ts-node-no-deps -- ./scripts/setup-db.ts",
|
||||
"nx database:migrate",
|
||||
"nx command-no-deps -- cache:flush",
|
||||
"nx command-no-deps -- workspace:seed:dev"
|
||||
],
|
||||
"parallel": false
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "seed"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ rawDataSource
|
||||
]; // See https://supabase.github.io/wrappers/
|
||||
|
||||
for (const wrapper of supabaseWrappers) {
|
||||
if (await checkForeignDataWrapperExists(wrapper)) {
|
||||
if (await checkForeignDataWrapperExists(`${wrapper.toLowerCase()}_fdw`)) {
|
||||
continue;
|
||||
}
|
||||
await performQuery(
|
||||
|
||||
Reference in New Issue
Block a user