IF NOT EXISTS (SELECT * FROM sysobjects WHERE name = 'BoothScales')
BEGIN
    CREATE TABLE [dbo].[BoothScales]
    (
        [Id] [INT] IDENTITY(1, 1) NOT NULL,
        [BoothId] [INT] NOT NULL,
        [ScaleNumber] [TINYINT] NOT NULL,
        [ScaleIP] [VARCHAR](15) NULL,
        CONSTRAINT [PK_BoothScales_1]
            PRIMARY KEY CLUSTERED ([ScaleNumber] ASC) ON [PRIMARY],
        CONSTRAINT [IX_BoothScales]
            UNIQUE NONCLUSTERED ([ScaleNumber] ASC)
    ) ON [PRIMARY];
END;