diff options
| author | winter | 2024-12-19 20:59:18 +0000 |
|---|---|---|
| committer | winter | 2024-12-19 20:59:18 +0000 |
| commit | 72b07245f44c73ed41bfcca2465a9ee34426a922 (patch) | |
| tree | 57372703100ad792c95c665a568aabe8a763bfdf /migrations/20241219_181401_create_follow_relation.php | |
| parent | 1e070a7a0097c74f8ac30678d39267f19c76f9f6 (diff) | |
implement follow relationships (untested)
does NOT implement the actual behaviour behind follows (receiving posts and such)
Diffstat (limited to 'migrations/20241219_181401_create_follow_relation.php')
| -rw-r--r-- | migrations/20241219_181401_create_follow_relation.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/migrations/20241219_181401_create_follow_relation.php b/migrations/20241219_181401_create_follow_relation.php new file mode 100644 index 0000000..e5e5e73 --- /dev/null +++ b/migrations/20241219_181401_create_follow_relation.php @@ -0,0 +1,19 @@ +<?php + +use \Digitigrade\Db\Migrator; + +Migrator::getInstance()->register(20241219_181401, function (PDO $db) { + $db->beginTransaction(); + $db->exec(<<<END + CREATE TYPE follow_relation_status AS ENUM ( + 'pending', 'active' + ); + CREATE TABLE follow_relation ( + subject bigint not null references actor, + object bigint not null references actor, + status follow_relation_status not null, + unique(subject, object) + ); + END); + $db->commit(); +}); |
