Commit 9ae6d4a9 authored by Huihui, Jonathan's avatar Huihui, Jonathan
Browse files

create and fill a test sql table

parent ccf937fe
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -8,6 +8,13 @@ services:

  postgres:
    image: postgres
    environment: 
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_DB=postgres
    volumes:
      - ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
      - ./sql/fill_tables.sql:/docker-entrypoint-initdb.d/fill_tables.sql

# find what tables already exist in an empty database or initialize a table
# then use that for testing purposes

sql/create_tables.sql

0 → 100644
+7 −0
Original line number Diff line number Diff line
CREATE TABLE IF NOT EXISTS test_table (
    id INT NOT NULL,
    test_string VARCHAR(50),
    PRIMARY KEY (id)
);

sql/fill_tables.sql

0 → 100644
+3 −0
Original line number Diff line number Diff line
INSERT INTO test_table VALUES (1, 'hello_world')