Skip to content

Commit

Permalink
chore: correct sql table files
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Aug 1, 2024
1 parent 47de9b9 commit cae48e7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 8 additions & 12 deletions server/schema/fairMarketValue.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
DROP TABLE IF EXISTS public.notification;
DROP TABLE IF EXISTS public.fair_market_value;

CREATE TABLE IF NOT EXISTS public.notification
CREATE TABLE IF NOT EXISTS public.fair_market_value
(
business_id integer NOT NULL DEFAULT nextval('notification_business_id_seq'::regclass),
notification_id integer NOT NULL DEFAULT nextval('notification_notification_id_seq'::regclass),
message character varying(2000) COLLATE pg_catalog."default" NOT NULL,
"timestamp" date NOT NULL,
been_dismissed boolean NOT NULL,
CONSTRAINT notification_pkey PRIMARY KEY (notification_id),
CONSTRAINT business_id FOREIGN KEY (business_id)
REFERENCES public.business (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
item_id integer NOT NULL DEFAULT nextval('fair_market_value_item_id_seq'::regclass),
item_name character varying(200) COLLATE pg_catalog."default" NOT NULL,
quantity_type character varying(100) COLLATE pg_catalog."default",
price numeric,
category character varying(50) COLLATE pg_catalog."default",
CONSTRAINT fair_market_value_pkey PRIMARY KEY (item_id)
)
20 changes: 12 additions & 8 deletions server/schema/notification.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
DROP TABLE IF EXISTS public.fair_market_value;
DROP TABLE IF EXISTS public.notification;

CREATE TABLE IF NOT EXISTS public.fair_market_value
CREATE TABLE IF NOT EXISTS public.notification
(
item_id integer NOT NULL DEFAULT nextval('fair_market_value_item_id_seq'::regclass),
item_name character varying(200) COLLATE pg_catalog."default" NOT NULL,
quantity_type character varying(100) COLLATE pg_catalog."default",
price numeric,
category character varying(50) COLLATE pg_catalog."default",
CONSTRAINT fair_market_value_pkey PRIMARY KEY (item_id)
business_id integer NOT NULL DEFAULT nextval('notification_business_id_seq'::regclass),
notification_id integer NOT NULL DEFAULT nextval('notification_notification_id_seq'::regclass),
message character varying(2000) COLLATE pg_catalog."default" NOT NULL,
"timestamp" date NOT NULL,
been_dismissed boolean NOT NULL,
CONSTRAINT notification_pkey PRIMARY KEY (notification_id),
CONSTRAINT business_id FOREIGN KEY (business_id)
REFERENCES public.business (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)

0 comments on commit cae48e7

Please sign in to comment.