Opened 14 years ago

Closed 11 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

Description

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 14 years ago.
First patch proposal

Download all attachments as: .zip

Change History (10)

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

Agreed that this would be good to catch.

comment:2 by Marcos Moyano, 14 years ago

Owner: changed from nobody to Marcos Moyano
Status: newassigned

by Marcos Moyano, 14 years ago

Attachment: ticket_15419.patch added

First patch proposal

comment:3 by Marcos Moyano, 14 years ago

Need a way to add tests to it.

comment:4 by Marcos Moyano, 14 years ago

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 by Marcos Moyano, 14 years ago

Has patch: set
Needs tests: set

comment:6 by Łukasz Rekucki, 14 years ago

Severity: Normal
Type: Bug

comment:7 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:8 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:9 by Tim Graham, 11 years ago

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