Skip to content

Commit

Permalink
Change data type for min and max value in database
Browse files Browse the repository at this point in the history
  • Loading branch information
Trong Le committed Aug 22, 2023
1 parent c2b6896 commit ff35fb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/server/sql/meter/create_meters_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ CREATE TABLE IF NOT EXISTS meters (
default_graphic_unit INTEGER REFERENCES units(id),
area_unit area_unit_type NOT NULL DEFAULT 'none',
reading_frequency INTERVAL NOT NULL DEFAULT '00:15:00',
min_val DOUBLE PRECISION NOT NULL DEFAULT -9007199254740991 CHECK (min_val::DOUBLE PRECISION >= -9007199254740991),
max_val DOUBLE PRECISION NOT NULL DEFAULT 9007199254740991 CHECK (max_val::DOUBLE PRECISION <= 9007199254740991),
min_val FLOAT NOT NULL DEFAULT -9007199254740991 CHECK (min_val::FLOAT >= -9007199254740991),
max_val FLOAT NOT NULL DEFAULT 9007199254740991 CHECK (max_val::FLOAT <= 9007199254740991),
min_date TIMESTAMP NOT NULL DEFAULT '1970-01-01 00:00:00+00:00',
max_date TIMESTAMP NOT NULL DEFAULT '6970-01-01 00:00:00+00:00',
max_error INTEGER NOT NULL DEFAULT 75,
Expand Down
4 changes: 2 additions & 2 deletions src/server/sql/preferences/create_preferences_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ CREATE TABLE IF NOT EXISTS preferences (
default_area_normalization BOOLEAN NOT NULL,
default_area_unit area_unit_type NOT NULL,
default_meter_reading_frequency INTERVAL NOT NULL,
default_meter_minimum_value DOUBLE PRECISION NOT NULL,
default_meter_maximum_value DOUBLE PRECISION NOT NULL,
default_meter_minimum_value FLOAT NOT NULL,
default_meter_maximum_value FLOAT NOT NULL,
default_meter_minimum_date TIMESTAMP NOT NULL,
default_meter_maximum_date TIMESTAMP NOT NULL,
default_meter_reading_gap REAL NOT NULL,
Expand Down

0 comments on commit ff35fb8

Please sign in to comment.