Can create new accommodations using the API
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2024-05-23 21:20:14 +02:00
parent 2f1df6c117
commit c4fadce69f
12 changed files with 248 additions and 18 deletions

View File

@ -1,5 +1,5 @@
ALTER TABLE public.families
DROP COLUMN enable_accommodations;
DROP TABLE IF EXISTS accomodations_reservations;
DROP TABLE IF EXISTS accomodations_list;
DROP TABLE IF EXISTS accommodations_reservations;
DROP TABLE IF EXISTS accommodations_list;

View File

@ -8,13 +8,14 @@ COMMENT
-- Create tables
CREATE TABLE IF NOT EXISTS accommodations_list
(
id SERIAL PRIMARY KEY,
family_id integer NOT NULL REFERENCES families,
time_create BIGINT NOT NULL,
time_update BIGINT NOT NULL,
need_validation BOOLEAN,
description text NULL,
open_to_reservation BOOLEAN
id SERIAL PRIMARY KEY,
family_id integer NOT NULL REFERENCES families,
time_create BIGINT NOT NULL,
time_update BIGINT NOT NULL,
name VARCHAR(50) NOT NULL,
need_validation BOOLEAN NOT NULL DEFAULT true,
description text NULL,
open_to_reservations BOOLEAN NOT NULL DEFAULT false
);
CREATE TABLE IF NOT EXISTS accommodations_reservations
@ -27,5 +28,5 @@ CREATE TABLE IF NOT EXISTS accommodations_reservations
time_update BIGINT NOT NULL,
reservation_start BIGINT NOT NULL,
reservation_end BIGINT NOT NULL,
validated BOOLEAN
validated BOOLEAN NULL
);