diff --git a/00-backend/datasource/database.sqlite b/00-backend/datasource/database.sqlite index c7b4312..0f14074 100644 Binary files a/00-backend/datasource/database.sqlite and b/00-backend/datasource/database.sqlite differ diff --git a/00-backend/src/main/java/de/htwsaar/webshop/repository/entities/Article.java b/00-backend/src/main/java/de/htwsaar/webshop/repository/entities/Article.java index 84c9c76..0b2eb0d 100644 --- a/00-backend/src/main/java/de/htwsaar/webshop/repository/entities/Article.java +++ b/00-backend/src/main/java/de/htwsaar/webshop/repository/entities/Article.java @@ -30,7 +30,7 @@ public class Article { private Integer stock; @Min(0) - @Column(name = "stockExpected", nullable = false) + @Column(name = "stock_expected", nullable = false) private Integer stockExpected; @Column(name = "name", nullable = false) diff --git a/00-backend/src/main/resources/db/initdb.sql b/00-backend/src/main/resources/db/initdb.sql index db42d94..c756f24 100644 --- a/00-backend/src/main/resources/db/initdb.sql +++ b/00-backend/src/main/resources/db/initdb.sql @@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS Articles id INTEGER PRIMARY KEY NOT NULL, uuid TEXT UNIQUE NOT NULL, -- UUID stock INTEGER NOT NULL DEFAULT 0, - stockExpected INTEGER NOT NULL DEFAULT 100, + stock_expected INTEGER NOT NULL DEFAULT 100, name TEXT NOT NULL, description TEXT NULL, --in html price100 INTEGER NOT NULL, -- in cents @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Articles category TEXT NULL, CONSTRAINT c_stock CHECK ( stock >= 0 ), - CONSTRAINT c_stockExpected CHECK ( stockExpected >= 0 ), --inactive in current version + CONSTRAINT c_stockExpected CHECK ( stock_expected >= 0 ), --inactive in current version CONSTRAINT c_discount100 CHECK ( discount100 IS NULL OR 0 <= discount100 AND discount100 <= 100 ) --inactive in current version );