From af08a5441585393b287535b9417436b896bd8052 Mon Sep 17 00:00:00 2001 From: Akash Agrawal Date: Sun, 11 Aug 2019 06:56:44 +0530 Subject: [PATCH] Fixed #30670 -- Doc'd SchemaEditor.add/remove_constraint(). --- AUTHORS | 1 + docs/ref/schema-editor.txt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/AUTHORS b/AUTHORS index 8df700a3e9..8486283a33 100644 --- a/AUTHORS +++ b/AUTHORS @@ -27,6 +27,7 @@ answer newbie questions, and generally made Django that much better: Ahmad Al-Ibrahim Ahmed Eltawela ajs + Akash Agrawal Akis Kesoglou Aksel Ethem Akshesh Doshi diff --git a/docs/ref/schema-editor.txt b/docs/ref/schema-editor.txt index 1edbeb93af..20cd59ad6a 100644 --- a/docs/ref/schema-editor.txt +++ b/docs/ref/schema-editor.txt @@ -81,6 +81,24 @@ Adds ``index`` to ``model``’s table. Removes ``index`` from ``model``’s table. +``add_constraint()`` +-------------------- + +.. method:: BaseDatabaseSchemaEditor.add_constraint(model, constraint) + +.. versionadded:: 2.2 + +Adds ``constraint`` to ``model``'s table. + +``remove_constraint()`` +----------------------- + +.. method:: BaseDatabaseSchemaEditor.remove_constraint(model, constraint) + +.. versionadded:: 2.2 + +Removes ``constraint`` from ``model``'s table. + ``alter_unique_together()`` ---------------------------