events-backend: track creator of events and subscriptions

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-09-19 01:19:31 +02:00
parent e7a0b6572c
commit 8241289427
8 changed files with 100 additions and 15 deletions
@@ -29,6 +29,10 @@ exports.up = async function up(knex) {
.bigIncrements('id')
.primary()
.comment('The unique ID of this event');
table
.text('created_by')
.notNullable()
.comment('The principal that published the event');
table
.dateTime('created_at')
.defaultTo(knex.fn.now())
@@ -53,6 +57,10 @@ exports.up = async function up(knex) {
.primary()
.notNullable()
.comment('The unique ID of this particular subscription');
table
.text('created_by')
.notNullable()
.comment('The principal that created the subscription');
table
.dateTime('created_at')
.defaultTo(knex.fn.now())