28 lines
1.1 KiB
Transact-SQL
28 lines
1.1 KiB
Transact-SQL
IF OBJECT_ID(N'[dbo].[Hr_T_TimesheetPeriod]', 'U') IS NULL
|
|
BEGIN
|
|
CREATE TABLE [dbo].[Hr_T_TimesheetPeriod]
|
|
(
|
|
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
|
|
[TenantId] uniqueidentifier NULL,
|
|
[PeriodYear] int NOT NULL,
|
|
[PeriodMonth] int NOT NULL,
|
|
[Status] nvarchar(16) NOT NULL DEFAULT N'Open',
|
|
[CalculatedAt] datetime2 NULL,
|
|
[ClosedAt] datetime2 NULL,
|
|
[ClosedById] uniqueidentifier NULL,
|
|
[NightlyAt] datetime2 NULL,
|
|
[Note] nvarchar(512) NULL,
|
|
[CreationTime] datetime2 NOT NULL DEFAULT GETUTCDATE(),
|
|
[CreatorId] uniqueidentifier NULL,
|
|
[LastModificationTime] datetime2 NULL,
|
|
[LastModifierId] uniqueidentifier NULL,
|
|
[IsDeleted] bit NOT NULL DEFAULT 0,
|
|
[DeletionTime] datetime2 NULL,
|
|
[DeleterId] uniqueidentifier NULL,
|
|
CONSTRAINT [PK_Hr_T_TimesheetPeriod] PRIMARY KEY NONCLUSTERED
|
|
(
|
|
[Id] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
END
|
|
GO
|