[Django] #33470: no-op sqlmigrate output

11 views
Skip to first unread message

Django

unread,
Jan 29, 2022, 12:45:47 PM1/29/22
to django-...@googlegroups.com
#33470: no-op sqlmigrate output
-----------------------------------------+------------------------
Reporter: David Szotten | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
for migrations that have no effect on the db (e.g. changing `choices`),
`sqlmigrate` still outputs a bunch of text, e.g.


{{{
BEGIN;
--
-- Alter field name on Author
--
COMMIT;
}}}

should we stop doing this?

--
Ticket URL: <https://code.djangoproject.com/ticket/33470>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 31, 2022, 1:16:00 AM1/31/22
to django-...@googlegroups.com
#33470: Avoid SQL comments with descriptions of noop operations in sqlmigrate.
-------------------------------------+-------------------------------------

Reporter: David Szotten | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Migrations | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* type: Uncategorized => Cleanup/optimization
* resolution: => wontfix


Comment:

Thanks for the ticket. I don't see anything wrong in keeping descriptions
of operations for no-ops. It's helpful in confirming that all operations
have been processed by migrations, and in finding out which operations are
no-ops. Also, these comments and generated SQL are on different layers
(migrations vs. schema editor) so it might be difficult to implement. I
don't think it's worth additional complexity.

--
Ticket URL: <https://code.djangoproject.com/ticket/33470#comment:1>

Reply all
Reply to author
Forward
0 new messages