任务视图增加系统视图

This commit is contained in:
whyour
2022-11-26 20:34:07 +08:00
parent 799cda1e3e
commit 1446e925ec
7 changed files with 58 additions and 16 deletions
+10 -3
View File
@@ -10,7 +10,7 @@ import { fileExist } from '../config/util';
import { SubscriptionModel } from '../data/subscription';
import { CrontabViewModel } from '../data/cronView';
import config from '../config';
import { sequelize } from '../data'
import { sequelize } from '../data';
export default async () => {
try {
@@ -24,10 +24,17 @@ export default async () => {
// 初始化新增字段
try {
await sequelize.query('alter table CrontabViews add column filterRelation VARCHAR(255)')
await sequelize.query(
'alter table CrontabViews add column filterRelation VARCHAR(255)',
);
} catch (error) {}
try {
await sequelize.query('alter table Subscriptions add column proxy VARCHAR(255)')
await sequelize.query(
'alter table Subscriptions add column proxy VARCHAR(255)',
);
} catch (error) {}
try {
await sequelize.query('alter table CrontabViews add column type NUMBER');
} catch (error) {}
// 2.10-2.11 升级