Commit d2e14ad3 authored by Ossi Laine's avatar Ossi Laine
Browse files

Fixed bug in sql container

parent 419f1d8b
...@@ -197,8 +197,6 @@ ALTER TABLE experiment ADD COLUMN (embody_enabled BOOLEAN DEFAULT 0); ...@@ -197,8 +197,6 @@ ALTER TABLE experiment ADD COLUMN (embody_enabled BOOLEAN DEFAULT 0);
/* Set current answer type (embody/slider/etc..) so returning users are routed to correct question */ /* Set current answer type (embody/slider/etc..) so returning users are routed to correct question */
ALTER TABLE answer_set ADD COLUMN (answer_type VARCHAR(120)); ALTER TABLE answer_set ADD COLUMN (answer_type VARCHAR(120));
ALTER TABLE experiment ADD COLUMN (group_id INTEGER), ADD FOREIGN KEY(group_id) REFERENCES research_group(id);
CREATE TABLE research_group ( CREATE TABLE research_group (
id INTEGER NOT NULL AUTO_INCREMENT, id INTEGER NOT NULL AUTO_INCREMENT,
...@@ -216,3 +214,5 @@ CREATE TABLE user_in_group ( ...@@ -216,3 +214,5 @@ CREATE TABLE user_in_group (
FOREIGN KEY(iduser) REFERENCES user (id) FOREIGN KEY(iduser) REFERENCES user (id)
); );
ALTER TABLE experiment ADD COLUMN (group_id INTEGER), ADD FOREIGN KEY(group_id) REFERENCES research_group(id);
\ No newline at end of file
...@@ -16,7 +16,7 @@ services: ...@@ -16,7 +16,7 @@ services:
- gunicorn - gunicorn
gunicorn: gunicorn:
#image: rating_app:latest #image: rating_app:latest
build: ../. build: ../.
restart: always restart: always
ports: ports:
...@@ -41,4 +41,5 @@ services: ...@@ -41,4 +41,5 @@ services:
volumes: volumes:
- ./config/mysql/rating.cnf:/etc/mysql/conf.d/rating.cnf - ./config/mysql/rating.cnf:/etc/mysql/conf.d/rating.cnf
- ./config/mysql/schema.sql:/docker-entrypoint-initdb.d/1.sql - ./config/mysql/schema.sql:/docker-entrypoint-initdb.d/1.sql
- ./config/mysql/data.sql:/docker-entrypoint-initdb.d/2.sql
- ./dbdata:/var/lib/mysql - ./dbdata:/var/lib/mysql
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment