diff options
Diffstat (limited to 'migrations')
| -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); +}); |
