If I have a changeset file like so:
Should I not have two tags in my database upon execution?
Currently I only see the last tag in the DATABASECHANGELOG table. Is that how it is supposed to work?
~hf
If I have a changeset file like so:
Should I not have two tags in my database upon execution?
Currently I only see the last tag in the DATABASECHANGELOG table. Is that how it is supposed to work?
~hf
If you run “select * from databasechangelog where tag is not null” what do you get back?
Nathan
I see the same problem too … Here is the content of master.xml
However select * from DATABASECHANGELOG shows the following …
mysql> select * from DATABASECHANGELOG;
±----±-------±----------------------------------------------------------------------------±--------------------±--------------±---------±-----------------------------------±--------------±------------------------------------±-----±----------+
| ID | AUTHOR | FILENAME | DATEEXECUTED | ORDEREXECUTED | EXECTYPE | MD5SUM | DESCRIPTION | TAG | LIQUIBASE |
±----±-------±----------------------------------------------------------------------------±--------------------±--------------±---------±-----------------------------------±--------------±------------------------------------±-----±----------+
| 1 | neel | my-changelog-master.xml | 2011-02-01 18:48:48 | 1 | EXECUTED | 3:c83c182e7796a0b547e2251c7975eb1d | Tag Database | 46.0 | 2.0.0 |
| 2 | neel | db-changelog-1.0.xml | 2011-02-01 18:48:48 | 3 | EXECUTED | 3:90872551b03195302caa87c4c464d8a0 | Rename Column | 46.0 | 2.0.0 |
| 3 | neel | my-changelog-master.xml | 2011-02-01 18:48:48 | 4 | EXECUTED | 3:6cbff2d7852eaa3de230abf82d94928e | Tag Database | 46.0 | 2.0.0 |
| 4 | neel | db-changelog-2.0.xml | 2011-02-01 18:48:49 | 5 | EXECUTED | 3:2ae0a801b37adc2f02366755f4d1326e | Create Table | NULL | 2.0.0 |
±----±-------±----------------------------------------------------------------------------±--------------------±--------------±---------±-----------------------------------±--------------±------------------------------------±-----±----------+
Should’nt I have a tag of 45.0 and 46.0 ? Since all tags are marked with the last tag … I can use rollback only for the first tag.
It is related to http://liquibase.jira.com/browse/CORE-842 which is something that needs to be fixed for 2.0.2.
Basically, liquibasedoes a update tag set tag=? where dateexecuted=(select max(dateexecuted) from databasechangelog). That works, as longa s the newest dateexecuted value doesn’t have multiple rows with the value. This happens when there is a bunch of fast changeSets executed that take less time than the granularity of the dateexecuted datatype. With 2.0, there is now an orderexecuted column we can also order by to make sure that only the most recent row is tagged.
Nathan