We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aab91ae commit ca95b99Copy full SHA for ca95b99
platform/backend/src/standalone-scripts/clean-db-on-dev.ts
@@ -1,7 +1,7 @@
1
import { pathToFileURL } from "node:url";
2
import { sql } from "drizzle-orm";
3
import config from "@/config";
4
-import db from "@/database";
+import db, { initializeDatabase } from "@/database";
5
import logger from "@/logging";
6
7
/**
@@ -80,7 +80,8 @@ export const clearDb = async (): Promise<void> => {
80
* CLI entry point for clearing the database
81
*/
82
if (import.meta.url === pathToFileURL(process.argv[1]).href) {
83
- clearDb()
+ initializeDatabase()
84
+ .then(() => clearDb())
85
.then(() => {
86
logger.info("\n✅ Done!");
87
process.exit(0);
0 commit comments