Skip to content

Commit

Permalink
created classes table
Browse files Browse the repository at this point in the history
  • Loading branch information
alexespejo committed Nov 23, 2024
1 parent 3cacda7 commit 52359ce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions server/db/schema/classes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CREATE TABLE IF NOT EXISTS public.classes
(
id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
title VARCHAR(256) NOT NULL,
description TEXT,
location VARCHAR(256) NOT NULL,
capacity INT NOT NULL,
level character varying(16) COLLATE pg_catalog."default" NOT NULL,
costume TEXT NOT NULL,
CONSTRAINT class_pkey PRIMARY KEY (id),
CONSTRAINT level_check CHECK (level::text = ANY (ARRAY['beginner'::character varying, 'intermediate'::character varying, 'advanced'::character varying]::text[]))
)

0 comments on commit 52359ce

Please sign in to comment.