mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-05 22:50:13 -08:00
moving to postgres
This commit is contained in:
19
postgres/tables/budgetdetails.sql
Normal file
19
postgres/tables/budgetdetails.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- public.budgetdetails definition
|
||||
|
||||
-- Drop table
|
||||
DROP TABLE public.budgetdetails;
|
||||
|
||||
CREATE TABLE public.budgetdetails (
|
||||
trxid uuid NOT NULL DEFAULT uuid_generate_v4(),
|
||||
trxdescription text NOT NULL,
|
||||
trxdate date NOT NULL,
|
||||
trxamount money NOT NULL,
|
||||
insertdttm timestamp NULL DEFAULT now(),
|
||||
CONSTRAINT budgetdetails_pkey PRIMARY KEY (trxid)
|
||||
);
|
||||
|
||||
-- Permissions
|
||||
|
||||
ALTER TABLE public.budgetdetails OWNER TO acedanger;
|
||||
GRANT ALL ON TABLE public.budgetdetails TO acedanger;
|
||||
GRANT ALL ON TABLE public.budgetdetails TO budgetuser;
|
||||
11
postgres/tables/budgetimport.sql
Normal file
11
postgres/tables/budgetimport.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
DROP TABLE public.budgetimport;
|
||||
|
||||
create table public.budgetimport (
|
||||
dt bpchar(10) NULL,
|
||||
amount numeric(10, 2) NULL,
|
||||
description bpchar(200) NULL
|
||||
);
|
||||
|
||||
ALTER TABLE public.budgetimport OWNER TO acedanger;
|
||||
GRANT ALL ON TABLE public.budgetimport TO acedanger;
|
||||
GRANT ALL ON TABLE public.budgetimport TO budgetuser;
|
||||
Reference in New Issue
Block a user