Fix: schema-migration
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m5s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m5s
This commit is contained in:
@@ -48,6 +48,16 @@ BEGIN
|
||||
ADD CONSTRAINT FK_Vehicle_TO_Rental FOREIGN KEY (vehicleID) REFERENCES Vehicle (id);
|
||||
END;
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[VehicleCategory]') AND type = 'U')
|
||||
BEGIN
|
||||
CREATE TABLE VehicleCategory (
|
||||
id BIGINT NOT NULL IDENTITY (1, 1),
|
||||
[description] VARCHAR(250) NOT NULL,
|
||||
pricePerDay DECIMAL NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
END;
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Vehicle]') AND type = 'U')
|
||||
BEGIN
|
||||
CREATE TABLE Vehicle (
|
||||
@@ -68,13 +78,4 @@ BEGIN
|
||||
ADD CONSTRAINT FK_VehicleCategory_TO_Vehicle FOREIGN KEY (vehicleCategoryID) REFERENCES VehicleCategory (id);
|
||||
END;
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[VehicleCategory]') AND type = 'U')
|
||||
BEGIN
|
||||
CREATE TABLE VehicleCategory (
|
||||
id BIGINT NOT NULL IDENTITY (1, 1),
|
||||
[description] VARCHAR(250) NOT NULL,
|
||||
pricePerDay DECIMAL NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
END;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user