fix: fix mark bugs

This commit is contained in:
2025-03-29 18:24:00 +08:00
parent 12aa9022c4
commit d8d78d184b
5 changed files with 17 additions and 15 deletions

View File

@@ -301,10 +301,8 @@ export const MarkMInit = async <T = any>(opts: MarkInitOpts<T>, sync?: Opts) =>
paranoid: true,
...optsRest,
});
console.log('MarkModel init', optsRest);
if (sync && sync.sync) {
const { sync: _, ...rest } = sync;
console.log('MarkModel sync', rest);
MarkModel.sync({ alter: true, logging: false, ...rest }).catch((e) => {
console.error('MarkModel sync', e);
});
@@ -318,4 +316,4 @@ export const syncMarkModel = async (sync?: Opts) => {
await MarkMInit({ sequelize, tableName: 'micro_mark' }, sync);
};
syncMarkModel({ sync: true, alter: true, logging: true });
syncMarkModel({ sync: true, alter: true, logging: false });