From b82f80906a563741e34aecac537b53c19945a44f Mon Sep 17 00:00:00 2001 From: Salvo Polizzi Date: Thu, 28 Nov 2024 13:52:58 +0100 Subject: Fixed #35038 -- Created AlterConstraint operation. --- docs/ref/migration-operations.txt | 10 ++++++++++ docs/releases/5.2.txt | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index 9e90b78623..b969b3dbfd 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -278,6 +278,16 @@ the model with ``model_name``. Removes the constraint named ``name`` from the model with ``model_name``. +``AlterConstraint`` +------------------- + +.. versionadded:: 5.2 + +.. class:: AlterConstraint(model_name, name, constraint) + +Alters the constraint named ``name`` of the model with ``model_name`` with the +new ``constraint`` without affecting the database. + Special Operations ================== diff --git a/docs/releases/5.2.txt b/docs/releases/5.2.txt index f1ffe07569..2ec90429d0 100644 --- a/docs/releases/5.2.txt +++ b/docs/releases/5.2.txt @@ -259,7 +259,8 @@ Management Commands Migrations ~~~~~~~~~~ -* ... +* The new operation :class:`.AlterConstraint` is a no-op operation that alters + constraints without dropping and recreating constraints in the database. Models ~~~~~~ -- cgit v1.3