generated from ctc-uci/npo-template-merged
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
CREATE TABLE invoices ( | ||
id INT PRIMARY KEY UNIQUE NOT NULL DEFAULT nextval('invoice_id_seq'), | ||
event_id INT NOT NULL REFERENCES events(id), | ||
start_date DATE NOT NULL, | ||
end_date DATE NOT NULL, | ||
is_sent BOOL NOT NULL DEFAULT False, | ||
payment_status payment NOT NULL DEFAULT 'none' | ||
|
||
); | ||
CREATE TABLE IF NOT EXISTS public.invoices | ||
( | ||
id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), | ||
event_id integer NOT NULL, | ||
start_date date NOT NULL, | ||
end_date date NOT NULL, | ||
is_sent boolean NOT NULL DEFAULT false, | ||
payment_status payment NOT NULL DEFAULT 'none'::payment, | ||
CONSTRAINT invoice_pkey PRIMARY KEY (id), | ||
CONSTRAINT event_id FOREIGN KEY (event_id) | ||
REFERENCES public.events (id) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
); |