by stevepa » Mon Apr 17, 2006 9:01 pm
Backward compatibility should be fine. Earlier versions of Vienna will ignore the extra column in the table.
So.. SELECT index from FOLDERS and UPDATE folders SET index=nn is what you want. Look at the other SQL statements to see the syntax.
I'd be interested in seeing this implementation. You want to be very careful not to hit the database any more than necessary. One thought is to use large values for the initial index (100, 200, etc) and when moving nodes, renumber the inserted node with a value between the nodes it has been inserted between. Then you only need to update the moved nodes.
Later you can do the equivalent of a BASIC 'Renumber' command to even out the spread of indexes.