From ec6807ca71fb7444be7d9dd44d7c041e725a466a Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Sat, 29 Feb 2020 14:09:57 -0500 Subject: [PATCH] instead of using SERIAL, use the new IDENTITY column introduced in postgres 10. --- air-quality/schema.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/air-quality/schema.sql b/air-quality/schema.sql index d028097..fc74a4a 100644 --- a/air-quality/schema.sql +++ b/air-quality/schema.sql @@ -5,14 +5,14 @@ CREATE DATABASE airquality; CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE; CREATE TABLE measurement_types ( - parameter_id SERIAL PRIMARY KEY, + parameter_id GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, parameter TEXT NOT NULL, unit TEXT NOT NULL, UNIQUE(parameter, unit) ); CREATE TABLE locations ( - location_id SERIAL PRIMARY KEY, + location_id GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, city_name TEXT NOT NULL, country_name TEXT NOT NULL, location_name TEXT NOT NULL,