librelist archives

« back to archive

DB problem

DB problem

From:
Damian Kaliszan
Date:
2014-10-03 @ 10:54
Hi,

Could you help me please with the following issue?


(ralph)ralph@blabla~/local/bin$ ralph migrate ralph_assets
Running migrations for ralph_assets:
 - Migrating forwards to 
0016_auto__chg_field_transitionshistory_uid__chg_field_transitionshistory_a.
 > ralph_assets:0011_auto__add_field_assetcategory_slug
FATAL ERROR - The following SQL query failed: 
                SELECT kc.constraint_name, kc.column_name, c.constraint_type
                FROM information_schema.constraint_column_usage AS kc
                JOIN information_schema.table_constraints AS c ON
                    kc.table_schema = c.table_schema AND
                    kc.table_name = c.table_name AND
                    kc.constraint_name = c.constraint_name
                WHERE
                    kc.table_schema = %s AND
                    kc.table_name = %s
            
The error was: no such table: information_schema.constraint_column_usage
Traceback (most recent call last):
  File "/home/ralph/bin/ralph", line 9, in <module>
    load_entry_point('ralph==2.0.1', 'console_scripts', 'ralph')()
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/__main__.py", 
line 56, in main
    execute_from_command_line(sys.argv)
  File 
"/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 443, in execute_from_command_line
    utility.execute()
  File 
"/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py",
line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File 
"/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py",
line 232, in execute
    output = self.handle(*args, **options)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/management/commands/migrate.py",
line 108, in handle
    ignore_ghosts = ignore_ghosts,
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/__init__.py",
line 213, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 235, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations,
database)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 310, in migrate_many
    result = self.migrate(migration, database)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 133, in migrate
    result = self.run(migration)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 107, in run
    return self.run_migration(migration)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 86, in run_migration
    print self.run_migration_error(migration)
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 304, in run_migration_error
    (self.format_backwards(migration), extra_info))
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 291, in format_backwards
    self.backwards(migration)()
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 57, in <lambda>
    return (lambda: direction(orm))
  File 
"/home/ralph/local/lib/python2.7/site-packages/ralph_assets/migrations/0011_auto__add_field_assetcategory_slug.py",
line 101, in backwards
    null=False, db_index=False, primary_key=True, max_length=10))
  File 
"/home/ralph/local/lib/python2.7/site-packages/south/db/sqlite3.py", line 
25, in add_column
    raise ValueError("You cannot add a null=False column without a default
value.")
ValueError: You cannot add a null=False column without a default value.


Best regards,
Damian