Hi Rene,
I have looked your example.But my example not working.
pom file.
<plugin>
<groupId>solidbase</groupId>
<artifactId>solidbase</artifactId>
<version>2.0.0-beta1</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.16</version>
</dependency>
</dependencies>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<username>test_user</username>
<password>T83c0!90v</password>
<target>1.0.*</target>
<downgradeallowed>true</downgradeallowed>
</configuration>
<executions>
<execution>
<id>f2_main_test</id>
<phase>pre-integration-test</phase>
<goals><goal>upgrade</goal></goals>
<configuration>
<url>jdbc:mysql://localhost:
3306/f2_main_test</url>
<upgradefile>src/main/sql/
f2_biz/f2_main_db_versioning.sql</upgradefile>
</configuration>
</execution>
</executions>
</plugin>
I have set downgradeallowed true.
my f2_main_db_versioning.sql file.
--* ENCODING "ISO-8859-1"
--* // Copyright 2006 René M. de Bloois
--* // Licensed under the Apache License, Version 2.0 (the "License");
--* // you may not use this file except in compliance with the
License.
--* // You may obtain a copy of the License at
--* //
http://www.apache.org/licenses/LICENSE-2.0
--* // Unless required by applicable law or agreed to in writing,
software
--* // distributed under the License is distributed on an "AS IS"
BASIS,
--* // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
--* // See the License for the specific language governing permissions
and
--* // limitations under the License.
--* //
========================================================================
--* DEFINITION
--* SETUP "" --> "1.1"
--* UPGRADE "" --> "1.0.1"
--* UPGRADE "1.0.1" --> "1.0.2"
--* UPGRADE "1.0.2" --> "1.0.3"
--* DOWNGRADE "1.0.3" --> "1.0.1"
--* /DEFINITION
--* SETUP "" --> "1.1"
--* SECTION "Creating SolidBase control tables"
CREATE TABLE DBVERSION
(
VERSION VARCHAR(20),
TARGET VARCHAR(20),
STATEMENTS INTEGER NOT NULL,
SPEC VARCHAR(5) NOT NULL
);
CREATE TABLE DBVERSIONLOG
(
TYPE VARCHAR(1) NOT NULL,
SOURCE VARCHAR(20),
TARGET VARCHAR(20) NOT NULL,
STATEMENT INTEGER NOT NULL,
STAMP TIMESTAMP NOT NULL,
COMMAND VARCHAR(4000),
RESULT VARCHAR(4000)
);
CREATE INDEX DBVERSIONLOG_INDEX1 ON DBVERSIONLOG ( TYPE, TARGET );
--* /SETUP
--* UPGRADE "" --> "1.0.1"
--* SECTION "initial schema setup (should already created using sql
dump) "
--* /UPGRADE
--* UPGRADE "1.0.1" --> "1.0.2"
--* SECTION "Creating table AdgroupDailyRollUp"
--* INCLUDE "upgrade1.0.2.sql"
--* /UPGRADE
--* UPGRADE "1.0.2" --> "1.0.3"
--* SECTION "Creating table Category"
--* INCLUDE "upgrade1.0.3.sql"
--* /UPGRADE
--* DOWNGRADE "1.0.3" --> "1.0.1"
--* SECTION "drop Category"
--* INCLUDE "rollback1.0.3.sql"
--* /DOWNGRADE
I want to go from 1.0.3 to
1.0.1.Is it possible ?
I need to change target property in the pom file.
Thanks
Ajay