mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
修改表唯一约束
This commit is contained in:
1 parent
a3a62f65dd
commit
891619ad55
7 files changed
+23
-15
No files matched your search
+10
-1
@@ -11,9 +11,18 @@ import { sequelize } from '../data';
|
||||
|
||||
export default async () => {
|
||||
try {
|
||||
await sequelize.sync({ alter: true });
|
||||
await sequelize.sync();
|
||||
await new Promise((resolve) => setTimeout(() => resolve(null), 5000));
|
||||
|
||||
// try {
|
||||
// const queryInterface = sequelize.getQueryInterface();
|
||||
// await queryInterface.addIndex('Crontabs', ['command'], { unique: true });
|
||||
// await queryInterface.addIndex('Envs', ['name', 'value'], { unique: true });
|
||||
// await queryInterface.addIndex('Apps', ['name'], { unique: true });
|
||||
// } catch (error) {
|
||||
|
||||
// }
|
||||
|
||||
const crondbExist = await fileExist(config.cronDbFile);
|
||||
const dependenceDbExist = await fileExist(config.dependenceDbFile);
|
||||
const envDbExist = await fileExist(config.envDbFile);
|
||||
|
||||
Reference in new issue
Block a user