PRINT N'Altering [dbo].[WAS]...'; GO ALTER TABLE [dbo].[WAS] ADD [NextWasteDisposalPort] NCHAR (5) NULL; GO PRINT N'Creating [dbo].[WAS_RCPT]...'; GO CREATE TABLE [dbo].[WAS_RCPT] ( [Id] UNIQUEIDENTIFIER NOT NULL, [MessageHeaderId] UNIQUEIDENTIFIER NULL, [IdentificationNumber] NVARCHAR (20) NULL, [PortReceptionFacilityName] NVARCHAR (70) NULL, [PortReceptionFacilityProviderName] NVARCHAR (70) NULL, [WasteDeliveryDateFrom] DATETIME NULL, [WasteDeliveryDateTo] DATETIME NULL, PRIMARY KEY CLUSTERED ([Id] ASC) ); GO PRINT N'Creating [dbo].[FK_WAS_RCPT_MessageHeader]...'; GO ALTER TABLE [dbo].[WAS_RCPT] WITH NOCHECK ADD CONSTRAINT [FK_WAS_RCPT_MessageHeader] FOREIGN KEY ([MessageHeaderId]) REFERENCES [dbo].[MessageHeader] ([Id]); GO ALTER TABLE [dbo].[WAS_RCPT] WITH CHECK CHECK CONSTRAINT [FK_WAS_RCPT_MessageHeader]; GO PRINT N'Creating [dbo].[TreatmentFacilityProvider]...'; GO CREATE TABLE [dbo].[TreatmentFacilityProvider] ( [Id] UNIQUEIDENTIFIER NOT NULL, [WAS_RCPTId] UNIQUEIDENTIFIER NULL, [TreatmentFacilityProviderName] NVARCHAR (70) NULL, [Identifier] NVARCHAR (50) NULL, PRIMARY KEY CLUSTERED ([Id] ASC) ); PRINT N'Creating [dbo].[FK_TreatmentFacilityProvider_WAS_RCPT]...'; GO ALTER TABLE [dbo].[TreatmentFacilityProvider] WITH NOCHECK ADD CONSTRAINT [FK_TreatmentFacilityProvider_WAS_RCPT] FOREIGN KEY ([WAS_RCPTId]) REFERENCES [dbo].[WAS_RCPT] ([Id]); GO ALTER TABLE [dbo].[TreatmentFacilityProvider] WITH CHECK CHECK CONSTRAINT [FK_TreatmentFacilityProvider_WAS_RCPT]; GO PRINT N'Creating [dbo].[WasteReceived]...'; GO CREATE TABLE [dbo].[WasteReceived] ( [Id] UNIQUEIDENTIFIER NOT NULL, [WAS_RCPTId] UNIQUEIDENTIFIER NULL, [WasteCode] NCHAR (3) NULL, [WasteDescription] NVARCHAR (256) NULL, [AmountWasteReceived_MTQ] FLOAT (53) NULL, [Identifier] NVARCHAR (50) NULL, PRIMARY KEY CLUSTERED ([Id] ASC) ); GO PRINT N'Creating [dbo].[FK_WasteReceived_WAS_RCPT]...'; GO ALTER TABLE [dbo].[WasteReceived] WITH NOCHECK ADD CONSTRAINT [FK_WasteReceived_WAS_RCPT] FOREIGN KEY ([WAS_RCPTId]) REFERENCES [dbo].[WAS_RCPT] ([Id]); GO ALTER TABLE [dbo].[WasteReceived] WITH CHECK CHECK CONSTRAINT [FK_WasteReceived_WAS_RCPT]; GO PRINT N'Altering [dbo].[CREW]...'; GO ALTER TABLE [dbo].[CREW] ADD [NotificationSchengen] BIT NULL, [NotificationPAX] BIT NULL; GO PRINT N'Altering [dbo].[PAS]...'; GO ALTER TABLE [dbo].[PAS] ADD [NotificationSchengen] BIT NULL, [NotificationPAX] BIT NULL; GO PRINT N'Altering [dbo].[IMDGPosition]...'; GO ALTER TABLE [dbo].[IMDGPosition] ADD [Class7MaxActivity_Unit] TINYINT NULL; GO PRINT N'Altering [dbo].[PAS]...'; GO ALTER TABLE [dbo].[PAS] ADD [EmergencyCare] NVARCHAR (255) NULL, [EmergencyContactNumber] NVARCHAR (99) NULL; GO INSERT INTO ViolationText(ViolationCode, ViolationText) VALUES (33, 'Value is too large') GO Insert into ViolationText(ViolationCode, ViolationText) values (181, 'A notification for crew has to contain at least one of the two options for PAX or Schengen.') Insert into ViolationText(ViolationCode, ViolationText) values (182, 'If a crew notification is for Schengen, then Schengen Details have to be provided, if a crew notification is not for Schengen, Schengen Details must not be provided.') Insert into ViolationText(ViolationCode, ViolationText) values (201, 'A notification for passengers has to contain at least one of the two options for PAX or Schengen.') Insert into ViolationText(ViolationCode, ViolationText) values (202, 'If a passenger notification is for Schengen, then Schengen Details have to be provided, if a passenger notification is not for Schengen, Schengen Details must not be provided.') Insert into ViolationText(ViolationCode, ViolationText) values (203, 'If a passenger notification is for PAX, then PAX Details have to be provided, if a passenger notification is not for PAX, PAX Details must not be provided.') Insert into ViolationText(ViolationCode, ViolationText) values (221, 'The identification number has to be unique per ship call.') Insert into ViolationText(ViolationCode, ViolationText) values (786, 'The provided LOCODE is not accepted by SafeSeaNet.') GO PRINT N'Altering Table [dbo].[CREW]...'; GO ALTER TABLE [dbo].[CREW] ADD [CrewMemberCountryOfBirth] NCHAR (2) NULL; ALTER TABLE [dbo].[CREW] ADD [Effects] NVARCHAR (256) NULL; GO PRINT N'Altering Table [dbo].[PAS]...'; GO ALTER TABLE [dbo].[PAS] ADD [PassengerCountryOfBirth] NCHAR (2) NULL; GO