CREATE TABLE public."BusbarSection" (
    id serial NOT NULL,
    global_uuid uuid NOT NULL,
    busbar_number integer NOT NULL,
    busbar_name character varying(20) default 'Busx' NOT NULL,
    standard_voltage decimal(5, 2) NOT NULL,
    busbar_desc character varying(100) NOT NULL,
    is_service boolean NULL default false,
    status character varying(10) NOT NULL,
    power_grid_name character varying(10) NOT NULL,
    region_name character varying(10) NOT NULL,
    factory_station_name character varying(10) NOT NULL,
    voltage_percent_value decimal(5, 2) default 100 NOT NULL,
    voltage_calculcated_value decimal(5, 2) default 35 NOT NULL,
    phase_angle decimal(5, 2) default 0 NOT NULL,
    rated_current decimal(7, 2) default 1000 NOT NULL,
    dynamic_stable_current decimal(7, 2) default 40 NOT NULL,
    min_load_adjustment_coefficient integer default 100 NOT NULL,
    max_load_adjustment_coefficient integer default 100 NOT NULL,
    busbar_type character varying(10) NOT NULL,
    min_s3_capacities decimal(7, 2) default 0 NOT NULL,
    max_s3_capacities decimal(7, 2) default 0 NOT NULL,
    min_s3_current decimal(7, 2) default 0 NOT NULL,
    max_s3_current decimal(7, 2) default 0 NOT NULL,
    max_z3_impedance decimal(6, 3) default 0.05 NOT NULL,
    min_z3_impedance decimal(6, 3) default 0.1 NOT NULL,
    min_s1_capacity decimal(7, 2) default 0 NOT NULL,
    max_s1_capacity decimal(7, 2) default 0 NOT NULL,
    min_s1_current decimal(7, 2) default 0 NOT NULL,
    max_s1_current decimal(7, 2) default 0 NOT NULL,
    min_z1_impedance decimal(7, 4) default 0 NOT NULL,
    max_z1_impedance decimal(7, 4) default 0 NOT NULL,
    reference_voltage decimal(5, 2) default 37 NOT NULL,
    reference_current decimal(7, 2) default 100 NOT NULL,
    under_voltage_warning_threshold integer default 95 NOT NULL,
    under_voltage_warning_running_time integer default 10 NOT NULL,
    under_voltage_alarm_threshold integer default 90 NOT NULL,
    under_voltage_alarm_running_time integer default 10 NOT NULL,
    over_voltage_warning_threshold integer default 105 NOT NULL,
    over_voltage_warning_running_time integer default 60 NOT NULL,
    over_voltage_alarm_threshold integer default 110 NOT NULL,
    over_voltage_alarm_running_time integer default 10 NOT NULL,
    p_max decimal(7, 2) default 0 NOT NULL,
    q_max decimal(7, 2) default 0 NOT NULL,
    ulim decimal(5, 2) default 90 NOT NULL,
    plim decimal(5, 2) default 30 NOT NULL,
    qlim decimal(5, 2) default 30 NOT NULL,
    measurement_level_current character varying(10) NOT NULL,
    measurement_level_voltage character varying(10) NOT NULL,
    protection_level_current character varying(10) NOT NULL,
    protection_level_voltage_t character varying(10) NOT NULL,
    trend character varying(10) NOT NULL,
    frequency character varying(10) NOT NULL,
    status_measurement_point character varying(10) NOT NULL,
    context jsonb NULL,
    comment character varying(4096) NULL
);

ALTER TABLE
    public."BusbarSection"
ADD
    CONSTRAINT "BusbarSection_pkey" PRIMARY KEY (global_uuid)