Can create new accommodations using the API
This commit is contained in:
		@@ -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;
 | 
			
		||||
@@ -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
 | 
			
		||||
);
 | 
			
		||||
		Reference in New Issue
	
	Block a user