I'm using django 1.2.1, Python 2.4 and MySQL 5.0 and south 0.7.2
I've got an existing app, aptly named "app" which I'm am trying to convert to south so I can make some DB changes. It seemed to install OK and I get to here. At which point I'm lost. Could it be that Python 2.4 logging is not compatible with south? I'm currently locked in to Python 2.4 to match the release packaged with CentOs. That's a management edict and there's no point in trying to get them to change just because it would make sense.
C:\temp\DjangoSouthRecovery\mds30>python manage.py schemamigration app --auto
? The field 'Facility.FAC_ID' does not have a default specified, yet is NOT NULL.
? Since you are adding this field, you MUST specify a default
? value to use for existing rows. Would you like to:
? 1. Quit now, and add a default to the field in models.py
? 2. Specify a one-off value to use for existing columns now
? Please select a choice: 2
? Please enter Python code for your one-off default value.
? The datetime module is available, so you can do e.g. datetime.date.today()
>>> 'xxx'
+ Added field FAC_ID on app.Facility
Created 0002_auto__add_field_facility_FAC_ID.py. You can now apply this migration with: ./manage.py migrate app
C:\temp\DjangoSouthRecovery\mds30>python manage.py migrate app
Running migrations for app:
- Migrating forwards to 0002_auto__add_field_facility_FAC_ID.
> app:0002_auto__add_field_facility_FAC_ID
Traceback (most recent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File "c:\alltools\python\Lib\site-packages\django\core\management\__init__.py", line 438, in execute_manager
utility.execute()
File "c:\alltools\python\Lib\site-packages\django\core\management\__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\alltools\python\Lib\site-packages\django\core\management\base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "c:\alltools\python\Lib\site-packages\django\core\management\base.py", line 218, in execute
output = self.handle(*args, **options)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\management\commands\migrate.py", line 105, in handle
ignore_ghosts = ignore_ghosts,
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\__init__.py", line 191, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 221, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 292, in migrate_many
result = self.migrate(migration, database)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 125, in migrate
result = self.run(migration)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 98, in run
dry_run.run_migration(migration)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 177, in run_migration
self._run_migration(migration)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 167, in _run_migration
raise exceptions.FailedDryRun(migration, sys.exc_info())
south.exceptions.FailedDryRun: ! Error found during dry run of '0002_auto__add_field_facility_FAC_ID'! Aborting.
Traceback (most recent call last):
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 164, in _run_migration
migration_function()
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\migration\migrators.py", line 57, in <lambda>
return (lambda: direction(orm))
File "C:\temp\DjangoSouthRecovery\mds30\..\mds30\app\migrations\0002_auto__add_field_facility_FAC_ID.py", line 12, in forwards
db.add_column('facility', 'FAC_ID', self.gf('django.db.models.fields.CharField')(default='xxx', max_length=16), keep_default=False)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\db\generic.py", line 269, in add_column
self.execute(sql)
File "c:\alltools\python\lib\site-packages\south-0.7.2-py2.4.egg\south\db\generic.py", line 129, in execute
get_logger().debug('south execute "%s" with params "%s"' % (sql, params), extra={
File "c:\alltools\python\lib\logging\__init__.py", line 918, in debug
apply(self._log, (DEBUG, msg, args), kwargs)
TypeError: _log() got an unexpected keyword argument 'extra'
No comments:
Post a Comment