9 lines
249 B
SQL
9 lines
249 B
SQL
-- Allow one pinned post per author for profile feeds
|
|
|
|
alter table if exists posts
|
|
add column if not exists pinned_at timestamptz;
|
|
|
|
create unique index if not exists posts_author_pinned_unique
|
|
on posts (author_id)
|
|
where pinned_at is not null;
|