36 lines
662 B
SQL
36 lines
662 B
SQL
create type _node_type as enum ('junction', 'reservoir', 'tank');
|
|
|
|
create type _link_type as enum ('pipe', 'pump', 'valve');
|
|
|
|
create type _curve_type as enum ('PUMP', 'EFFICIENCY', 'VOLUME', 'HEADLOSS');
|
|
|
|
create type _region_type as enum ('NONE', 'DMA', 'SA', 'VD', 'WDA');
|
|
|
|
create table _node
|
|
(
|
|
id varchar(32) primary key
|
|
, type _node_type not null
|
|
);
|
|
|
|
create table _link
|
|
(
|
|
id varchar(32) primary key
|
|
, type _link_type not null
|
|
);
|
|
|
|
create table _curve
|
|
(
|
|
id varchar(32) primary key
|
|
, type _curve_type not null
|
|
);
|
|
|
|
create table _pattern
|
|
(
|
|
id varchar(32) primary key
|
|
);
|
|
|
|
create table _region
|
|
(
|
|
id varchar(32) primary key
|
|
, type _region_type not null
|
|
); |