

PRINT N'Creating [dbo].[WASExemption] if missing...';
GO
IF OBJECT_ID(N'dbo.WASExemption', N'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[WASExemption] (
        [Id] UNIQUEIDENTIFIER NOT NULL,
        [IMO] NCHAR (7) NOT NULL,
        [ShipName] NVARCHAR (100) NULL,
        [Port] NCHAR (5) NOT NULL,
        [ValidUntil] DATETIME NOT NULL,
        [Remarks] NVARCHAR (255) NULL,
        PRIMARY KEY CLUSTERED ([Id] ASC)
    );
    PRINT N'Table [dbo].[WASExemption] created.';
END
GO


PRINT N'Creating [dbo].[HazardMaterial] if missing...';
GO
IF OBJECT_ID(N'dbo.HazardMaterial', N'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[HazardMaterial] (
        [Id] UNIQUEIDENTIFIER NOT NULL,
        [Description] NVARCHAR (100) NULL,
        [Hazard_Enum] INT NULL,
        [FP] NVARCHAR (100) NULL,
        [FP_Enum] INT NULL,
        [15_19] NVARCHAR (100) NULL,
        [Typ] NVARCHAR (100) NULL,
        [IMSBC] NVARCHAR (100) NULL,
        [MHB] NVARCHAR (100) NULL,
        [IMSBC_MHB] INT NULL,
        [Group] NVARCHAR (100) NULL,
        [IMSBC_HAZ] INT NULL,
        [UN_Nr] NVARCHAR (100) NULL,
        [IMO_CL] NVARCHAR (100) NULL,
        [IBC] NVARCHAR (100) NULL,
        [Pollution_Category_Enum] INT NULL,
        [MARPOL] NVARCHAR (100) NULL,
        [IGC] NVARCHAR (100) NULL,
        [FP_IBC] NVARCHAR (100) NULL,
        [Remarks] NVARCHAR (255) NULL,
        PRIMARY KEY CLUSTERED ([Id] ASC)
    );
    PRINT N'Table [dbo].[HazardMaterial] created.';
END
GO

PRINT N'Creating [dbo].[LADG_NST2007] if missing...';
GO
IF OBJECT_ID(N'dbo.LADG_NST2007', N'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[LADG_NST2007] (
        [Id] UNIQUEIDENTIFIER NOT NULL,
        [Description] NVARCHAR (100) NULL,
        [NST2007] NCHAR (3) NOT NULL,        
        PRIMARY KEY CLUSTERED ([Id] ASC)
    );
    PRINT N'Table [dbo].[LADG_NST2007] created.';
END
GO