๐ (db): Renumber duplicate V19 migration to V20
Changes
3 files changed, +19 -13
MODIFY
docs/maintainers/forgefed.md
+1 -1
@@ -45,7 +45,7 @@
45
45
in `model/` (`FederationKey`, `RemoteActor`, `RepositoryFollower`,
46
46
`RemoteFollow`, `RemoteUserFollow`, `ReceivedPush`, `InboxActivity`,
47
47
`OutboxActivity`, `FederationDelivery`), schema in `db/migration/V2__federation.sql`,
48
-`V9__federation_following.sql`, and `V19__federation_user_follows.sql`.
48
+`V9__federation_following.sql`, and `V20__federation_user_follows.sql`.
49
49
50
50
## Actor model
51
51
DELETE
src/main/resources/db/migration/V19__federation_user_follows.sql
+0 -12
@@ -1,18 +0,0 @@
1
-create table remote_user_follows
2
-(
3
- id uuid primary key,
4
- user_id uuid not null references users (id) on delete cascade,
5
- remote_user_actor_id text not null,
6
- handle text not null,
7
- created_at timestamptz not null default now(),
8
- unique (user_id, remote_user_actor_id)
9
-);
10
-
11
-alter table remote_follows
12
- add column via_user_actor_id text;
ADD
src/main/resources/db/migration/V20__federation_user_follows.sql
+18 -0
@@ -0,0 +1,18 @@
1
+-- Follow-a-user (federated collaboration Story 1): a local user follows a remote
2
+-- Person. We fan out to a repository follow per public repo in that Person's
3
+-- repositories collection, tagging each with via_user_actor_id so the /following
4
+-- page can group them under the user and unfollow-user can undo them together.
5
+create table remote_user_follows
6
+(
7
+ id uuid primary key,
8
+ user_id uuid not null references users (id) on delete cascade,
9
+ remote_user_actor_id text not null,
10
+ handle text not null,
11
+ created_at timestamptz not null default now(),
12
+ unique (user_id, remote_user_actor_id)
13
+);
14
+
15
+-- Null for a directly-followed repository; set to the remote Person actor id when
16
+-- the follow was created by fanning out a followed user's repositories collection.
17
+alter table remote_follows
18
+ add column via_user_actor_id text;