-- SCHEMA: fp

---------------------------------------------
--  TABLES
---------------------------------------------


---------------------------------------------
-- fp.APAdminPerformanceTest ------------------
---------------------------------------------
DROP TABLE [fp].[APAdminPerformanceTest];
GO

CREATE TABLE [fp].[APAdminPerformanceTest] (
    [TestID] uniqueidentifier NOT NULL,
    [SortOrder] int NOT NULL,
    [TestTypeID] tinyint NOT NULL,
    [TestName] nvarchar(100) NOT NULL,
    [Description] nvarchar(3000) NOT NULL,
    [BudgetConfigID] int NOT NULL,
    [SourceDimensionalityJSON] nvarchar(max) NOT NULL,
    [TestDetailJSON] nvarchar(max) NOT NULL,
    [IsActive] bit NOT NULL,
    [CreatedBy] nvarchar(1000) NOT NULL,
    [Target] int NOT NULL,
    [MaximumTheshold] int NOT NULL,
    [PickableDepartments] nvarchar(max) NOT NULL,
    PRIMARY KEY ([TestID])
);
GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Targe__5375AD4D] DEFAULT ((0)) FOR [Target]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Maxim__5469D186] DEFAULT ((0)) FOR [MaximumTheshold]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Picka__565219F8] DEFAULT ('') FOR [PickableDepartments]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__TestI__6B4249E6] DEFAULT (newid()) FOR [TestID]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__SortO__6C366E1F] DEFAULT ((0)) FOR [SortOrder]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__TestT__6D2A9258] DEFAULT ((0)) FOR [TestTypeID]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__TestN__6E1EB691] DEFAULT ('') FOR [TestName]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Descr__6F12DACA] DEFAULT ('') FOR [Description]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Budge__70FB233C] DEFAULT ((0)) FOR [BudgetConfigID]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Sourc__71EF4775] DEFAULT ('') FOR [SourceDimensionalityJSON]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__TestD__72E36BAE] DEFAULT ('') FOR [TestDetailJSON]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__IsAct__73D78FE7] DEFAULT ((0)) FOR [IsActive]; GO
ALTER TABLE [fp].[APAdminPerformanceTest] ADD CONSTRAINT [DF__APAdminPe__Creat__74CBB420] DEFAULT ('') FOR [CreatedBy]; GO
