Skip to content

Commit

Permalink
Merge pull request #13 from fac20/database-planning
Browse files Browse the repository at this point in the history
Database planning
  • Loading branch information
JoshDAO authored Oct 19, 2020
2 parents 172b368 + 6ede1b3 commit 5ec899e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions database/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
BEGIN;

DROP TABLE IF EXISTS countries, things_to_do, businesses, experiences CASCADE;

CREATE TABLE countries (
id SERIAL PRIMARY KEY,
country_name VARCHAR(255) NOT NULL,
);

CREATE TABLE things_to_do (
country_id INTEGER REFERENCES countries(id),
name VARCHAR(255) NOT NULL,
details TEXT,
-- time INTEGER ???
-- date ???
location TEXT

);
CREATE TABLE businesses (
country_id INTEGER REFERENCES countries(id),
name VARCHAR(255) NOT NULL,
details TEXT,
-- time INTEGER ???
-- date ???
location TEXT
-- ownership array ??
);

CREATE TABLE experiences (
country_id INTEGER REFERENCES countries(id),
socials TEXT,
details TEXT,
-- tags array ??
overall_experience TEXT,
);

INSERT INTO countries (country_name) VALUES
(argentina),
(brazil),


COMMIT;

0 comments on commit 5ec899e

Please sign in to comment.