Michael,
On 06/09/2010 19:42, Michael Bayer wrote:
On Sep 6, 2010, at 1:23 PM, werner wrote:
Michael,
Thanks for the fast reply.
On 06/09/2010 15:53, Michael Bayer wrote:
engine = create_engine(...)
m = MetaData()
t = Table('foo', m, autoload=True, autoload_with=engine) #<--- boom
The table which errors has the following definition. It seems to have to do with the two columns
MINWITH and MAXWIDTH which have "default -1". FYI, when I change this to '0' and then
back to '-1' it becomes "DEFAULT -1" and doesn't cause the exception anymore.
OK the bug is the SQL has "default -1" and not "DEFAULT -1" and apparently that
comes back to us as lower case. So that's your workaround if possible. Or you can download the
latest default tip where its fixed in r443b974a8013 . I also get the same error using 0.5.
Thanks again for your quick reply.
Don't understand why I didn't get it in 0.5, but anyhow I fix/work
around it by fixing the db.
Werner
Werner
/******************************************************************************/
/* Generated by IBExpert 06/09/2010 19:05:50 */
/******************************************************************************/
/******************************************************************************/
/* Following SET SQL DIALECT is just for the Database Comparer */
/******************************************************************************/
SET SQL DIALECT 3;
/******************************************************************************/
/* Tables */
/******************************************************************************/
CREATE GENERATOR "GEN_LISTCTRL_LISTCTRLID";
CREATE TABLE LISTCTRL (
LISTCTRLID PKEYS NOT NULL /* PKEYS = BIGINT */,
LISTNAME VARCHAR(20) NOT NULL,
COLNUM INTEGER,
DBCOLNAME VARCHAR(100),
COLSIZE INTEGER,
CREATED DATE,
UPDATED DATE,
MINWIDTH INTEGER default -1 NOT NULL,
MAXWIDTH INTEGER default -1 NOT NULL,
FILLSPACE BOOLEAN /* BOOLEAN = SMALLINT DEFAULT 1 */,
GROUPCOL BOOLEAN /* BOOLEAN = SMALLINT DEFAULT 1 */
);
/******************************************************************************/
/* Primary Keys */
/******************************************************************************/
ALTER TABLE LISTCTRL ADD CONSTRAINT FK_LISTCTRL PRIMARY KEY (LISTCTRLID);
/******************************************************************************/
/* Triggers */
/******************************************************************************/
SET TERM ^ ;
/******************************************************************************/
/* Triggers for tables */
/******************************************************************************/
/* Trigger: LISTCTRL_BI0 */
CREATE OR ALTER TRIGGER LISTCTRL_BI0 FOR LISTCTRL
ACTIVE BEFORE INSERT POSITION 0
AS BEGIN
IF(NEW."CREATED" IS NULL) THEN NEW."CREATED" = current_date;
IF(NEW."UPDATED" IS NULL) THEN NEW."UPDATED" = current_date;
IF(NEW."LISTCTRLID" IS NULL) THEN NEW."LISTCTRLID" =
GEN_ID("GEN_LISTCTRL_LISTCTRLID",1);
END
^
/* Trigger: LISTCTRL_BU0 */
CREATE OR ALTER TRIGGER LISTCTRL_BU0 FOR LISTCTRL
ACTIVE BEFORE UPDATE POSITION 0
AS BEGIN
NEW."UPDATED" = current_date;
END
^
SET TERM ; ^
/******************************************************************************/
/* Privileges */
/******************************************************************************/
/* Privileges of users */
GRANT ALL ON LISTCTRL TO MYWINECB;
GRANT SELECT ON LISTCTRL TO MYWINECBREAD;
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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 sqlalch...@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.