// ---------------------------------------------------- #foreach($table in $droptables) DROP TABLE $table.name CASCADE CONSTRAINTS; #end // ---------------------------------------------------- #foreach($table in $tables) CREATE TABLE $table.name ( #set( $dec = '' ) #foreach($col in $table.columns) #notnull($nullString $col) #if($col.type=="BLOB") #set($blob=$col.name) #else #set($blob='') #end #set( $dec = "$dec $col.name $col.type$col.printSize() $nullString,$eol" ) #end #if( $table.primaryKey ) #printcols($cols $table.primaryKey.columns) #set( $dec = "$dec PRIMARY KEY ($cols ),$eol" ) #end #foreach($fk in $table.foreignKeys) #set($dec = "$dec FOREIGN KEY ($fk.localKey) REFERENCES $fk.foreignTable ($fk.foreignKey),$eol" ) #end #foreach($index in $table.indices) #if($index.unique) #printcols($cols $index.columns) #set( $dec = "$dec UNIQUE ($cols ),$eol" ) #end #end #set( $dec = $strings.chop($dec,1) ) $dec ) CACHE NOLOGGING#if($blob!='')$eol LOB ($blob) STORE AS (NOCACHE NOLOGGING STORAGE(MAXEXTENTS UNLIMITED))#end; #end