2
0
Fork 0

Moved postgres to backend-core

pull/6/head
UnicodingUnicorn 2019-02-16 13:01:02 +08:00
parent 71b0ae3039
commit 1c2caf1000
3 changed files with 1 additions and 29 deletions

View File

@ -1,7 +1,7 @@
version: "3"
services:
pg:
build: ./postgres
build: ./backend-core/postgres
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=

View File

@ -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)
);

View File

@ -1,3 +0,0 @@
FROM postgres:10.3
COPY 1_initial.up.sql /docker-entrypoint-initdb.d