Export to GitHub

django-firebird - issue #1

Testing using Employees.FDB


Posted on May 15, 2008 by Swift Wombat

I have just checked out the latest django trunk build (7535), and followed the instructions on the home page of this site.

When I try to run inspectdb on Employees.FDB, I get the following error:

from django.db import models

class Country(models.Model): Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/usr/lib/python2.5/site-packages/django/core/management/init.py", line 272, in execute_manager utility.execute() File "/usr/lib/python2.5/site-packages/django/core/management/init.py", line 219, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 72, in run_from_argv self.execute(*args, **options.dict) File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 86, in execute output = self.handle(*args, **options) File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 168, in handle return self.handle_noargs(**options) File "/usr/lib/python2.5/site-packages/django/core/management/commands/inspectdb.py", line 10, in handle_noargs for line in self.handle_inspection(): File "/usr/lib/python2.5/site-packages/django/core/management/commands/inspectdb.py", line 42, in handle_inspection indexes = introspection_module.get_indexes(cursor, table_name) File "/usr/lib/python2.5/site-packages/django/db/backends/firebird/introspection.py", line 74, in get_indexes [qn(table_name).strip('"')]) File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", line 21, in execute sql = self.db.ops.last_executed_query(self.cursor, sql, params) File "/usr/lib/python2.5/site-packages/django/db/backends/init.py", line 151, in last_executed_query return smart_unicode(sql) % u_params TypeError: not all arguments converted during string formatting

I am clearly doing something wrong - any ideas? (I am using Employees as a test case before I attempt to inspect a much larger FDB...)

thanks in advance...

Patrick

Comment #1

Posted on Jun 2, 2008 by Quick Bird

inspectdb is not working with Firebird backend now. I don't need this functionality myself therefore I didn't implemented it correctly. You are welcome to participate in this project and add this feature. I just don't have enough time to add/implement features I don't need.

Comment #2

Posted on Aug 11, 2008 by Swift Wombat

Comment deleted

Attachments

Comment #3

Posted on Aug 12, 2008 by Swift Wombat

Hi Ivan - have spend some time today getting inspectdb to work - with some success. One of the the problems I have discovered may be connected with my DB - which is running on FB1.5.

I get the same problems when running against Employees.FDB on FB1.5 as well - the main issue now is the detection of the primary key/Foreign key fields. I see that your code uses all the recommend methods to extract metadata - but to no avail on FB1.5.

I have attached a new version of introspection.py - if you have a FB2.x db to run it against (i dont right now)- it might be interesting.

Also - I'd like to join this project - maybe we can get another db backend into django for v1.0...

thanks...

Patrick http://www.djangodb.org

Attachments

Comment #4

Posted on Dec 11, 2009 by Happy Panda

This issue is prior to django 1.0 release. There are some improvements on introspection and we need new testing to do. I'll close this issue waiting new feedback.

Status: Fixed

Labels:
Type-Defect Priority-Medium