Re: can't modify a column name

2016-07-11 Thread Ofir Herzas
Every developer has his own convention for writing code. For me, it's all lowercase and underscores in table columns so I can't imagine how I could have done it but nevertheless it is what it is... Thank you for the detailed explanation. On Jul 11, 2016 8:57 PM, "Mike Bayer" wrote: > > > On 07/1

Re: can't modify a column name

2016-07-11 Thread Mike Bayer
On 07/11/2016 12:08 PM, Ofir Herzas wrote: It seems that I am wrong since I do see all column names in uppercase using sql developer (all but reserved words) so I don't know how this happened since my models are all lowercase (could it be Base.metadata.create_all?) but that is indeed the proble

Re: can't modify a column name

2016-07-11 Thread Ofir Herzas
It seems that I am wrong since I do see all column names in uppercase using sql developer (all but reserved words) so I don't know how this happened since my models are all lowercase (could it be Base.metadata.create_all?) but that is indeed the problem. Using 'SCOPE' in the alter method does so

Re: can't modify a column name

2016-07-11 Thread Ofir Herzas
For sure the table was not created using capital letters or quotes but I'll try your suggestion, thanks. On Jul 11, 2016 6:02 PM, "Mike Bayer" wrote: > > > On 07/11/2016 10:48 AM, Ofir Herzas wrote: > >> Alembic 0.8.6 >> cx-Oracle 5.1.3 >> SQLAlchemy 1.0.14 >> >> >> I have a column named "scope"

Re: can't modify a column name

2016-07-11 Thread Mike Bayer
On 07/11/2016 10:48 AM, Ofir Herzas wrote: Alembic 0.8.6 cx-Oracle 5.1.3 SQLAlchemy 1.0.14 I have a column named "scope" (without the double quotes) with an existing type of SmallInt and I'm trying to change it to an Integer with the following line: | op.alter_column('t_rule','scope',existing

can't modify a column name

2016-07-11 Thread Ofir Herzas
Alembic 0.8.6 cx-Oracle 5.1.3 SQLAlchemy 1.0.14 I have a column named "scope" (without the double quotes) with an existing type of SmallInt and I'm trying to change it to an Integer with the following line: op.alter_column('t_rule', 'scope', existing_type=sa.SmallInteger(), type_=sa .Integer())