if not exists(select* from sys.sysobjects where id = object_id(N'dbo.InventoryScanConfiguration'))
begin
    create table[dbo].[InventoryScanConfiguration] (
        [ID][uniqueidentifier] NOT NULL,
        [ScanType] [int] NOT NULL,
        [IPRange] [nvarchar](256) NULL,
        [PortRange] [nvarchar](50) NULL,
        [StartDateTime] [datetime2] NULL,
        [FrequencyValue] [int] NOT NULL,
        [FrequencyUnit] [int] NOT NULL,
        [Active] [bit] NOT NULL constraint DF_InventoryScanConfiguration_Active default(0),
        [Label] [nvarchar](256) NULL,
        [Domains] [nvarchar](256) NULL,
        [Container] [nvarchar](256) NULL,
        [CreatedDate] [datetime2] NOT NULL,
        [CreatedUsername] [nvarchar](256) NOT NULL,
        [CreatedLoggedUsername] [nvarchar](256) NOT NULL,
        [ModifiedDate] [datetime2] NULL,
        [ModifiedUsername] [nvarchar](256) NOT NULL,
        [ModifiedLoggedUsername] [nvarchar](256) NOT NULL,
        constraint[PK_InventoryScanConfiguration] primary key clustered(ID)
    );
end;