I'm trying migrate from 0.3.10 to 0.4 and there's the following error:
... engine = database.metadata.engine
AttributeError: 'MetaData' object has no attribute 'engine'
I was reading the section "0.3 to 0.4 Migration" of
http://www.sqlalchemy.org/docs/04/intro.html#overview_migration,
but sincerly I didn't understand where engine is rigth now.
---------------------------------------------------------------------
this is my old code:
---------------------------------------------------------------------
from turbogears import database
from sqlalchemy import *
from sqlalchemy.ext.assignmapper import assign_mapper
from sqlalchemy.ext.selectresults import SelectResultsExt
database.bind_meta_data()
session = database.session
engine = database.metadata.engine
context = database.session.context
user=Table('user',database.metadata,
Column('code', Unicode(6),primary_key=True,nullable=False),
Column('name', Unicode(200)),
Column('address', Unicode(200)),
)
Please help me to migrate this code to 0.4.
j