Opened 6 years ago

Closed 3 years ago

#15519 closed Bug (duplicate)

Custom SQL location

Reported by: Vlastimil Zíma Owned by: Vlastimil Zíma
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Location of directory with custom sql http://docs.djangoproject.com/en/dev/howto/initial-data/#initial-sql is different if models module is file or directory. This is similar to already fixed #6961.

I will attach a patch that should solve it.

Attachments (1)

patch-15519.diff (1.6 KB) - added by Vlastimil Zíma 6 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by Vlastimil Zíma

Attachment: patch-15519.diff added

comment:1 Changed 5 years ago by Łukasz Rekucki

Severity: Normal
Type: Bug

comment:2 Changed 5 years ago by Jacob

Needs documentation: set
Needs tests: set
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

This is potentially backwards-incompatible, sadly -- if people have SQL in the (previously-incorrect) location it'll silently stop working. Not sure what the best approach here is, but we probably have to look in both places now.

comment:3 in reply to:  2 Changed 5 years ago by Vlastimil Zíma

Replying to jacob:

This is potentially backwards-incompatible, sadly -- if people have SQL in the (previously-incorrect) location it'll silently stop working. Not sure what the best approach here is, but we probably have to look in both places now.

This kind of backwards incompatible change was already done with fixtures location, but it does not mean it needs to be done the same way. Keep both places and mark old one as deprecated seems reasonable.

I can update patch if necessary.

comment:4 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 Changed 4 years ago by Vlastimil Zíma

Created a pull request on github: https://github.com/django/django/pull/747

comment:7 Changed 4 years ago by Vlastimil Zíma

Has patch: set
Needs tests: unset
Owner: changed from nobody to Vlastimil Zíma
Status: newassigned
Version: 1.2master

Pull request is backward-compatible and contains tests. I am not sure about documentation.

comment:8 Changed 3 years ago by Tim Graham

Resolution: duplicate
Status: assignedclosed

Duplicate of #14300 -- the patch there doesn't contain the code for backwards compatibility. It seems like it may be more trouble than it's worth, but I'd like a second opinion.

Note: See TracTickets for help on using tickets.
Back to Top