aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20250124_190913_create_user_setting.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/migrations/20250124_190913_create_user_setting.php b/migrations/20250124_190913_create_user_setting.php
new file mode 100644
index 0000000..5b248cc
--- /dev/null
+++ b/migrations/20250124_190913_create_user_setting.php
@@ -0,0 +1,15 @@
+<?php
+
+use \Digitigrade\Db\Migrator;
+
+Migrator::getInstance()->register(20250124_190913, function (PDO $db) {
+ // user settings table
+ $db->exec(<<<END
+ CREATE TABLE user_setting (
+ user_id bigint not null references user_account,
+ name text not null,
+ value text not null,
+ unique(user_id, name)
+ );
+ END);
+});