Files
jdescopingtool/NEW/src/JdeScoping.Database/Scripts/006_CreateProfitCenterTable.sql
T
Joseph Doherty 26ff8d9b4f Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/),
new .NET 10 Blazor solution (NEW/), OpenSpec specifications,
documentation, and project configuration.
2026-01-02 07:43:29 -05:00

22 lines
728 B
Transact-SQL

-- Migration: 006_CreateProfitCenterTable
-- Source: OLD/Database/Tables/ProfitCenter.sql
-- Changes: DATETIME -> DATETIME2(7)
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'ProfitCenter' AND schema_id = SCHEMA_ID('dbo'))
BEGIN
CREATE TABLE [dbo].[ProfitCenter]
(
[Code] VARCHAR(12) NOT NULL,
[Description] VARCHAR(40) NULL,
[LastUpdateDT] DATETIME2(7) NOT NULL,
CONSTRAINT [PK_ProfitCenter] PRIMARY KEY CLUSTERED([Code])
);
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE name = 'IX_ProfitCenter_Lookup' AND object_id = OBJECT_ID('dbo.ProfitCenter'))
BEGIN
CREATE INDEX [IX_ProfitCenter_Lookup] ON [dbo].[ProfitCenter] ([Description]);
END
GO