13 lines
614 B
Markdown
13 lines
614 B
Markdown
create table public.transactions (
|
|
id bigint generated by default as identity not null,
|
|
created_at timestamp with time zone not null default now(),
|
|
"from" bigint null,
|
|
"to" bigint null,
|
|
amount bigint not null default '4'::bigint,
|
|
remarks character varying null,
|
|
match_id bigint null,
|
|
constraint transactions_pkey primary key (id),
|
|
constraint transactions_from_fkey foreign KEY ("from") references users (id),
|
|
constraint transactions_match_id_fkey foreign KEY (match_id) references matches (id),
|
|
constraint transactions_to_fkey foreign KEY ("to") references users (id)
|
|
) TABLESPACE pg_default; |