Enhance database management with cleanup and reset scripts
- Added a new database cleanup script to remove all data while preserving the schema, facilitating a clean state before seeding. - Updated package.json to include new commands for database cleaning and resetting. - Modified schema definitions to use an array format for index and constraint definitions, improving clarity and consistency. - Updated product seeding logic to utilize role-based assignments directly from mock data, enhancing flexibility in product-role relationships.
This commit is contained in:
@@ -15,7 +15,9 @@
|
||||
"db:migrate": "drizzle-kit migrate",
|
||||
"db:studio": "drizzle-kit studio",
|
||||
"db:push": "drizzle-kit push",
|
||||
"db:seed": "tsx server/database/seed.ts"
|
||||
"db:clean": "tsx server/database/clean.ts",
|
||||
"db:seed": "tsx server/database/seed.ts",
|
||||
"db:reset": "pnpm db:clean && pnpm db:seed"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxtjs/i18n": "^10.1.2",
|
||||
|
||||
Reference in New Issue
Block a user