feat: add blacklist message to machine communication

This commit is contained in:
Sérgio Salgado 2022-10-06 19:03:00 +01:00 committed by Rafael
parent 8af7c97c16
commit 677cb39f0c
4 changed files with 7 additions and 8 deletions

View file

@ -13,9 +13,7 @@ exports.up = function (next) {
allow_toggle BOOLEAN NOT NULL DEFAULT true
)`,
`INSERT INTO blacklist_messages (id, label, content, allow_toggle) VALUES ('${defaultMessageId}', 'Suspicious address', 'This address may be associated with a deceptive offer or a prohibited group. Please make sure you''re using an address from your own wallet.', false)`,
`ALTER TABLE blacklist ADD COLUMN blacklist_message_id UUID REFERENCES blacklist_messages(id)`,
`UPDATE blacklist SET blacklist_message_id = '${defaultMessageId}'`,
`ALTER TABLE blacklist ALTER COLUMN blacklist_message_id SET NOT NULL`
`ALTER TABLE blacklist ADD COLUMN blacklist_message_id UUID REFERENCES blacklist_messages(id) NOT NULL DEFAULT '${defaultMessageId}'`
]
db.multi(sql, next)