Skip to content

Commit baa60a6

Browse files
committed
Moving foreign keys and query json into sql api.
1 parent 8bf038d commit baa60a6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

public/_redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
/d1/build-with-d1/use-indexes/ /d1/best-practices/use-indexes/ 301
267267
/d1/build-with-d1/remote-development/ /d1/best-practices/remote-development/ 301
268268
/d1/build-with-d1/local-development/ /d1/best-practices/local-development/ 301
269-
/d1/build-with-d1/foreign-keys/ /d1/best-practices/foreign-keys/ 301
269+
/d1/build-with-d1/foreign-keys/ /d1/sql-api/foreign-keys/ 301
270270
/d1/build-with-d1/query-json/ /d1/sql-api/query-json/ 301
271271
/d1/build-with-d1/use-d1-from-pages/ /d1/best-practices/use-d1-from-pages/ 301
272272
/d1/learning/using-d1-from-pages/ /pages/functions/bindings/#d1-databases 301

src/content/docs/d1/best-practices/import-export-data.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ VALUES
194194

195195
## Foreign key constraints
196196

197-
When importing data, you may need to temporarily disable [foreign key constraints](/d1/best-practices/foreign-keys/). To do so, call `PRAGMA defer_foreign_keys = true` before making changes that would violate foreign keys.
197+
When importing data, you may need to temporarily disable [foreign key constraints](/d1/sql-api/foreign-keys/). To do so, call `PRAGMA defer_foreign_keys = true` before making changes that would violate foreign keys.
198198

199-
Refer to the [foreign key documentation](/d1/best-practices/foreign-keys/) to learn more about how to work with foreign keys and D1.
199+
Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn more about how to work with foreign keys and D1.
200200

201201
## Next Steps
202202

src/content/docs/d1/reference/migrations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ migrations_dir = "<FOLDER_NAME>" # Specify your custom migration directory
4242

4343
## Foreign key constraints
4444

45-
When applying a migration, you may need to temporarily disable [foreign key constraints](/d1/best-practices/foreign-keys/). To do so, call `PRAGMA defer_foreign_keys = true` before making changes that would violate foreign keys.
45+
When applying a migration, you may need to temporarily disable [foreign key constraints](/d1/sql-api/foreign-keys/). To do so, call `PRAGMA defer_foreign_keys = true` before making changes that would violate foreign keys.
4646

47-
Refer to the [foreign key documentation](/d1/best-practices/foreign-keys/) to learn more about how to work with foreign keys and D1.
47+
Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn more about how to work with foreign keys and D1.

src/content/partials/d1/use-pragma-statements.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Toggles the foreign key constraint enforcement. When `PRAGMA foreign_keys` is se
391391

392392
### `PRAGMA defer_foreign_keys = (on|off)`
393393

394-
Allows you to defer the enforcement of [foreign key constraints](/d1/best-practices/foreign-keys/) until the end of the current transaction. This can be useful during [database migrations](/d1/reference/migrations/), as schema changes may temporarily violate constraints depending on the order in which they are applied.
394+
Allows you to defer the enforcement of [foreign key constraints](/d1/sql-api/foreign-keys/) until the end of the current transaction. This can be useful during [database migrations](/d1/reference/migrations/), as schema changes may temporarily violate constraints depending on the order in which they are applied.
395395

396396
This does not disable foreign key enforcement outside of the current transaction. If you have not resolved outstanding foreign key violations at the end of your transaction, it will fail with a `FOREIGN KEY constraint failed` error.
397397

@@ -410,4 +410,4 @@ ALTER TABLE users ...
410410
PRAGMA defer_foreign_keys = off
411411
```
412412

413-
Refer to the [foreign key documentation](/d1/best-practices/foreign-keys/) to learn more about how to work with foreign keys.
413+
Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn more about how to work with foreign keys.

0 commit comments

Comments
 (0)