Opened 8 years ago

Closed 5 years ago

#15419 closed Bug (wontfix)

initial sql files need better warnings

Reported by: joel3000 Owned by: Marcos Moyano
Component: Database layer (models, ORM) Version: 1.2
Severity: Normal Keywords: initial sql
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no


I develop on a Mac and deploy on linux. On mac the initial sql files (app/sql/<modelname>.sql) are case insensitive. Since I had a model called FooBar I made a sql file called "FooBar.sql". This is fine on mac.

But then when I got around to deploying on linux, syncdb ignored my FooBar.sql because it was looking only
for foobar.sql. It raised no warnings.

It would be nice to either explicitly make those files load case insensitive or to pass warnings about
unrecognized files in that directory.

Attachments (1)

ticket_15419.patch (1.2 KB) - added by Marcos Moyano 8 years ago.
First patch proposal

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

Agreed that this would be good to catch.

comment:2 Changed 8 years ago by Marcos Moyano

Owner: changed from nobody to Marcos Moyano
Status: newassigned

Changed 8 years ago by Marcos Moyano

Attachment: ticket_15419.patch added

First patch proposal

comment:3 Changed 8 years ago by Marcos Moyano

Need a way to add tests to it.

comment:4 Changed 8 years ago by Marcos Moyano

Apparently, based on what it says on #14661 we can't rely on SQL-injecting initial data in a test case.
Any idea if there's a way to test this?

comment:5 Changed 8 years ago by Marcos Moyano

Has patch: set
Needs tests: set

comment:6 Changed 8 years ago by Łukasz Rekucki

Severity: Normal
Type: Bug

comment:7 Changed 7 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:8 Changed 7 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:9 Changed 5 years ago by Tim Graham

Patch needs improvement: set
Resolution: wontfix
Status: assignedclosed

Now that we have migrations, initial SQL is deprecated.

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