select * from tenants;
insert into tenants (name) VALUES ('customer1');
create table employees ( tenant_id uuid, id integer, name text,
age integer, address text, start_date timestamp, title text,
CONSTRAINT FK_tenants FOREIGN KEY(tenant_id) REFERENCES
tenants(id), CONSTRAINT PK_employee PRIMARY KEY(tenant_id,id));
set nile.tenant_id ALTER TABLE tenants ADD phone_number text, ADD address text;
create table flights ( id integer PRIMARY KEY, name text, from_location text, to_location text, departure_time TIMESTAMP, arrival_time TIMESTAMP);
select flights.id, flights.name, flights.from_location, airports.addressfrom flights, airportswhere flights.from_destination=airports.code;
create table bookings ( tenant_id uuid, booking_id integer, employee_id text, flight_id integer, total_price float, PRIMARY KEY(tenant_id,booking_id));
SELECT tenants.name, title, completeFROM todos join tenants on tenants.id = todos.tenant_id;select * from tenants;
insert into tenants (name) VALUES ('customer1');
create table employees ( tenant_id uuid, id integer, name text,
age integer, address text, start_date timestamp, title text,
CONSTRAINT FK_tenants FOREIGN KEY(tenant_id) REFERENCES
tenants(id), CONSTRAINT PK_employee PRIMARY KEY(tenant_id,id));
set nile.tenant_id ALTER TABLE tenants ADD phone_number text, ADD address text;
create table flights ( id integer PRIMARY KEY, name text, from_location text, to_location text, departure_time TIMESTAMP, arrival_time TIMESTAMP);
select flights.id, flights.name, flights.from_location, airports.addressfrom flights, airportswhere flights.from_destination=airports.code;
create table bookings ( tenant_id uuid, booking_id integer, employee_id text, flight_id integer, total_price float, PRIMARY KEY(tenant_id,booking_id));
SELECT tenants.name, title, completeFROM todos join tenants on tenants.id = todos.tenant_id;
select * from tenants;
insert into tenants (name) VALUES ('customer1');
create table employees ( tenant_id uuid, id integer, name text,
age integer, address text, start_date timestamp, title text,
CONSTRAINT FK_tenants FOREIGN KEY(tenant_id) REFERENCES
tenants(id), CONSTRAINT PK_employee PRIMARY KEY(tenant_id,id));
set nile.tenant_id ALTER TABLE tenants ADD phone_number text, ADD address text;
create table flights ( id integer PRIMARY KEY, name text, from_location text, to_location text, departure_time TIMESTAMP, arrival_time TIMESTAMP);
select flights.id, flights.name, flights.from_location, airports.addressfrom flights, airportswhere flights.from_destination=airports.code;
create table bookings ( tenant_id uuid, booking_id integer, employee_id text, flight_id integer, total_price float, PRIMARY KEY(tenant_id,booking_id));
SELECT tenants.name, title, completeFROM todos join tenants on tenants.id = todos.tenant_id;select * from tenants;
insert into tenants (name) VALUES ('customer1');
create table employees ( tenant_id uuid, id integer, name text,
age integer, address text, start_date timestamp, title text,
CONSTRAINT FK_tenants FOREIGN KEY(tenant_id) REFERENCES
tenants(id), CONSTRAINT PK_employee PRIMARY KEY(tenant_id,id));
set nile.tenant_id ALTER TABLE tenants ADD phone_number text, ADD address text;
create table flights ( id integer PRIMARY KEY, name text, from_location text, to_location text, departure_time TIMESTAMP, arrival_time TIMESTAMP);
select flights.id, flights.name, flights.from_location, airports.addressfrom flights, airportswhere flights.from_destination=airports.code;
create table bookings ( tenant_id uuid, booking_id integer, employee_id text, flight_id integer, total_price float, PRIMARY KEY(tenant_id,booking_id));
SELECT tenants.name, title, completeFROM todos join tenants on tenants.id = todos.tenant_id;