diff --git a/webgoat-container/src/main/resources/db/container/V1__init.sql b/webgoat-container/src/main/resources/db/container/V1__init.sql index 176eef387..b4c3727f7 100644 --- a/webgoat-container/src/main/resources/db/container/V1__init.sql +++ b/webgoat-container/src/main/resources/db/container/V1__init.sql @@ -1,6 +1,8 @@ -CREATE SCHEMA CONTAINER; +-- This statement is here the schema is always created even if we use Flyway directly like in test-cases +-- For the normal WebGoat server there is a bean which already provided the schema (and creates it see DatabaseInitialization) +CREATE SCHEMA IF NOT EXISTS CONTAINER; -CREATE SEQUENCE CONTAINER.HIBERNATE_SEQUENCE AS INTEGER START WITH 1; +CREATE SEQUENCE CONTAINER.HIBERNATE_SEQUENCE; CREATE TABLE CONTAINER.ASSIGNMENT ( ID BIGINT NOT NULL PRIMARY KEY, diff --git a/webgoat-lessons/sql-injection/src/main/resources/db/migration/V2019_09_26_7__employees.sql b/webgoat-lessons/sql-injection/src/main/resources/db/migration/V2019_09_26_7__employees.sql index 2ea974f4d..089d00b03 100644 --- a/webgoat-lessons/sql-injection/src/main/resources/db/migration/V2019_09_26_7__employees.sql +++ b/webgoat-lessons/sql-injection/src/main/resources/db/migration/V2019_09_26_7__employees.sql @@ -14,7 +14,7 @@ INSERT INTO employees VALUES ('34477','Abraham ', 'Holman', 'Development', 5000 INSERT INTO employees VALUES ('37648','John', 'Smith', 'Marketing', 64350, '3SL99A'); CREATE TABLE access_log ( - id int not null primary key identity, + id int not null primary key, time varchar(50), action varchar(200) );