aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations
diff options
context:
space:
mode:
authorwinter2025-01-23 18:55:52 +0000
committerwinter2025-01-23 18:55:58 +0000
commitbc9c83b6c33d460a574fbeb764c23bfbe941b4c0 (patch)
tree5d9e816b56feea462d15e391544b0b13eeb47c8d /migrations
parentddccaf16f39a4bf710266edc389fcde124e7ef56 (diff)
implement blocking users
it doesn't work yet for notifications! but i think i got it in most other places
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20250123_173501_create_block_relation.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/migrations/20250123_173501_create_block_relation.php b/migrations/20250123_173501_create_block_relation.php
new file mode 100644
index 0000000..f9ff266
--- /dev/null
+++ b/migrations/20250123_173501_create_block_relation.php
@@ -0,0 +1,14 @@
+<?php
+
+use \Digitigrade\Db\Migrator;
+
+Migrator::getInstance()->register(20250123_173501, function (PDO $db) {
+ // actors who block each other. makes sense
+ $db->exec(<<<END
+ CREATE TABLE block_relation (
+ subject bigint not null references actor,
+ object bigint not null references actor,
+ unique(subject, object)
+ );
+ END);
+});