/*==============================================================*/
/* DBMS name:      MySQL 5.0                                    */
/* Created on:     2018/12/27 16:45:34                          */
/*==============================================================*/


drop table if exists st_water_available;

drop table if exists st_water_available_estimate;

drop table if exists st_water_consumer;

drop table if exists st_water_consumer_consumption;

drop table if exists st_water_consumption;

drop table if exists st_water_dry_days;

drop table if exists st_water_flood_control_monitoring_station;

drop table if exists st_water_groundwater;

drop table if exists st_water_groundwater_monitoring_station;

drop table if exists st_water_inflow;

drop table if exists st_water_inflow_estimate;

drop table if exists st_water_lake;

drop table if exists st_water_lake_water_level;

drop table if exists st_water_project;

drop table if exists st_water_rainfall;

drop table if exists st_water_rainfall_monitoring_station;

drop table if exists st_water_reservoir;

drop table if exists st_water_reservoir_consumption;

drop table if exists st_water_reservoir_impoundage;

drop table if exists st_water_river;

drop table if exists st_water_river_region;

drop table if exists st_water_river_water_level;

drop table if exists st_water_rural_central_supply_population;

drop table if exists st_water_rural_investment;

drop table if exists st_water_rural_population;

drop table if exists st_water_supply;

drop table if exists st_waterr_rural_project;

/*==============================================================*/
/* Table: st_water_available                                    */
/*==============================================================*/
create table st_water_available
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   water_type           varchar(64) comment '可用水类型',
   water_capacity       decimal(18,2) comment '可用水量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_available comment '可用水';

/*==============================================================*/
/* Table: st_water_available_estimate                           */
/*==============================================================*/
create table st_water_available_estimate
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   water_type           varchar(64) comment '可用水类型',
   water_capacity       decimal(18,2) comment '可用水量',
   submit_time          datetime comment '提交时间',
   estimate_year        int comment '预计时间（年）',
   estimate_month       int comment '预计时间（月）',
   estimate_day         int comment '预计时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_available_estimate comment '可用水预计';

/*==============================================================*/
/* Table: st_water_consumer                                     */
/*==============================================================*/
create table st_water_consumer
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   consumer_type        varchar(64) comment '用户类型',
   consumer_industry    varchar(255) comment '用户行业',
   consumer_name        varchar(255) comment '用户名称',
   consumer_code        varchar(64) comment '用户编码',
   consumer_description varchar(255) comment '用户描述',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_consumer comment '取水用户';

/*==============================================================*/
/* Table: st_water_consumer_consumption                         */
/*==============================================================*/
create table st_water_consumer_consumption
(
   id                   bigint not null auto_increment comment '主键',
   consumer_id          bigint comment '取水用户ID',
   consumption          decimal(18,2) comment '用水量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_consumer_consumption comment '用户用水量';

/*==============================================================*/
/* Table: st_water_consumption                                  */
/*==============================================================*/
create table st_water_consumption
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   consumption_type     varchar(64) comment '用水类型',
   consumption          decimal(18,2) comment '用水量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_consumption comment '用水量';

/*==============================================================*/
/* Table: st_water_dry_days                                     */
/*==============================================================*/
create table st_water_dry_days
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   dry_days             int comment '干旱天数',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_dry_days comment '干旱天数';

/*==============================================================*/
/* Table: st_water_flood_control_monitoring_station             */
/*==============================================================*/
create table st_water_flood_control_monitoring_station
(
   id                   bigint not null auto_increment comment '主键',
   parent_id            bigint comment '上级ID',
   parent_code          varchar(64) comment '上级编码',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   station_type         varchar(64) comment '监测站类型',
   station_level        varchar(64) comment '监测站级别',
   station_name         varchar(255) comment '监测站名称',
   station_code         varchar(64) comment '监测站编码',
   station_description  varchar(255) comment '监测站描述',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_flood_control_monitoring_station comment '防汛抗旱监测站';

/*==============================================================*/
/* Table: st_water_groundwater                                  */
/*==============================================================*/
create table st_water_groundwater
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   station_id           bigint comment '监测站ID',
   groundwater_type     varchar(64) comment '供水类型',
   groundwater_level    decimal(18,2) comment '水位',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_groundwater comment '地下水';

/*==============================================================*/
/* Table: st_water_groundwater_monitoring_station               */
/*==============================================================*/
create table st_water_groundwater_monitoring_station
(
   id                   bigint not null auto_increment comment '主键',
   parent_id            bigint comment '上级ID',
   parent_code          varchar(64) comment '上级编码',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   station_type         varchar(64) comment '监测站类型',
   station_name         varchar(255) comment '监测站名称',
   station_code         varchar(64) comment '监测站编码',
   station_description  varchar(255) comment '监测站描述',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_groundwater_monitoring_station comment '地下水监测站';

/*==============================================================*/
/* Table: st_water_inflow                                       */
/*==============================================================*/
create table st_water_inflow
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   water_type           varchar(64) comment '来水类型',
   water_quantity       decimal(18,2) comment '来水量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_inflow comment '来水';

/*==============================================================*/
/* Table: st_water_inflow_estimate                              */
/*==============================================================*/
create table st_water_inflow_estimate
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   water_type           varchar(64) comment '来水类型',
   water_quantity       decimal(18,2) comment '来水量',
   submit_time          datetime comment '提交时间',
   estimate_year        int comment '预计时间（年）',
   estimate_month       int comment '预计时间（月）',
   estimate_day         int comment '预计时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_inflow_estimate comment '来水预计';

/*==============================================================*/
/* Table: st_water_lake                                         */
/*==============================================================*/
create table st_water_lake
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   lake_type            varchar(64) comment '湖泊类型',
   lake_name            varchar(255) comment '湖泊名称',
   lake_code            varchar(255) comment '湖泊编码',
   lake_description     varchar(255) comment '湖泊描述',
   lake_area            decimal(18,2) comment '湖泊面积',
   lake_impoundage      decimal(18,2) comment '湖泊蓄水量',
   lake_chief           varchar(255) comment '湖长',
   water_level_normal   decimal(18,2) comment '正常水位',
   water_level_warning  decimal(18,2) comment '警戒水位',
   water_level_dead     decimal(18,2) comment '死水位',
   water_quality        varchar(64) comment '水质',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_lake comment '湖泊';

/*==============================================================*/
/* Table: st_water_lake_water_level                             */
/*==============================================================*/
create table st_water_lake_water_level
(
   id                   bigint not null auto_increment comment '主键',
   lake_id              bigint not null comment '湖泊ID',
   water_level          decimal(18,2) comment '水位',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_lake_water_level comment '湖泊水位';

/*==============================================================*/
/* Table: st_water_project                                      */
/*==============================================================*/
create table st_water_project
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   project_type         varchar(64) comment '工程类型',
   project_name         varchar(255) comment '工程名称',
   project_code         varchar(64) comment '工程编码',
   project_description  varchar(255) comment '工程描述',
   project_chief        varchar(255) comment '工程主管',
   project_address      varchar(255) comment '地址',
   longitude            decimal(10,7) comment '经度',
   latitude             decimal(10,7) comment '纬度',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_project comment '工程（水）';

/*==============================================================*/
/* Table: st_water_rainfall                                     */
/*==============================================================*/
create table st_water_rainfall
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   station_id           bigint comment '监测站ID',
   rainfall_type        varchar(64) comment '降雨类型',
   rainfall             decimal(18,2) comment '降雨量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_rainfall comment '降雨量';

/*==============================================================*/
/* Table: st_water_rainfall_monitoring_station                  */
/*==============================================================*/
create table st_water_rainfall_monitoring_station
(
   id                   bigint not null comment '主键',
   parent_id            bigint comment '上级ID',
   parent_code          varchar(64) comment '上级编码',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   station_type         varchar(64) comment '监测站类型',
   station_name         varchar(255) comment '监测站名称',
   station_code         varchar(64) comment '监测站编码',
   station_description  varchar(255) comment '监测站描述',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_rainfall_monitoring_station comment '降雨监测站';

/*==============================================================*/
/* Table: st_water_reservoir                                    */
/*==============================================================*/
create table st_water_reservoir
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   reservoir_type       varchar(64) comment '水库类型',
   reservoir_name       varchar(255) comment '水库名称',
   reservoir_code       varchar(64) comment '水库编码',
   reservoir_description varchar(255) comment '水库描述',
   reservoir_area       decimal(18,2) comment '水库面积',
   reservoir_depth      decimal(18,2) comment '水库深度',
   reservoir_impoundage decimal(18,2) comment '水库蓄水量（最大）',
   reservoir_chief      varchar(255) comment '水库主管',
   impoundage_normal    decimal(18,2) comment '正常水量',
   impoundagel_warning  decimal(18,2) comment '警戒水量',
   impoundage_dead      decimal(18,2) comment '死水量',
   water_level_normal   decimal(18,2) comment '正常水位',
   water_level_warning  decimal(18,2) comment '警戒水位',
   water_level_dead     decimal(18,2) comment '死水位',
   water_quality        varchar(64) comment '水质',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_reservoir comment '水库';

/*==============================================================*/
/* Table: st_water_reservoir_consumption                        */
/*==============================================================*/
create table st_water_reservoir_consumption
(
   id                   bigint not null comment '主键',
   reservoir_id         bigint comment '水库ID',
   consumption          decimal(18,2) comment '用水量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_reservoir_consumption comment '水库用水量';

/*==============================================================*/
/* Table: st_water_reservoir_impoundage                         */
/*==============================================================*/
create table st_water_reservoir_impoundage
(
   id                   bigint not null auto_increment comment '主键',
   reservoir_id         bigint not null comment '湖泊ID',
   impoundage           decimal(18,2) comment '蓄水量',
   impoundage_usable    decimal(18,2) comment '可用水量',
   water_level          decimal(18,2) comment '水位',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_reservoir_impoundage comment '水库蓄水量';

/*==============================================================*/
/* Table: st_water_river                                        */
/*==============================================================*/
create table st_water_river
(
   id                   bigint not null auto_increment comment '主键',
   river_type           varchar(64) comment '河流类型',
   river_name           varchar(255) comment '河流名称',
   river_code           varchar(255) comment '河流编码',
   river_description    varchar(255) comment '河流描述',
   river_length         decimal(18,2) comment '河流长度',
   start_stop_point     varchar(255) comment '起止点',
   flow_through         varchar(255) comment '流经',
   river_impoundage     decimal(18,2) comment '河流蓄水量',
   river_chief          varchar(255) comment '河长',
   water_level_normal   decimal(18,2) comment '正常水位',
   water_level_warning  decimal(18,2) comment '警戒水位',
   water_level_dead     decimal(18,2) comment '死水位',
   water_quality        varchar(64) comment '水质',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_river comment '河流';

/*==============================================================*/
/* Table: st_water_river_region                                 */
/*==============================================================*/
create table st_water_river_region
(
   id                   bigint not null auto_increment comment '主键',
   river_id             bigint comment '河流ID',
   region_id            bigint comment '地区ID',
   sequence_num         bigint comment '序号',
   primary key (id)
);

alter table st_water_river_region comment '河流地区关联';

/*==============================================================*/
/* Table: st_water_river_water_level                            */
/*==============================================================*/
create table st_water_river_water_level
(
   id                   bigint not null auto_increment comment '主键',
   river_id             bigint not null comment '河流ID',
   water_level          decimal(18,2) comment '水位',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_river_water_level comment '河流水位';

/*==============================================================*/
/* Table: st_water_rural_central_supply_population              */
/*==============================================================*/
create table st_water_rural_central_supply_population
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   population_type      varchar(64) comment '类型',
   population_name      varchar(255) comment '名称',
   population_code      varchar(64) comment '编码',
   population_size      decimal(18,2) comment '数量',
   population_chief     varchar(255) comment '主管',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_rural_central_supply_population comment '农村集中供水受益人口';

/*==============================================================*/
/* Table: st_water_rural_investment                             */
/*==============================================================*/
create table st_water_rural_investment
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   investment_type      varchar(64) comment '类型',
   investment_name      varchar(255) comment '名称',
   investment_code      varchar(64) comment '编码',
   investment_amount    decimal(18,2) comment '金额',
   investment_chief     varchar(255) comment '主管',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_rural_investment comment '农村水利投资';

/*==============================================================*/
/* Table: st_water_rural_population                             */
/*==============================================================*/
create table st_water_rural_population
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   population_type      varchar(64) comment '类型',
   population_name      varchar(255) comment '名称',
   population_code      varchar(64) comment '编码',
   population_size      decimal(18,2) comment '数量',
   population_chief     varchar(255) comment '主管',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_rural_population comment '农村人口';

/*==============================================================*/
/* Table: st_water_supply                                       */
/*==============================================================*/
create table st_water_supply
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   supply_type          varchar(64) comment '供水类型',
   supply_quantity      decimal(18,2) comment '供水量',
   capture_time         datetime comment '采集时间',
   capture_year         int comment '采集时间（年）',
   capture_month        int comment '采集时间（月）',
   capture_day          int comment '采集时间（日）',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_water_supply comment '供水量';

/*==============================================================*/
/* Table: st_waterr_rural_project                               */
/*==============================================================*/
create table st_waterr_rural_project
(
   id                   bigint not null auto_increment comment '主键',
   region_id            bigint comment '地区ID',
   region_code          varchar(64) comment '地区编码',
   project_type         varchar(64) comment '工程类型',
   project_name         varchar(255) comment '工程名称',
   project_code         varchar(64) comment '工程编码',
   project_description  varchar(255) comment '工程描述',
   project_chief        varchar(255) comment '工程主管',
   remark               varchar(255) comment '备注',
   created_at           datetime comment '创建时间',
   created_by           varchar(255) comment '创建人',
   deleted_at           datetime comment '删除时间',
   deleted_by           varchar(255) comment '删除人',
   primary key (id)
);

alter table st_waterr_rural_project comment '农村水利工程';

alter table st_water_consumer_consumption add constraint FK_st_water_consumer_consumption_st_water_consumer foreign key (consumer_id)
      references st_water_consumer (id) on delete restrict on update restrict;

alter table st_water_groundwater add constraint FK_st_water_groundwater_st_water_groundwater_monitoring_station foreign key (station_id)
      references st_water_groundwater_monitoring_station (id) on delete restrict on update restrict;

alter table st_water_lake_water_level add constraint FK_st_water_lake_water_level_st_water_lake foreign key (lake_id)
      references st_water_lake (id) on delete restrict on update restrict;

alter table st_water_rainfall add constraint FK_st_water_rainfall_st_water_rainfall_monitoring_station foreign key (station_id)
      references st_water_rainfall_monitoring_station (id) on delete restrict on update restrict;

alter table st_water_rainfall_monitoring_station add constraint FK_st_water_rainfall_monitoring_station_monitoring_station foreign key (id)
      references st_water_flood_control_monitoring_station (id) on delete restrict on update restrict;

alter table st_water_reservoir_consumption add constraint FK_st_water_reservoir_consumption_st_water_reservoir foreign key (reservoir_id)
      references st_water_reservoir (id) on delete restrict on update restrict;

alter table st_water_reservoir_impoundage add constraint FK_st_water_dam_impoundage_st_water_dam foreign key (reservoir_id)
      references st_water_reservoir (id) on delete restrict on update restrict;

alter table st_water_river_region add constraint FK_st_water_river_region_st_water_river foreign key (river_id)
      references st_water_river (id) on delete restrict on update restrict;

alter table st_water_river_water_level add constraint FK_st_water_river_water_level_st_water_river foreign key (river_id)
      references st_water_river (id) on delete restrict on update restrict;

