mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-05 22:50:13 -08:00
19 lines
632 B
SQL
19 lines
632 B
SQL
-- public.budgetdetails definition
|
|
|
|
drop table if exists public.budgetdetails cascade;
|
|
|
|
create table public.budgetdetails (
|
|
trx_id uuid not null default uuid_generate_v4 (),
|
|
trx_description text not null,
|
|
trx_date date not null,
|
|
trx_amount numeric not null,
|
|
acct_id int null,
|
|
created_at timestamp null default now(),
|
|
primary key (trx_id),
|
|
constraint fk_acct foreign key (acct_id) references public.accounts (acct_id) on delete set null
|
|
);
|
|
|
|
-- Permissions
|
|
alter table public.budgetdetails OWNER to acedanger;
|
|
grant all on table public.budgetdetails to acedanger;
|
|
grant all on table public.budgetdetails to budgetuser; |