feat: scripting-like tags on custom sms content
feat: add created column to custom_messages feat: custom message dynamic validators and testing feat: delete custom sms feat: employ custom sms to existing events
This commit is contained in:
parent
3480bbf8f7
commit
54b73b95b4
10 changed files with 444 additions and 95 deletions
|
|
@ -7,9 +7,11 @@ exports.up = function (next) {
|
|||
id UUID PRIMARY KEY,
|
||||
event custom_message_event NOT NULL,
|
||||
device_id TEXT REFERENCES devices(device_id),
|
||||
message TEXT NOT NULL
|
||||
message TEXT NOT NULL,
|
||||
created TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
)`,
|
||||
`CREATE UNIQUE INDEX uq_custom_message_per_device ON custom_messages (event, device_id)`
|
||||
`CREATE UNIQUE INDEX uq_custom_message_per_device ON custom_messages (event, device_id) WHERE device_id IS NOT NULL`,
|
||||
`CREATE UNIQUE INDEX uq_custom_message_all_devices ON custom_messages (event) WHERE device_id IS NULL`
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue