Files
DP44/DataPRO/Modules/Database/DatabaseMigrationScripts/MigrationScripts/Version98/CreateAnalogDiagnostics_98.sql

29 lines
1.0 KiB
MySQL
Raw Normal View History

2026-04-17 14:55:32 -04:00
CREATE TABLE [dbo].[AnalogDiagnostics](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[DiagnosticRunId] [bigint] NOT NULL,
[Excitation] [float] NULL,
[ExcitationStatus] [smallint] NOT NULL,
[Offset] [float] NULL,
[OffsetStatus] [smallint] NOT NULL,
[ActualRange] [float] NULL,
[ActualRangeStatus] [smallint] NOT NULL,
[Noise] [float] NULL,
[NoiseStatus] [smallint] NOT NULL,
[Shunt] [float] NULL,
[ShuntStatus] [smallint] NOT NULL,
[SensorId] [int] NULL,
[SensorSerialNumber] [nvarchar](50) NOT NULL,
[DASId] [int] NULL,
[DASSerialNumber] [nvarchar](50) NOT NULL,
[DASChannelIdx] [smallint] NOT NULL,
[UserCode] [nvarchar](50) NOT NULL,
[UserChannelName] [nvarchar](50) NOT NULL,
[IsoCode] [nvarchar](50) NOT NULL,
[IsoChannelName] [nvarchar](50) NOT NULL,
[ScaleFactor] [float] NOT NULL,
[CalibrationRecordId] [int] NULL,
[CalibrationRecordXML] [nvarchar](max) NOT NULL,
[Timestamp] [DateTime] NOT NULL,
PRIMARY KEY (Id),
FOREIGN KEY (DiagnosticRunId) REFERENCES DiagnosticRuns(Id)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]