Re: [Django] #35006: migrate crashes with db_table_comment added to existing model on SQLite (was: Django db_table_comment with sqlite database)

5 views
Skip to first unread message

Django

unread,
Nov 30, 2023, 3:17:34 AM11/30/23
to django-...@googlegroups.com
#35006: migrate crashes with db_table_comment added to existing model on SQLite
-----------------------------------+------------------------------------
Reporter: Юрий | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: dev
Severity: Release blocker | Resolution:
Keywords: sqlite migrations | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by David Sanders):

The simple fix is to add the `supports_comments` condition to
`AlterModelTableComment.database_forwards()` [1]

A better solution may be to use hooks like we've been doing recently so
that the "supports" decision is centralised and won't be inadvertently
left out anywhere.

[1]https://github.com/django/django/blob/main/django/db/migrations/operations/models.py#L581

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

Reply all
Reply to author
Forward
0 new messages