From fef9675714cfba1756df4719b5e36075a7ddf90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Devrim=20G=C3=BCnd=C3=BCz?= Date: Tue, 13 Dec 2022 10:02:13 +0000 Subject: [PATCH] Add PK to payment table, per #23. --- pagila-schema.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pagila-schema.sql b/pagila-schema.sql index eff6d5b..23718a3 100644 --- a/pagila-schema.sql +++ b/pagila-schema.sql @@ -740,7 +740,8 @@ CREATE TABLE public.payment ( staff_id integer NOT NULL, rental_id integer NOT NULL, amount numeric(5,2) NOT NULL, - payment_date timestamp with time zone NOT NULL + payment_date timestamp with time zone NOT NULL, + PRIMARY KEY (payment_date, payment_id) ) PARTITION BY RANGE (payment_date);