Feat(medusa, cli): plugin db generate (#10988)

RESOLVES FRMW-2875

**What**
Allow to generate migration for plugins. Migration generation defer from project migration generation and therefore we choose to separate responsibility entirely.

The flow is fairly simple, the user run `npx medusa plugin:db:generate` and the script will scan for all available modules in the plugins, gather their models information and generate the appropriate migrations and snapshot (for later generation)

Co-authored-by: Harminder Virk <1706381+thetutlage@users.noreply.github.com>
This commit is contained in:
Adrien de Peretti
2025-01-17 12:05:46 +00:00
committed by GitHub
co-authored by Harminder Virk
parent 5582bd2038
commit 0cfaab5bb1
9 changed files with 272 additions and 1 deletions
+2 -1
View File
@@ -40,7 +40,8 @@
"watch": "tsc --build --watch",
"build": "rimraf dist && tsc --build",
"serve": "node dist/app.js",
"test": "jest --silent=false --bail --maxWorkers=50% --forceExit"
"test": "jest --runInBand --bail --forceExit --testPathIgnorePatterns='/integration-tests/' -- src/**/__tests__/**/*.ts",
"test:integration": "jest --forceExit -- src/**/integration-tests/**/__tests__/**/*.ts"
},
"devDependencies": {
"@medusajs/framework": "^2.2.0",