From 16a8f3fcd6b33dd2d735f70c7efaf504aec6e178 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..d5a406b 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 INT 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 INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, city_name TEXT NOT NULL, country_name TEXT NOT NULL, location_name TEXT NOT NULL,