Just to get this into the searchable domain in case anyone else runs
into the same errors...

sqlalchemy docs indicate that sqlite "parses foreign key constraints,
but does not enforce them".  So far, so good.  But it doesn't mention
(nor could I find any reference to this in sqlite3's own docs) that
although *named* foreign key constraints do get passed on through,
they will also cause sqlite errors if ill-formed.

test Table definition:

widget_table = Table('widgets', metadata,
    Column('foo', Integer, primary_key=True),
    Column('bar', Integer),
    Column('mergatroid', Integer),
    ForeignKeyConstraint(
        ['bar', 'mergatroid'], ['othertable.bar',
'othertable.mergatroid'],
        name='constraint name of several words'))

^ this will bring Syntax Errors from sqlite.  At first I thought it
was just the length of the name, but it turns out to be the presence
of spaces in the name.  Remove the spaces or replace them with
underscores, and sqlite lets it through.  Of course it's still not
enforcing the constraints; but at least it doesn't complain.

I didn't test much farther than that, but I also found that forward-
slash characters were not accepted in constraint names.

Obviously a minor concern, and why am I even bothering?  Because i'm
stuck in sqlite until I can get psycopg2 working in order to migrate
to postgresql so I can actually USE these constraints.

Cheers.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to