diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js new file mode 100644 index 0000000..b674d1c --- /dev/null +++ b/api/app/lib/controllers/alarm/data.js @@ -0,0 +1,19 @@ +'use strict'; + +async function list (ctx) { + try { + const models = ctx.fs.dc.models; + + ctx.status = 20; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: error`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + +module.exports = { + list +}; \ No newline at end of file diff --git a/script/0.0.3/1.alert_app_alarm.sql b/script/0.0.3/1.alert_app_alarm.sql index 90057e1..e323c7b 100644 --- a/script/0.0.3/1.alert_app_alarm.sql +++ b/script/0.0.3/1.alert_app_alarm.sql @@ -1,4 +1,5 @@ -alter TABLE app_alarm add screenshot varchar(1024); alter TABLE app_alarm add confirm_time timestamp -WITH time zone; comment -ON column app_alarm.confirm_time is '确认时间'; alter TABLE app_alarm add confirm_auto bool default false; comment -ON column app_alarm.confirm_auto is '是否自动恢复'; \ No newline at end of file +alter TABLE app_alarm add screenshot varchar(1024); +alter TABLE app_alarm add confirm_time timestamp WITH time zone; +comment ON column app_alarm.confirm_time is '确认时间'; +alter TABLE app_alarm add confirm_auto bool default false; +comment ON column app_alarm.confirm_auto is '是否自动恢复'; \ No newline at end of file diff --git a/script/0.0.3/3.alert_project_app.sql b/script/0.0.3/3.alert_project_app.sql index b8f012b..6944f89 100644 --- a/script/0.0.3/3.alert_project_app.sql +++ b/script/0.0.3/3.alert_project_app.sql @@ -4,9 +4,3 @@ alter table project_app add app_id int; alter table project_app drop column url; - -alter table project_app drop column lock; - -alter table project_app - add constraint project_app_app_id_fk - foreign key (app_id) references app; diff --git a/script/0.0.3/4.create_app.sql b/script/0.0.3/4.create_app.sql index bdfec52..1cf6f4c 100644 --- a/script/0.0.3/4.create_app.sql +++ b/script/0.0.3/4.create_app.sql @@ -10,3 +10,7 @@ create table if not exists app create unique index if not exists app_id_uindex on app (id); + +alter table project_app + add constraint project_app_app_id_fk + foreign key (app_id) references app; \ No newline at end of file