Hi,
straight from the docs:

engine = create_engine('sqlite:///:memory:')
metadata = MetaData()
user = Table('user', metadata,
    Column('user_id', Integer, primary_key = True),
    Column('user_name', String(16), nullable = False),
    Column('email_address', String(60), key='email'),
    Column('password', String(20), nullable = False))
user_prefs = Table('user_prefs', metadata,
    Column('pref_id', Integer, primary_key=True),
    Column('user_id', Integer, ForeignKey("user.user_id"), nullable=False),
    Column('pref_name', String(40), nullable=False),
    Column('pref_value', String(100)))
SQL 
<http://docs.sqlalchemy.org/en/rel_0_9/core/metadata.html#>metadata.create_all(engine)


http://docs.sqlalchemy.org/en/rel_0_9/core/metadata.html#sqlalchemy.schema.MetaData.create_all


On Saturday, December 6, 2014 11:08:45 PM UTC-8, SF Markus Elfring wrote:
>
> Hello, 
>
> I try to convert a SQLite application to SQLAlchemy 0.9.7 on an openSUSE 
> system. 
>
> I followed the object relational tutorial. 
> Now I stumble on the message "sqlalchemy.exc.OperationalError: 
> (OperationalError) no such table: ...". 
>
> How should I trigger the desired table creation before my data will be 
> inserted there? 
>
> Regards, 
> Markus 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to