aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations/20250119_194145_create_notification.php
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/20250119_194145_create_notification.php')
-rw-r--r--migrations/20250119_194145_create_notification.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/migrations/20250119_194145_create_notification.php b/migrations/20250119_194145_create_notification.php
new file mode 100644
index 0000000..f4b3ae4
--- /dev/null
+++ b/migrations/20250119_194145_create_notification.php
@@ -0,0 +1,16 @@
+<?php
+
+use \Digitigrade\Db\Migrator;
+
+Migrator::getInstance()->register(20250119_194145, function (PDO $db) {
+ // table for notifications sent to users
+ $db->exec(<<<END
+ CREATE TABLE notification (
+ id bigserial primary key,
+ user_account bigint not null references user_account,
+ item_type text not null,
+ item_data jsonb not null,
+ created timestamp with time zone not null
+ );
+ END);
+});