After investigating further, i have the impression that the problem occurs when models are in different modules (notes.py & users.py in this case) but if the models are in the same module eg. myapp.models.__init__.py, the tables are created.
I'd still like to know why this is happening because i don't intend to put al my models in the same module.. Thanks, On Wed, Mar 30, 2011 at 3:36 PM, 371c <371c....@gmail.com> wrote: > Hi, > > I have the following setup: > > myapp.models.notes.py > Note model defined here using declarative base > > myapp.models.users.py > User model defined here using declarative base > > myapp.models.meta.py > Base and DBSession defined here to avoid circular imports... > > myapp.lib.bootstrap.py > Called to initialize the database with some initial data. The > following is done: > create an engine (sqlite:///notes.db) > call Base.create_all(bind=engine) > > The Base class is the same for the models and the bootstrap.py module, > but i still get a noreferencedtableerror... > > it basically doesn't create the database tables when bootstrap.py is > called.. > > Any ideas ? > > Regards, > > > > > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.