>On Friday, April 22, 2016 at 5:02:17 PM UTC+2, Mike Bayer wrote:
>
>For this one, assuming you're using metadata.create_all() and not an 
>alembic migration, the CreateColumn DDL construct gives you a hook for 
>this kind of thing: 

Thanks for info. Yes, I'm using create_all() but eventually I'll have to 
start using alembic. Are there any problems with using alembic in the 
future while creating initial db schema with create_all()?

>Column('some_col', nullable=False, info={"oracle_not_null": False}) 
>
>then in your @compiles recipe look for column.info['oracle_not_null'] 
>while at the same time looking at compiler.dialect.name == 'oracle'. 

I get it. However as we want this for every autoincrement column I guess we 
can check for already provided "autoincrement" flag and avoid passing 
column.info altogether. Nice.

It seems like this could be used to render IDENTITY keyword for 
autoincrement columns for Oracle 12c which I asked about recently in my 
post titled "Support for Oracle 12c auto increment (IDENTITY) columns?" 
(https://groups.google.com/forum/#!topic/sqlalchemy/Jg_kV6VF0_E).


Regards,
Piotr Dobrogost

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

Reply via email to