From a84232811dadccf7047424f27340a7f9847bedff Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 7 Dec 2024 21:44:42 +0000 Subject: many many changes but actors are loaded from db now --- migrations/20241207_183000_create_actor.php | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 migrations/20241207_183000_create_actor.php (limited to 'migrations/20241207_183000_create_actor.php') 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 @@ +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); +}); -- cgit v1.3