Browse Source

Add unique constraint on current_conditions.site_id

master
Chimo 2 years ago
parent
commit
63551a24dc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      private/src/scripts/create_table.php

+ 1
- 1
private/src/scripts/create_table.php View File

@ -31,7 +31,7 @@ $dbh->query('CREATE INDEX idx_site_location ON site USING GIST(location)');
$query = <<<SQL
CREATE TABLE current_conditions(
id serial primary key,
site_id integer REFERENCES site(id),
site_id integer REFERENCES site(id) unique,
humidity varchar(12),
condition varchar(191),
temperature varchar(12),


Loading…
Cancel
Save