diff options
| author | winter | 2024-12-07 21:44:42 +0000 |
|---|---|---|
| committer | winter | 2024-12-07 21:44:42 +0000 |
| commit | a84232811dadccf7047424f27340a7f9847bedff (patch) | |
| tree | a6a0823c8b9485b6a5b60ea7ae854f9511a6ae1e /migrations/20241207_183000_create_actor.php | |
| parent | e1ad307b531c27ec6bfaf8b4d018991b0d4a78f3 (diff) | |
many many changes but actors are loaded from db now
Diffstat (limited to 'migrations/20241207_183000_create_actor.php')
| -rw-r--r-- | migrations/20241207_183000_create_actor.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/migrations/20241207_183000_create_actor.php b/migrations/20241207_183000_create_actor.php new file mode 100644 index 0000000..08de53d --- /dev/null +++ b/migrations/20241207_183000_create_actor.php @@ -0,0 +1,40 @@ +<?php + +use \WpfTest\Db\Migrator; + +Migrator::getInstance()->register(20241207_183000, function (PDO $db) { + // create actor, endpoints, extensions + $db->exec(<<<'END' + CREATE TABLE actor ( + id bigserial primary key not null, + uri text unique not null, + is_local boolean not null, + created timestamp with time zone not null, + modified timestamp with time zone, + homepage text, + handle text not null, + display_name text not null, + bio text, + pronouns text, + automated boolean not null default false, + request_to_follow boolean not null default false + ); + CREATE TABLE actor_endpoints ( + actor_id bigint unique not null references actor(id), + basic_feed text not null, + full_feed text, + follow text, + unfollow text, + block text, + unblock text, + subscribe text, + unsubscribe text + ); + CREATE TABLE actor_extension ( + actor_id bigint not null references actor(id), + uri text not null, + data jsonb not null, + unique(actor_id, uri) + ); + END); +}); |
