predikt/oracle/backend/supabase/contract_boosts.sql
caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

32 lines
1.0 KiB
SQL

create table if not exists
contract_boosts (
id bigint generated always as identity primary key,
contract_id text references contracts (id),
post_id text references old_posts (id),
user_id text not null references users (id),
start_time timestamptz not null,
end_time timestamptz not null,
created_time timestamptz not null default now(),
funded boolean not null default true,
constraint contract_boosts_content_check check (
(
contract_id is not null
and post_id is null
)
or (
contract_id is null
and post_id is not null
)
)
);
-- Indexes
create index if not exists contract_boosts_contract_id_idx on contract_boosts (contract_id, start_time, end_time);
create index if not exists contract_boosts_post_id_idx on contract_boosts (post_id, start_time, end_time);
create index if not exists contract_boosts_user_id_idx on contract_boosts (user_id);
-- Row Level Security
alter table contract_boosts enable row level security;