Martin,
I've found the reason why the turbine tables don't get an id_table entry during "ant init". The different idtable-init.sql files delete eachother's entries because they are executed in the wrong order. The "id-table-init-sql" task in build-torque.xml generates id_table entries for all schemas, including the turbine schema. The task uses the project.props file to set the $initialID var to 101 and then generates an idtable-init.sql file for each schema. Those generated idtable-init.sql files all start by deleting all ids >= initialID. The problem is that the "project-insert-sql" inserts these files in semi-random order, making the actual number of idtable entries unpredictable. The two solutions I can think of are: - execute the idtable-init.sql files in the correct order (the same order as the id-table-init-sql task, starting with the lowest initialID) or - stop deleting all ids >= initialID A temporary workaround is to generate idtable-init.sql files that only delete their own range of ids like the below example. But this is not foolproof because you run into problems when you start adding tables to your schemas later on. idtable.hypersonic ---------------------------- #set ($maxID = $initialID) #foreach ($tbl in $tables) #set ($maxID = $mxID + 1) #end delete from ID_TABLE where id_table_id >= $initialID and id_table_id < $maxID; #foreach ($tbl in $tables) insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', 100, 10); #set ( $initialID = $initialID + 1 ) #end ----------------------- (The first #foreach is a bit awkward but $tables is an array and I don't know any way to get the size of an array in Velocity) I'm going to look into the two tasks to see if I can make them use the same order... or maybe someone knows a better solution ? Age -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
