From 4a0b93c451b54a43e4d934d83a0e0957903f3fcb Mon Sep 17 00:00:00 2001 From: Laurence Isla Date: Thu, 8 Feb 2024 14:10:17 -0500 Subject: [PATCH] Fix technical_specs in sample DB using UNIQUE instead of PRIMARY KEY --- docs/references/api/resource_embedding.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/references/api/resource_embedding.rst b/docs/references/api/resource_embedding.rst index 522a614a7..83feb3092 100644 --- a/docs/references/api/resource_embedding.rst +++ b/docs/references/api/resource_embedding.rst @@ -57,11 +57,11 @@ For example, consider a database of films and their awards: language text ); - CREATE TABLE technical_specs( - film_id INT REFERENCES films UNIQUE, - runtime TIME, - camera TEXT, - sound TEXT + create table technical_specs( + film_id int references films(id) primary key, + runtime time, + camera text, + sound text ); create table roles( @@ -216,11 +216,11 @@ One-to-one relationships are detected in two ways. .. code-block:: postgresql - CREATE TABLE technical_specs( - film_id INT REFERENCES films UNIQUE, - runtime TIME, - camera TEXT, - sound TEXT + create table technical_specs( + film_id int references films(id) unique, + runtime time, + camera text, + sound text ); .. code-block:: bash