#35 ✓resolved
Guilherme Chapiewski

[BUG] db-migrate should check for empty migration files

Reported by Guilherme Chapiewski | March 18th, 2009 @ 06:32 PM | in v1.2.3

db-migrate should check for empty migration files or the user will receive the following cryptic message:

Starting DB migration... - Current version is: 0 - Destination version is: 20090316175710

Starting migration up! *** will run ['20090316163357', '20090316170616', '20090316175710']

===== executing 20090316163357_box_stock.migration (up) ===== Traceback (most recent call last): File "/usr/bin/db-migrate", line 5, in

pkg_resources.run_script('simple-db-migrate==1.2.2', 'db-migrate')

File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 448, in run_script

self.require(requires)[0].run_script(script_name, ns)

File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1173, in run_script

exec script_code in namespace, namespace

File "/usr/bin/db-migrate", line 9, in

File "build/bdist.macosx-10.3-i386/egg/simple_db_migrate/main.py", line 27, in execute File "build/bdist.macosx-10.3-i386/egg/simple_db_migrate/main.py", line 48, in migrate File "build/bdist.macosx-10.3-i386/egg/simple_db_migrate/main.py", line 96, in execute_migrations File "build/bdist.macosx-10.3-i386/egg/simple_db_migrate/mysql.py", line 88, in change File "build/bdist.macosx-10.3-i386/egg/simple_db_migrate/mysql.py", line 45, in _execute mysql_exceptions.OperationalError: (1065, 'Query was empty')

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

simple-db-migrate is a database migration tool inpired on Rails migrations. For more info check the project website: http://guilhermechapiewski.github.com/simple-db-migrate/

People watching this ticket