I'm trying to run an alter_column operation from a Boolean type column to 
SmallInteger on Oracle.

According to the documentation: "...Type changes which are against the 
SQLAlchemy “schema” types Boolean 
<http://www.sqlalchemy.org/docs/core/type_basics.html#sqlalchemy.types.Boolean>
 and Enum 
<http://www.sqlalchemy.org/docs/core/type_basics.html#sqlalchemy.types.Enum> 
may 
also add or drop constraints which accompany those types on backends that 
don’t support them natively. The existing_server_default argument is used 
in this case as well to remove a previous constraint...."

Does this mean that the alter column should work out-of-the-box or do I 
have to remove the constraint myself because I'm getting the following 
error on alembic 0.8.3 (sqlalchemy 1.0.9):

sqlalchemy.exc.CompileError: Can't emit DROP CONSTRAINT for constraint 
CheckConstraint(<sqlalchemy.sql.elements.BinaryExpression object at 
0x28a9b10>, name='_unnamed_', table=Table('t_message', MetaData(bind=None), 
Column('is_bulletin', Boolean(), table=<t_message>), schema=None), 
_create_rule=<sqlalchemy.util.langhelpers.portable_instancemethod object at 
0x289ac68>, _type_bound=True); it has no name


And on a previous version (alembic 0.6.5, sqlalchemy 0.9.7) I got the 
following error:

sqlalchemy.exc.DatabaseError: (DatabaseError) ORA-02443: Cannot drop 
constraint  - nonexistent constraint
 'ALTER TABLE t_message DROP CONSTRAINT None' {}


Your help will be appreciated...

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

Reply via email to