sozsoft-platform/configs/seeds/sql/object/Mm_T_MaintenanceInstructionDocument.sql
2026-10-18 02:59:45 +03:00

26 lines
No EOL
1.1 KiB
Transact-SQL

IF OBJECT_ID(N'[dbo].[Mm_T_MaintenanceInstructionDocument]', 'U') IS NULL
BEGIN
CREATE TABLE [dbo].[Mm_T_MaintenanceInstructionDocument]
(
[Id] uniqueidentifier NOT NULL DEFAULT NEWID(),
[TenantId] uniqueidentifier NULL,
[MaintenanceInstructionId] uniqueidentifier NOT NULL,
[Name] nvarchar(256) NOT NULL,
[DocumentType] nvarchar(32) NOT NULL DEFAULT 'Other',
[FileContent] nvarchar(MAX) NULL,
[Version] nvarchar(32) NULL,
[IsActive] bit NOT NULL DEFAULT 1,
[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_Mm_T_MaintenanceInstructionDocument] 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