IF NOT EXISTS (SELECT NULL FROM SYS.EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('teleport_battery_power') AND [name] = N'version' AND [minor_id] = 0)
EXEC sys.sp_addextendedproperty
@level1name=N'teleport_battery_power'
ELSE EXEC sys.sp_updateextendedproperty
@level1name=N'teleport_battery_power';
ALTER TABLE teleport_battery_power
recent_setpoint_statistics_min decimal(23,3) DEFAULT NULL,
recent_setpoint_statistics_max decimal(23,3) DEFAULT NULL,
recent_setpoint_statistics_active_power_min decimal(23,3) DEFAULT NULL,
recent_setpoint_statistics_active_power_max decimal(23,3) DEFAULT NULL,
recent_setpoint_statistics_reactive_power_min decimal(23,3) DEFAULT NULL,
recent_setpoint_statistics_reactive_power_max decimal(23,3) DEFAULT NULL,
setpoints_desired_deliver_fcr_modbus_server decimal(23,3) DEFAULT NULL,
setpoints_effective_deliver_fcr decimal(23,3) DEFAULT NULL,
cellular_signal_quality decimal(7,2) DEFAULT NULL;
ALTER TABLE teleport_battery_power_bess_rack
rack_status varchar(32) DEFAULT NULL,
state_of_charge decimal(7,4) DEFAULT NULL,
cell_temperature_min decimal(6,2) DEFAULT NULL,
cell_temperature_cell_id_min int DEFAULT NULL,
cell_temperature_max decimal(6,2) DEFAULT NULL,
cell_temperature_cell_id_max int DEFAULT NULL,
cell_voltage_min decimal(6,3) DEFAULT NULL,
cell_voltage_cell_id_min int DEFAULT NULL,
cell_voltage_max decimal(6,3) DEFAULT NULL,
cell_voltage_cell_id_max int DEFAULT NULL,
cell_voltage_average decimal(6,3) DEFAULT NULL;