From 1374fa64198a12c5756bbd74a4bdde4b4b0fb3fb Mon Sep 17 00:00:00 2001 From: Ilya Gurov Date: Tue, 21 Dec 2021 11:11:37 +0300 Subject: [PATCH 1/2] Update README.md Closes #170 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5927cb35..fb3e857e 100644 --- a/README.md +++ b/README.md @@ -119,9 +119,11 @@ client = Table( spanner_interleave_in="team", spanner_interleave_on_delete_cascade=True, ) +client.add_is_dependent_on(team) client.create(engine) ``` +**Note**: interleaved tables has a dependency between them, which means they must be created in the particular order. If you're creating all the tables at once, use `add_is_dependent_on()` method to set the correct creation order. ### Unique constraints Cloud Spanner doesn't support direct UNIQUE constraints creation. In order to achieve column values uniqueness UNIQUE indexes should be used. From 213bed7244bd8c977a1985b2aea9c496de166696 Mon Sep 17 00:00:00 2001 From: Ilya Gurov Date: Tue, 21 Dec 2021 10:32:02 +0000 Subject: [PATCH 2/2] Update README.md Co-authored-by: skuruppu --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb3e857e..28d09eee 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ client.add_is_dependent_on(team) client.create(engine) ``` -**Note**: interleaved tables has a dependency between them, which means they must be created in the particular order. If you're creating all the tables at once, use `add_is_dependent_on()` method to set the correct creation order. +**Note**: Interleaved tables have a dependency between them, so the parent table must be created before the child table. When creating tables with this feature, make sure to call `add_is_dependent_on()` on the child table to request SQLAlchemy to create the parent table before the child table. ### Unique constraints Cloud Spanner doesn't support direct UNIQUE constraints creation. In order to achieve column values uniqueness UNIQUE indexes should be used.