summaryrefslogtreecommitdiff
path: root/lib/query/tests
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-18 20:24:52 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-18 21:57:48 +0100
commit62123e577ee5d4066d53f8ad7e5ac3d2eb190430 (patch)
treef569686630681a9eceb2685f69b55fe5a2bac17c /lib/query/tests
parent7087a0c2c84e796e474784cbd28d4a4e574cf2c0 (diff)
Securized the queries in the database with a dedicated type for the Identifiers
Diffstat (limited to 'lib/query/tests')
-rw-r--r--lib/query/tests/create.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/query/tests/create.t b/lib/query/tests/create.t
index 6ba48c3..38a4630 100644
--- a/lib/query/tests/create.t
+++ b/lib/query/tests/create.t
@@ -69,7 +69,7 @@ A subcontent is linked to the parent:
CREATE TABLE "details"
( "parent" INTEGER NOT NULL
, "id" INTEGER PRIMARY KEY
- , FOREIGN KEY("parent") REFERENCES entity("id") )
+ , FOREIGN KEY("parent") REFERENCES "entity"("id") )
A reference field is declared as a foreign key to the linked element
@@ -109,7 +109,7 @@ A reference field is declared as a foreign key to the linked element
( "id" INTEGER PRIMARY KEY
, "user_type" INTEGER
, "name" VARCHAR
- , FOREIGN KEY("user_type") REFERENCES user_type_list("id") )
+ , FOREIGN KEY("user_type") REFERENCES "user_type_list"("id") )
When the field is multivaluated, there is no column for this property in the
table but a dedicated table is created:
@@ -146,5 +146,6 @@ table but a dedicated table is created:
( "id" INTEGER PRIMARY KEY
, "parent" INTEGER NOT NULL
, "target" INTEGER NOT NULL
- , FOREIGN KEY("parent") REFERENCES entity("id")
- , FOREIGN KEY("target") REFERENCES user_type_list("id") )
+ , FOREIGN KEY("parent") REFERENCES "entity"("id")
+ , FOREIGN KEY("target") REFERENCES "user_type_list"("id") )
+