On May 19, 2010, at 5:34 AM, jose soares wrote:
> Hi all,
>
> I have to create a constraint like this:
>
> CheckConstraint('data_start <= CURRENT_DATE'),
>
> it works for PostgreSQL but it doesn't work for Oracle10.
>
> Is there some workaround to make it compatible with pg and oracle?
Assuming there's a way to create such a CHECK constraint on Oracle, you should
use the DDL() construct with per-dialect instructions for Oracle - and for your
CheckConstraint that works on PG, set it up with an AddConstraint that is
specific to Postgresql.
http://www.sqlalchemy.org/docs/metadata.html#customizing-ddl
--
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.