Add automated ISAC system notifications
This commit is contained in:
@@ -93,6 +93,12 @@ for (const [name, definition] of [
|
||||
await database.exec("UPDATE data_change_proposals SET draft_entity_id=id WHERE draft_entity_id IS NULL AND entity_id IS NULL");
|
||||
await database.exec('CREATE UNIQUE INDEX IF NOT EXISTS data_change_proposals_draft_entity_idx ON data_change_proposals(draft_entity_id) WHERE draft_entity_id IS NOT NULL');
|
||||
|
||||
const notificationColumns = await (await database.prepare("PRAGMA table_info('notifications')")).all();
|
||||
if (!notificationColumns.some((column) => column.name === 'actions_json')) {
|
||||
console.log('Adding structured action callouts to notifications.');
|
||||
await database.exec('ALTER TABLE notifications ADD COLUMN actions_json TEXT');
|
||||
}
|
||||
|
||||
const proposalDefinition = await (await database.prepare(
|
||||
"SELECT sql FROM sqlite_master WHERE type='table' AND name='data_change_proposals'"
|
||||
)).get();
|
||||
|
||||
Reference in New Issue
Block a user