Skip to content

Commit

Permalink
Fixed syntax errors in _openPDC.sql script for Postgres.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills committed Nov 2, 2018
1 parent 66dde2e commit 14771eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Data/PostgreSQL/_openPDC.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ CREATE TABLE DataAvailability(
ID SERIAL NOT NULL PRIMARY KEY,
GoodAvailableData DOUBLE PRECISION NOT NULL,
BadAvailableData DOUBLE PRECISION NOT NULL,
TotalAvailableData DOUBLE PRECISION NOT NULL,
TotalAvailableData DOUBLE PRECISION NOT NULL
);

CREATE TABLE AlarmState(
ID SERIAL NOT NULL PRIMARY KEY,
State varchar(50) NULL,
Color varchar(50) NULL,
Color varchar(50) NULL
);

CREATE TABLE AlarmDevice(
ID SERIAL NOT NULL PRIMARY KEY,
DeviceID INTEGER NULL FOREIGN KEY REFERENCES Device(ID),
StateID INTEGER NULL FOREIGN KEY REFERENCES AlarmState(ID),
DeviceID INTEGER NULL,
StateID INTEGER NULL,
TimeStamp TIMESTAMP NULL,
DisplayData varchar(10) NULL,
CONSTRAINT FK_AlarmDevice_Device FOREIGN KEY(DeviceID) REFERENCES Device (ID) ON DELETE CASCADE,
Expand Down

0 comments on commit 14771eb

Please sign in to comment.