diff --git a/docker-compose.yml b/docker-compose.yml index 5d3d227..adea560 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: pg: - build: ./postgres + build: ./backend-core/postgres environment: - POSTGRES_USER=root - POSTGRES_PASSWORD= diff --git a/postgres/1_initial.up.sql b/postgres/1_initial.up.sql deleted file mode 100644 index b9b376a..0000000 --- a/postgres/1_initial.up.sql +++ /dev/null @@ -1,25 +0,0 @@ - -CREATE TABLE "user" ( - id BYTEA PRIMARY KEY, - first_name VARCHAR(65535), - last_name VARCHAR(65535), - phone_number VARCHAR(32) UNIQUE -); - -CREATE TABLE "conversation" ( - id BYTEA PRIMARY KEY, - title VARCHAR(65535) -); - -CREATE TABLE member ( - "user" BYTEA REFERENCES "user"(id), - "conversation" BYTEA REFERENCES "conversation"(id), - UNIQUE ("user", "conversation") -); - -CREATE TABLE contact ( - "user" BYTEA REFERENCES "user"(id), - contact BYTEA REFERENCES "user"(id), - UNIQUE ("user", contact) -); - diff --git a/postgres/Dockerfile b/postgres/Dockerfile deleted file mode 100644 index cf3c6c5..0000000 --- a/postgres/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM postgres:10.3 - -COPY 1_initial.up.sql /docker-entrypoint-initdb.d