[Rt-devel] generator script

Otto Hirr otto.hirr at olabinc.com
Sun Jul 1 13:48:01 EDT 2007

> > 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.


More information about the Rt-devel mailing list