[Django] #34637: Add support for database defaults in questioner.

5 views
Skip to first unread message

Django

unread,
Jun 6, 2023, 8:30:55 AM6/6/23
to django-...@googlegroups.com
#34637: Add support for database defaults in questioner.
-------------------------------------+-------------------------------------
Reporter: Bhuvnesh | Owner: nobody
Type: New | Status: assigned
feature |
Component: Database | Version: 4.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
After the successful merge of [https://github.com/django/django/pull/16092
#16902], fields support database defaults.
As per Lily Foote's suggestion in a
[https://github.com/django/django/pull/16890#discussion_r1214435687
comment], we should ask about setting a database default (`db_default`) in
the questioner.

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

Django

unread,
Jun 6, 2023, 8:32:00 AM6/6/23
to django-...@googlegroups.com
#34637: Add support for database defaults in questioner.
-------------------------------------+-------------------------------------
Reporter: Bhuvnesh | Owner: nobody
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
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 Bhuvnesh):

* version: 4.2 => dev


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

Django

unread,
Jun 6, 2023, 9:21:51 AM6/6/23
to django-...@googlegroups.com
#34637: Add support for database defaults in questioner.
-------------------------------------+-------------------------------------
Reporter: Bhuvnesh | Owner: Bhuvnesh

Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
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 Bhuvnesh):

* owner: nobody => Bhuvnesh


--
Ticket URL: <https://code.djangoproject.com/ticket/34637#comment:2>

Django

unread,
Jun 7, 2023, 12:03:18 AM6/7/23
to django-...@googlegroups.com
#34637: Add support for database defaults in questioner.
-----------------------------+--------------------------------------
Reporter: Bhuvnesh | Owner: Bhuvnesh
Type: New feature | Status: closed
Component: Migrations | Version: dev
Severity: Normal | Resolution: needsinfo

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):

* cc: Lily Foote (added)
* resolution: => needsinfo
* status: assigned => closed
* component: Database layer (models, ORM) => Migrations


Comment:

I'm not sure what that will change 🤔. In migrations we're asking for one-
time temporary default value that we can set on existing rows, not for a
permanent default value, so the current message sounds fine to me. If a
simple default value doesn't work for users, they can choose the 3rd
option: ''"Quit and manually define a default value in models.py."'' and
define `default`/`db_default` in models.

--
Ticket URL: <https://code.djangoproject.com/ticket/34637#comment:3>

Reply all
Reply to author
Forward
0 new messages