Hello,
I have a SQL script that creats some triggers on my DB.
I want the script to be executed after all the tables are in place.
I wrote this:
# Create the tables
meta.create_all()
# Now create the triggers
f = open('sql/triggers.sql','r').read()
engine.execute(text(f))
But I get back a ProgrammingError exception describing a syntax error
on "DELIMITER //" (I'm using mysql).
The script is valid and it executes fine if I feed it to mysql. I get
the same error if I try to execute the script line by line in mysql,
so I guess it has something to do with the execution method.
I think that .execute() runs the script line by line, thus triggering
the error. Is there any way to run such script as I do manually? I
tried to find something on the docs but couldn't find anything that
suited.
Thanks in advance for your help!
Cristiano
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---