[sqlalchemy] Creating table with oracle

2011-02-09 Thread Eduardo
Hi,
I want to create the following table:

 Table('Error', metadata,
Column('Type', String),
Column('reference', String),
Column('context', String),
Column ('Timestamp', DateTime, primary_key=True),)

with the oracle DB. I receive this:

sqlalchemy.exc.Error: (DatabaseError) ORA-00910: specified length too
long for its datatype
 '\nCREATE TABLE Error (\n\tType VARCHAR(None CHAR), \n
\treference VARCHAR(None CHAR), \n\tcontext VARCHAR(None CHAR), \n
\tTimestamp DATE\n)\n\n' {}

I tried it with the postgres it works.
Is there any configuration option that makes the oracle accept this
table without changing the given data types?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



Re: [sqlalchemy] Creating table with oracle

2011-02-09 Thread Michael Bayer
String() needs a length with Oracle, MySQL, and several others.


On Feb 9, 2011, at 10:39 AM, Eduardo wrote:

 Hi,
 I want to create the following table:
 
 Table('Error', metadata,
Column('Type', String),
Column('reference', String),
Column('context', String),
Column ('Timestamp', DateTime, primary_key=True),)
 
 with the oracle DB. I receive this:
 
 sqlalchemy.exc.Error: (DatabaseError) ORA-00910: specified length too
 long for its datatype
 '\nCREATE TABLE Error (\n\tType VARCHAR(None CHAR), \n
 \treference VARCHAR(None CHAR), \n\tcontext VARCHAR(None CHAR), \n
 \tTimestamp DATE\n)\n\n' {}
 
 I tried it with the postgres it works.
 Is there any configuration option that makes the oracle accept this
 table without changing the given data types?
 Thanks
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 sqlalchemy group.
 To post to this group, send email to sqlalchemy@googlegroups.com.
 To unsubscribe from this group, send email to 
 sqlalchemy+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sqlalchemy?hl=en.
 

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.