Skip to content
Merged
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
20 changes: 20 additions & 0 deletions ddl/migrations/0181_reward_codes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
begin;

create table if not exists reward_codes (
code text not null primary key,
mint text not null,
reward_address text not null,
amount bigint not null,
created_at timestamp without time zone not null default current_timestamp
);

create index if not exists reward_codes_mint_idx on reward_codes using btree (mint);
create index if not exists reward_codes_reward_address_idx on reward_codes using btree (reward_address);

comment on table reward_codes is 'Stores reward codes for distributing coins';
comment on column reward_codes.code is 'Unique code for redemption';
comment on column reward_codes.mint is 'Coin mint address';
comment on column reward_codes.reward_address is 'Address of the reward instance onchain';
comment on column reward_codes.amount is 'Amount of coins to reward';

commit;
Loading