Generator script

Greetings,

I am looking for the script which ‘Autogenerates’ the files in lib/RT like
User.pm. What data file is being used for its input?

Also what script is used to generate the various schemas in etc? At the top
of schema.Pg, I see ‘My2Pg 1.23 translated dump’ (for version rt-3.6.3).
What are the others using? or is it by hand? Has anyone tried
SQL::Translator?

Regards,

…Otto

I am looking for the script which ‘Autogenerates’ the files in lib/
RT like
User.pm. What data file is being used for its input?

you want sbin/factory in your RT distribution

Also what script is used to generate the various schemas in etc? At
the top
of schema.Pg, I see ‘My2Pg 1.23 translated dump’ (for version
rt-3.6.3).

I believe that refers to a program called My2Pg version 1.23 that
translates MySQL schemas to Pg schemas. It has since been tweaked.

What are the others using? or is it by hand? Has anyone tried
SQL::Translator?

using for what?

-kevin

I am looking for the script which ‘Autogenerates’ the files in lib/
RT like User.pm. What data file is being used for its input?

you want sbin/factory in your RT distribution

sbin/factory slurps from a mysql db instance of rt.

So do I assume correctly that the schema design process is to make a
change to a db containing an instance of rt, then rev-engr the db
via some tool to make the schema.mysql?

What I’m seeking is “what is the master” for the db schema?
It is either a script which contains ddl which is changed or
it is a running instance of rt which a rev-engr script generates the ddl.

Also what script is used to generate the various schemas in etc? At
the top of schema.Pg, I see ‘My2Pg 1.23 translated dump’ (for version
rt-3.6.3).

I believe that refers to a program called My2Pg version 1.23 that
translates MySQL schemas to Pg schemas. It has since been tweaked.

‘since been tweaked’ … what do you mean, like hand edits?

What are the others using? or is it by hand? Has anyone tried
SQL::Translator?

using for what?

In the ideal world it would seem that there would be a master
definition of the database, say in a neutral format like one used
for SQL::Translator.

From this neutral file, each dialect of db ddl would be generated.
Also from this neutral file, the factory would gain its definitions,
and not from a rt instance running on db which has a dialect of sql.

Another question, are the constraints, as found in constraints.mysql,
an optional item?

Just trying to get a big picture on dev process.

…Otto

I am looking for the script which ‘Autogenerates’ the files in lib/
RT like User.pm. What data file is being used for its input?

you want sbin/factory in your RT distribution

sbin/factory slurps from a mysql db instance of rt.

So do I assume correctly that the schema design process is to make a
change to a db containing an instance of rt, then rev-engr the db
via some tool to make the schema.mysql?

What I’m seeking is “what is the master” for the db schema?

The MySQL schema files are used as the master for generating the base
RT model classes.

Also what script is used to generate the various schemas in etc? At
the top of schema.Pg, I see ‘My2Pg 1.23 translated dump’ (for
version
rt-3.6.3).

I believe that refers to a program called My2Pg version 1.23 that
translates MySQL schemas to Pg schemas. It has since been tweaked.

‘since been tweaked’ … what do you mean, like hand edits?

Yes. Sometime, possibly 5 years ago, my2pg was used to create a first
stub version of the postgres schema. Since that time, all schema
files are handcrafted. We’ve found at least a few cases where we
really want different column types on different platforms.

What are the others using? or is it by hand? Has anyone tried
SQL::Translator?

using for what?

In the ideal world it would seem that there would be a master
definition of the database, say in a neutral format like one used
for SQL::Translator.

Have a look at what we’re doing with Jifty and Jifty::DBI. That’s
likely the direction we’ll end up going with RT as we port oto Jifty.

Another question, are the constraints, as found in constraints.mysql,
an optional item?

They are. Referential integrity is enforced at the application layer.
(And in some cases, we do things like multi-column foreign keys
pointing to different tables which you can’t do with sql-level
constraints)

PGP.sig (186 Bytes)