45 lines
3.2 KiB
Plaintext
45 lines
3.2 KiB
Plaintext
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DAS]') AND type in (N'U'))
|
|
DROP TABLE [dbo].[DAS]
|
|
GO
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DAS]') AND type in (N'U'))
|
|
BEGIN
|
|
CREATE TABLE [dbo].[DAS](
|
|
[DASId] [int] IDENTITY(1,1) NOT NULL,
|
|
[SerialNumber] [nvarchar](50) NOT NULL,
|
|
[Type] [int] NOT NULL,
|
|
[MaxModules] [int] NULL,
|
|
[MaxMemory] [bigint] NULL,
|
|
[MaxSampleRate] [decimal](18, 0) NULL,
|
|
[MinSampleRate] [decimal](18, 0) NULL,
|
|
[FirmwareVersion] [nvarchar](50) NULL,
|
|
[CalDate] [datetime] NULL,
|
|
[ProtocolVersion] [int] NULL,
|
|
[LastModified] [datetime] NULL,
|
|
[LastModifiedBy] [nvarchar](50) NULL,
|
|
[Version] [int] NOT NULL,
|
|
[LocalOnly] [bit] NULL,
|
|
[LastUsed] [datetime] NULL,
|
|
[LastUsedBy] [nvarchar](50) NULL,
|
|
[Connection] [nvarchar](50) NULL,
|
|
[Channels] [int] NULL,
|
|
[Position] [nvarchar](50) NOT NULL,
|
|
[ChannelTypes] [nvarchar](255) NULL,
|
|
[Reprogramable] [bit] NOT NULL,
|
|
[Reconfigurable] [bit] NOT NULL,
|
|
[IsModule] [bit] NULL,
|
|
[PositionOnDistributor] [smallint] NULL CONSTRAINT [DF_DAS_PositionOnDistributor] DEFAULT ((0)),
|
|
[PositionOnChain] [smallint] NULL CONSTRAINT [DF_DAS_PositionOnChain] DEFAULT ((0)),
|
|
[Port] [smallint] NULL CONSTRAINT [DF_DAS_Port] DEFAULT ((0)),
|
|
[ParentDAS] [nvarchar](50) NULL CONSTRAINT [DF_DAS_ParentDAS] DEFAULT (space((0))),
|
|
CONSTRAINT [PK_DAS] PRIMARY KEY CLUSTERED
|
|
(
|
|
[DASId] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
END
|
|
GO
|