Bruce Altner <[EMAIL PROTECTED]> writes:
> Greetings:
>
> I'm sure that this must be a FAQ but I can't find it in the docs anywhere...
>
> What is the recommended practice for adding tables to an already
> established database? Do you go back to the beginning and run ant init
> on the entire (revised) schema so that Torque can create the new Peer
> classes or do you create them manually, using the existing classes as
> a model? The former approach would be easier, I think, but you'd have
> to back up your data.
>
> There is a boolean switch in build.properties called
> "database.manual.creation." If this is set to true does Torque build
> the Peer classes but allow you to add the tables manually, preserving
> your existing tables (and data!)?
Here's the relevant code from the build file:
<target
name="init"
depends="setup-webinf"
description="--> generates the full application">
<antcall target="create-database"/>
<antcall target="schema-sql"/>
<antcall target="idtable-init-sql"/>
<antcall target="security-sql"/>
<antcall target="insert-sql-files"/>
<antcall target="update-tr-props"/>
<antcall target="project-om"/>
<antcall target="compile"/>
</target>
I didn't notice the insert-sql-files gated by the
database.manual.creation property (which could be dangerous). You'll
definitely get your OM/Peer class regenerated. Jason, care to
comment?
Dan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>