Modify ↓
Ticket #226 (closed defect: fixed)
Sqlite doesn't support app names with underscores in them for column opperations
| Reported by: | caleb_brown@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6.1 |
| Component: | databaseapi | Version: | 0.6 |
| Keywords: | Cc: |
Description
We are using an sqlite3 database.
We ran code like this in a migration:
db.rename_column('app_name_modelname', 'column', 'new_column')
This error was returned:
KeyError: "The model 'name_modelname' from the app 'app' is not available in this migration."
The problem appears to be with the DatabaseOperations::_alter_sqlite_table() method in south.db.sqlite3
In particular, the following line treats only the characters before the first underscore as the app name:
model_name = table_name.replace('_', '.', 1)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

Fixed in [f44c3e3cc52c].