Changeset 492

Show
Ignore:
Timestamp:
05/18/06 11:04:06
Author:
douglm
Message:

Add schema and scheam-export to the runnable dump/restore shell script

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/build.xml

    r394 r492  
    662662  <target name="schema" depends="init" 
    663663          description="Generate schema from mapping files"> 
     664    <echo message="Creating a schema is also available from the generated stand-alone" /> 
     665    <echo message="scripts using the 'schema' or 'schema-export' parameter" /> 
     666 
    664667    <input message="text only? no will update db with new schema " 
    665668           validargs="yes,no" 
  • trunk/calendar3/deployment/dumprestore/shellscr/resources/dumpres.sh

    r463 r492  
    1111DUMPCMD="$JAVA_HOME/bin/java -cp $cp @DUMP-CLASS@" 
    1212RESTORECMD="$JAVA_HOME/bin/java -cp $cp @RESTORE-CLASS@" 
     13SCHEMACMD="$JAVA_HOME/bin/java -cp $cp org.hibernate.tool.hbm2ddl.SchemaExport" 
    1314 
    1415APPNAME=@BW-APP-NAME@ 
     
    3233    $RESTORECMD -appname $APPNAME -f ./data/initbedework.xml -initSyspars 
    3334    ;; 
     35  schema) 
     36    echo $SCHEMACMD --text --create --config=./classes/hibernate.cfg.xml --output=schema.sql 
     37    $SCHEMACMD --text --create --config=./classes/hibernate.cfg.xml --output=schema.sql 
     38    ;; 
     39  schema-export) 
     40    echo $SCHEMACMD --create --config=./classes/hibernate.cfg.xml --output=schema.sql 
     41    $SCHEMACMD --create --config=./classes/hibernate.cfg.xml --output=schema.sql 
     42    ;; 
    3443  *) 
    35     echo $"Usage: $0 {dump <filename>|restore <filename>|backup <directory> <prefix>} || initdb" 
     44    echo $"Usage: $0 {dump <filename> |" 
     45    echo $"           restore <filename> |" 
     46    echo $"           backup <directory> <prefix>} |" 
     47    echo $"           initdb |" 
     48    echo $"           schema |" 
     49    echo $"           schema-export" 
    3650esac 
    3751