2023-09-06 16:32:33 +02:00
|
|
|
-- 2023-09-06: Account->blog follows
|
|
|
|
|
|
|
|
-- +migrate Up
|
|
|
|
|
|
|
|
create table account_follows (
|
|
|
|
account_id text not null references accounts (id) on delete cascade,
|
2023-09-15 16:33:08 +02:00
|
|
|
blog_id text not null references blogs (id) on delete cascade,
|
|
|
|
|
|
|
|
primary key (account_id, blog_id)
|
2023-09-06 16:32:33 +02:00
|
|
|
);
|
|
|
|
|
2023-09-15 16:33:08 +02:00
|
|
|
create index account_follows_account_id_idx on account_follows (account_id);
|
|
|
|
|
2023-09-06 16:32:33 +02:00
|
|
|
-- +migrate Down
|
|
|
|
|
2023-09-15 16:33:08 +02:00
|
|
|
drop index account_follows_account_id_idx;
|
2023-09-06 16:32:33 +02:00
|
|
|
drop table account_follows;
|