Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/ads/formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const PUBLISHER_FORMAT_IDS: AdFormatId[] = [
"banner_300x250",
"banner_728x90",
"banner_320x50",
"text_link",
];

export function formatSpec(id: AdFormatId) {
Expand Down
16 changes: 16 additions & 0 deletions supabase/migrations/20260717130000_ad_slot_text_link_format.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Allow the native text-link ad to serve on publisher slots.
--
-- ad_slots.formats gates which sizes serveAd() will fill for a slot, and its
-- original default predates the text_link format:
-- default array['banner_300x250','banner_728x90','banner_320x50']
-- So a publisher who copies the new text-link embed would get nothing back.
-- Widen the default for new slots and backfill existing ones so their
-- text-link embed actually fills.

alter table public.ad_slots
alter column formats
set default array['banner_300x250', 'banner_728x90', 'banner_320x50', 'text_link'];

update public.ad_slots
set formats = array_append(formats, 'text_link')
where not ('text_link' = any (formats));
Loading