mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 15:43:24 +08:00
修复sqlite加载顺序
This commit is contained in:
parent
d3d2e0887e
commit
38e1ba67af
|
@ -11,6 +11,8 @@ import { sequelize } from '../data';
|
||||||
|
|
||||||
export default async () => {
|
export default async () => {
|
||||||
try {
|
try {
|
||||||
|
await sequelize.sync({ alter: true });
|
||||||
|
|
||||||
const crondbExist = await fileExist(config.cronDbFile);
|
const crondbExist = await fileExist(config.cronDbFile);
|
||||||
const dependenceDbExist = await fileExist(config.dependenceDbFile);
|
const dependenceDbExist = await fileExist(config.dependenceDbFile);
|
||||||
const envDbExist = await fileExist(config.envDbFile);
|
const envDbExist = await fileExist(config.envDbFile);
|
||||||
|
@ -77,12 +79,6 @@ export default async () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
await sequelize.sync({ alter: true });
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info('✌️ DB loaded');
|
Logger.info('✌️ DB loaded');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.info('✌️ DB load failed');
|
Logger.info('✌️ DB load failed');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user