Code

Opened 3 years ago

Closed 9 months ago

#15519 closed Bug (duplicate)

Custom SQL location

Reported by: vzima Owned by: vzima
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 vzima 3 years ago.

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by vzima

comment:1 Changed 3 years ago by lrekucki

  • Severity set to Normal
  • Type set to Bug

comment:2 follow-up: Changed 3 years ago by jacob

  • Needs documentation set
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 3 years ago by vzima

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 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 14 months ago by vzima

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

comment:7 Changed 14 months ago by vzima

  • Has patch set
  • Needs tests unset
  • Owner changed from nobody to vzima
  • Status changed from new to assigned
  • Version changed from 1.2 to master

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

comment:8 Changed 9 months ago by timo

  • Resolution set to duplicate
  • Status changed from assigned to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.