Re: [Modeling-users] mdl_generate_DB_schema: table creation problem
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2003-03-01 16:00:01
|
Hi,
It must be because INTEGER(20) is invalid -- I get the same error with
postgresql until I replaced it with INTEGER alone.
--> Just remove any 'width' for id and hopefully it will be ok.
> I am feeding a simple (and with only one table) model to
> mdl_generate_DB_schema, that validates and generates python code OK. =
It
> fails with the log below.
Please fill in a bug report: the validation should detect that.
Can someone with a mysql at hand confirm that INTEGER(#) is also inva=
lid for
mysql?
-- S=E9bastien.
Mario Ruggier <ma...@ru...> wrote:
> Hi,
>=20
> I am feeding a simple (and with only one table) model to=20=20
> mdl_generate_DB_schema,
> that validates and generates python code OK. It fails with the log=20=
=20
> below.
> This is running on OSX, with postgres 7.3, pypgsql 2.3, osx 10.2.4 (n=
ew=20=20
> update,
> that has broken some other things...), and modeling 0.9-pre-2.
> Any ideas?
>=20
> Cheers, mario
>=20
>=20
> % mdl_generate_DB_schema.py -T cwText.xml
> Couldn't evaluate expression CREATE TABLE Text (
> fr VARCHAR(400) ,
> en VARCHAR(400) ,
> nl VARCHAR(400) ,
> name VARCHAR(40) NOT NULL,
> pt VARCHAR(400) ,
> de VARCHAR(400) ,
> id INTEGER(20) NOT NULL,
> es VARCHAR(400) ,
> it VARCHAR(400) ). Reason: libpq.OperationalError:ERROR: parser:=
=20=20
> parse error at or near "(" at character 168
>=20
> FAILED to execute: CREATE TABLE Text (
> fr VARCHAR(400) ,
> en VARCHAR(400) ,
> nl VARCHAR(400) ,
> name VARCHAR(40) NOT NULL,
> pt VARCHAR(400) ,
> de VARCHAR(400) ,
> id INTEGER(20) NOT NULL,
> es VARCHAR(400) ,
> it VARCHAR(400) )
> Reason:
> Modeling.Adaptor.GeneralAdaptorException
> Couldn't evaluate expression CREATE TABLE Text (
> fr VARCHAR(400) ,
> en VARCHAR(400) ,
> nl VARCHAR(400) ,
> name VARCHAR(40) NOT NULL,
> pt VARCHAR(400) ,
> de VARCHAR(400) ,
> id INTEGER(20) NOT NULL,
> es VARCHAR(400) ,
> it VARCHAR(400) ). Reason: libpq.OperationalError:ERROR: parser:=
=20=20
> parse error at or near "(" at character 168
>=20
> File "/usr/bin/mdl_generate_DB_schema.py", line 105, in=20=20
> databaseSchemaWithOptions
> channel.evaluateExpression(sqlExpr)
> File=20=20
> "/usr/lib/python2.2/site-packages/Modeling/DatabaseAdaptors/=20
> AbstractDBAPI2AdaptorLayer/AbstractDBAPI2AdaptorChannel.py", line 164=
,=20=20
> in evaluateExpression
> raise GeneralAdaptorException, msg
>=20
>=20
>=20
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Modeling-users mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modeling-users
|