Django

Code

Ticket #2015 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] syncdb initial sql data regexp breaks if empty string is inserted

Reported by: Steven Armstrong Assigned to: adrian
Milestone: Component: Tools
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The regexp sql_expr in management.py:get_sql_initial_data_for_model breaks if the inital sql data inserts empty strings.

e.g. in the sql below, the inserts for field2 and field3 break.

insert into mytable (field1, field2, field3) values ('bla', '', "");

The attached patch fixes that.

Attachments

syncdb_sql-initial-data_allow-empty-string.patch (0.7 kB) - added by anonymous on 05/26/06 18:50:50.

Change History

05/26/06 18:50:50 changed by anonymous

  • attachment syncdb_sql-initial-data_allow-empty-string.patch added.

05/29/06 20:11:27 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [3003]) Fixed #2015 -- Fixed sqlinitialdata regexp to handle empty string insertions. Thanks, Steven Armstrong


Add/Change #2015 ([patch] syncdb initial sql data regexp breaks if empty string is inserted)




Change Properties
Action