mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-03 09:42:01 +03:00
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:
parent
deb37edd7c
commit
45214fe548
@ -178,7 +178,18 @@
|
||||
"database:reset": {
|
||||
"executor": "nx:run-commands",
|
||||
"dependsOn": ["build"],
|
||||
"options": {
|
||||
"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",
|
||||
@ -189,6 +200,8 @@
|
||||
],
|
||||
"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(
|
||||
|
@ -37,7 +37,7 @@ Note : you can run `npx nx run twenty-server:test:integration:with-db-reset` in
|
||||
|
||||
### Resetting the database
|
||||
|
||||
If you want to reset the database, you can run the following command:
|
||||
If you want to reset and seed the database, you can run the following command:
|
||||
|
||||
```bash
|
||||
npx nx run twenty-server:database:reset
|
||||
|
@ -86,7 +86,7 @@ If you can't log in after setup:
|
||||
1. Run the following commands:
|
||||
```bash
|
||||
docker exec -it twenty-server-1 yarn
|
||||
docker exec -it twenty-server-1 npx nx database:reset
|
||||
docker exec -it twenty-server-1 npx nx database:reset --configuration=no-seed
|
||||
```
|
||||
2. Restart the Docker containers:
|
||||
```bash
|
||||
@ -94,6 +94,8 @@ If you can't log in after setup:
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Note the database:reset command will completely erase your database and recreate it from scratch.
|
||||
|
||||
#### Connection Issues Behind a Reverse Proxy
|
||||
|
||||
If you're running Twenty behind a reverse proxy and experiencing connection issues:
|
||||
|
Loading…
Reference in New Issue
Block a user