db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Re: How to get a Derby schema.sql so we can build the next DB?
Date Thu, 18 Dec 2008 10:23:52 GMT
Damian Carey wrote:

> How do other people create their Derby schema?
> And how do you "move" those schema to other (new) databases?

We have a file with the DDL necessary to create the database embedded 
inside the application, and the first time the database is started we 
use ij.runScript() to run the script that creates create the new DB.

http://src.opensolaris.org/source/xref/website/auth/AuthDb/src/org/opensolaris/auth/db/DbManager.java,

method createDatabase (line 634).

So we recreate the database schema from fresh rather than copying the 
old one.

-- 
Alan Burlison
--

Mime
View raw message