Opened 6 years ago

Closed 2 years ago

#15419 closed Bug (wontfix)

initial sql files need better warnings

Reported by: joel3000 Owned by: marcosmoyano
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 marcosmoyano 5 years ago.
First patch proposal

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 years ago by russellm

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

Agreed that this would be good to catch.

comment:2 Changed 5 years ago by marcosmoyano

  • Owner changed from nobody to marcosmoyano
  • Status changed from new to assigned

Changed 5 years ago by marcosmoyano

First patch proposal

comment:3 Changed 5 years ago by marcosmoyano

Need a way to add tests to it.

comment:4 Changed 5 years ago by marcosmoyano

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 5 years ago by marcosmoyano

  • Has patch set
  • Needs tests set

comment:6 Changed 5 years ago by lrekucki

  • Severity set to Normal
  • Type set to Bug

comment:7 Changed 5 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:8 Changed 5 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:9 Changed 2 years ago by timo

  • Patch needs improvement set
  • Resolution set to wontfix
  • Status changed from assigned to closed

Now that we have migrations, initial SQL is deprecated.

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