Discussion:
[Modeling-users] mdl_generate_DB_schema.py
Tom Hallman
2004-02-20 19:19:26 UTC
Permalink
Hey all,

I'm having some trouble with the mdl_generate_DB_schema.py script. As I
understand it, the -c (or --stdout) option should send output to stdout, as
opposed to just creating the DB. However, when I run it as such:

--------------------
***@jael:~/Modeling$ ls
mytest.xml
***@serv:~/Modeling$ mdl_generate_DB_schema.py -c mytest.xml

***@serv:~/Modeling$
--------------------

You can see that nothing is getting outputted (as far as I can tell.) Is
this a bug in the script or am I doing something wrong?

~Tom

___________________________________________________________
Tom Hallman DiscipleMakers, Inc
***@dm.org http://www.dm.org/~hallmant
531 Brittany Dr * State College * PA * 16803 * 814-861-4591
Go therefore and make disciples of all nations (Matt 28:19)
Sebastien Bigaret
2004-02-20 19:43:05 UTC
Permalink
Post by Tom Hallman
Hey all,
I'm having some trouble with the mdl_generate_DB_schema.py script. As I
understand it, the -c (or --stdout) option should send output to stdout, as
--------------------
mytest.xml
--------------------
You can see that nothing is getting outputted (as far as I can tell.) Is
this a bug in the script or am I doing something wrong?
You're not doing anything wrong: you need to give a command, ie
something to generate. For example,

***@serv:~/Modeling$ mdl_generate_DB_schema.py -c -TPSF mytest.xml

should give you the sql statements creating the database. See --help for
more options.

BTW you're also right when suggesting this is a bug, the script should
at least inform you that a db-generation command is needed, this will
be fixed in the next release. Thanks for reporting.


Oh, and last: I see you're using a xml model, are you using the ZModeler
or another mean? Did you consider using PyModels instead? Usually
people tend to think PyModels are easier to create and manipulate,
that's why I'm pointing this out, just in case you didn't notice that
option.


-- Sébastien.

Loading...