From 105ebff731c569073c3b7b09a3dc428b64bccc6a Mon Sep 17 00:00:00 2001 From: Dan Fuller Date: Wed, 30 Apr 2025 17:25:00 -0700 Subject: [PATCH] FK Database docs --- .../backend/application-domains/database-migrations/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/backend/application-domains/database-migrations/index.mdx b/develop-docs/backend/application-domains/database-migrations/index.mdx index 2d141229f9de8..4baefa0e10839 100644 --- a/develop-docs/backend/application-domains/database-migrations/index.mdx +++ b/develop-docs/backend/application-domains/database-migrations/index.mdx @@ -419,7 +419,7 @@ This second PR will contain only the migration and related boilerplate. ### Foreign Keys -Creating foreign keys is mostly fine, but for some large/busy tables like `Project`, `Group` it can cause problems due to difficulties in acquiring a lock. You can still create a Django level foreign key though, without creating a database constraint. To do so, set `db_constraint=False` when defining the key. +Creating foreign keys is mostly fine, but for some large/busy tables like `Project` and `Group` the migration can fail due to difficulties in acquiring a lock on the table. The general procedure here is to retry the migration until it goes through - The migration framework adds a lock acquisition timeout, so it's safe to do this. ### Renaming Tables