feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions (#5496)

This commit is contained in:
Adrien de Peretti
2023-11-02 17:59:13 +01:00
committed by GitHub
parent ca411e54eb
commit 154c9b43bd
39 changed files with 616 additions and 393 deletions

View File

@@ -46,7 +46,7 @@ export function getMigration(
const generator = orm.getSchemaGenerator()
if (hasTable) {
const updateSql = await generator.getUpdateSchemaSQL()
/* const updateSql = await generator.getUpdateSchemaSQL()
const entityUpdates = updateSql
.split(";")
.map((sql) => sql.trim())
@@ -65,7 +65,10 @@ export function getMigration(
}
} else {
logger.info(`Skipping "${tableName}" migration.`)
}
}*/
logger.info(
`Link module "${serviceName}" table update skipped because the table already exists. Please write your own migration if needed.`
)
} else {
try {
await generator.createSchema()