A new topic, 'Overriding current date/time function', has been made on a board
you are watching.
You can see it at
http://liquibase.org/forum/index.php?topic=435.new#new
The text of the topic is shown below:
Hi,
we use Liquibase on Oracle database. Our problem is that Liquibase uses SYSDATE
function as standard function for getting the timestamp of executed change set.
The smallest precision of SYSDATE function is second and we have problems when
multiple changes are done within one second and we issue tag database command.
Then multiple changes are marked with the tag. It even happend that user
applyed more changes with more than one tag database command and the later tag
overwritten the previous tag because all was done in the same second. The
result was that one tag wasn't present in DATABASECHANGELOG table at all! The
user could not rollback to that tag.
Therefore I wanted to find out how to use CURRENT_TIMESTAMP function instead of
SYSDATE function. CURRENT_TIMESTAMP function gives time with fractions of
seconds. I found the parameter -currentDateTimeFunction which should override
the current date/time function, but it doesn't. The method
getCurrentDateTimeFunction() in
liquibase-1.9.5-src/src/java/liquibase/database/OracleDatabase.java class
simply returns "SYSDATE" and doesn't take the parameter
-currentDateTimeFunction into account.
So I suggest the following implementation of getCurrentDateTimeFunction()
method (useful for all supported databases):
public String getCurrentDateTimeFunction() {
if (currentDateTimeFunction == null) {
return "SYSDATE";
} else {
return currentDateTimeFunction;
}
}
This modification allows really to override the current date/time function by
means of parameter -currentDateTimeFunction.
And when the issue http://liquibase.jira.com/browse/CORE-588 is resolved,
overriding will work in command line mode either :-)
Jirka
Unsubscribe to new topics from this board by clicking here:
http://liquibase.org/forum/index.php?action=notifyboard;board=1.0
Regards,
The LiquiBase Community Forum Team.------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Liquibase-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/liquibase-user