diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4dd2e1b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "app/CrustyCookies"] + path = app/CrustyCookies + url = https://git.silversoft.se/Imbus/CrustyCookies.git diff --git a/app/CrustyCookies b/app/CrustyCookies new file mode 160000 index 0000000..be904a7 --- /dev/null +++ b/app/CrustyCookies @@ -0,0 +1 @@ +Subproject commit be904a7ab3925f7bbf3b54126e25480476ae49e8 diff --git a/app/Migrations/0010-tables.sql b/app/Migrations/0010-tables.sql deleted file mode 100644 index 23f64bd..0000000 --- a/app/Migrations/0010-tables.sql +++ /dev/null @@ -1,88 +0,0 @@ -CREATE TABLE IF NOT EXISTS Customers ( - CustomerID int PRIMARY KEY, - Name varchar(100), - Address varchar(255) -); - -CREATE TABLE IF NOT EXISTS Products ( - ProductID int PRIMARY KEY, - Name varchar(100) -); - -CREATE TABLE IF NOT EXISTS Recipes ( - RecipeName varchat(100), - RecipeYear Year, - ingrediences int, - ProductID int, - PRIMARY KEY (RecipeName, RecipeYear), - FOREIGN KEY (ingrediences) REFERENCES ingredience(IngredienceID), - FOREIGN KEY (ProductID) REFERENCES Products(ProductID) -); - -CREATE TABLE IF NOT EXISTS ingredience ( - IngredienceID int PRIMARY KEY, - RawMaterialName varchar(100), - amount int, - unit varchar(50), - FOREIGN KEY (RawMaterialName) REFERENCES RawMaterials(RawMaterialName) -); - -CREATE TABLE IF NOT EXISTS RawMaterials ( - RawMaterialName varchar(100) PRIMARY KEY, - Quantity int, - LastDeliveryDateTime datetime -); - -CREATE TABLE IF NOT EXISTS PalletsProduced ( - PalletID int PRIMARY KEY, - ProductID int, - ProductionDateTime datetime, - FOREIGN KEY (ProductID) REFERENCES Products (ProductID) -); - -CREATE TABLE IF NOT EXISTS PalletsDelivered ( - DeliveredID int PRIMARY KEY, - PalletID int, - DeliveryDateTime datetime, - FOREIGN KEY (PalletID) REFERENCES PalletsProduced (PalletID), - FOREIGN KEY (DeliveredID) REFERENCES Truck (Pallet) -); - -CREATE TABLE IF NOT EXISTS Truck ( - truckId int PRIMARY KEY, - capacity int, - Pallet int -); - -CREATE TABLE IF NOT EXISTS loadingBill ( - LoadingbillID int PRIMARY KEY, - adress varchar(100), - customer varchar(100), - truckID int, - FOREIGN KEY (truckID) REFERENCES Truck (truckId) -); - -CREATE TABLE IF NOT EXISTS Orders ( - OrderID int PRIMARY KEY, - CustomerID int, - ProductID int, - Quantity int, - OrderDateTime datetime, - FOREIGN KEY (CustomerID) REFERENCES Customers (CustomerID), - FOREIGN KEY (ProductID) REFERENCES Products (ProductID) -); - -CREATE TABLE IF NOT EXISTS BlockedProducts ( - BlockedProductID int PRIMARY KEY, - ProductID int, - BlockedDateTime datetime, - FOREIGN KEY (ProductID) REFERENCES Products (ProductID) -); - -CREATE TABLE IF NOT EXISTS PalletTraceability ( - TraceID int PRIMARY KEY, - location varchar(100), - locationdate datetime, - PalletID int, - FOREIGN KEY (PalletID) REFERENCES PalletsProduced (PalletID) -);