Migrated to GPL v3 and robertvokac.com
This commit is contained in:
parent
2622f0b6cf
commit
1add28e475
6
CREDITS
6
CREDITS
@ -9,8 +9,8 @@
|
|||||||
----------
|
----------
|
||||||
|
|
||||||
N: Robert Vokac
|
N: Robert Vokac
|
||||||
E: robertvokac@nanoboot.org
|
E: robertvokac@robertvokac.com
|
||||||
W: https://nanoboot.org
|
W: https://robertvokac.com
|
||||||
P: 4096R/E3329055 322B D109 0AA8 C324 EA9C 72F5 693D 30BE E332 9055
|
P: 4096R/C459E1E4 255C 69CC 1D09 CA54 EF0C C9DF FB9C E8E2 0AAD A55F
|
||||||
D: Founder
|
D: Founder
|
||||||
S: Czech Republic
|
S: Czech Republic
|
||||||
|
@ -23,12 +23,12 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.nanoboot.tools.dbmigration</groupId>
|
<groupId>com.robertvokac.tools.dbmigration</groupId>
|
||||||
<artifactId>db-migration</artifactId>
|
<artifactId>db-migration</artifactId>
|
||||||
<version>0.1.1-SNAPSHOT</version>
|
<version>0.1.1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.nanoboot.tools.dbmigration</groupId>
|
<groupId>com.robertvokac.tools.dbmigration</groupId>
|
||||||
<artifactId>db-migration-core</artifactId>
|
<artifactId>db-migration-core</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>org.nanoboot.dbmigration.core.main.DBMigration</mainClass>
|
<mainClass>com.robertvokac.dbmigration.core.main.DBMigration</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
<descriptorRefs>
|
<descriptorRefs>
|
||||||
@ -151,17 +151,17 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- Power dependencies -->
|
<!-- Power dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.powerframework</groupId>
|
<groupId>com.robertvokac.powerframework</groupId>
|
||||||
<artifactId>power-time</artifactId>
|
<artifactId>power-time</artifactId>
|
||||||
<version>${power.version}</version>
|
<version>${power.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.powerframework</groupId>
|
<groupId>com.robertvokac.powerframework</groupId>
|
||||||
<artifactId>power-core</artifactId>
|
<artifactId>power-core</artifactId>
|
||||||
<version>${power.version}</version>
|
<version>${power.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.powerframework</groupId>
|
<groupId>com.robertvokac.powerframework</groupId>
|
||||||
<artifactId>power-security</artifactId>
|
<artifactId>power-security</artifactId>
|
||||||
<version>${power.version}</version>
|
<version>${power.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
@ -203,7 +203,7 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.tools.dbmigration</groupId>
|
<groupId>com.robertvokac.tools.dbmigration</groupId>
|
||||||
<artifactId>db-migration-test-jar</artifactId>
|
<artifactId>db-migration-test-jar</artifactId>
|
||||||
<version>${dbmigration.version}</version>
|
<version>${dbmigration.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
|
@ -2,22 +2,23 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.configuration;
|
package com.robertvokac.dbmigration.core.configuration;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -25,11 +26,11 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class Configuration {
|
public class Configuration {
|
@ -2,32 +2,33 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.configuration;
|
package com.robertvokac.dbmigration.core.configuration;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
@ -2,26 +2,27 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.configuration;
|
package com.robertvokac.dbmigration.core.configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class ConfigurationKeys {
|
public class ConfigurationKeys {
|
@ -2,22 +2,23 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.entity;
|
package com.robertvokac.dbmigration.core.entity;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -26,13 +27,13 @@ import lombok.Data;
|
|||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.nanoboot.dbmigration.core.main.MigrationType;
|
import com.robertvokac.dbmigration.core.main.MigrationType;
|
||||||
import org.nanoboot.dbmigration.core.utils.DBMigrationUtils;
|
import com.robertvokac.dbmigration.core.utils.DBMigrationUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
@ -2,22 +2,23 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -32,23 +33,23 @@ import java.util.UUID;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.nanoboot.dbmigration.core.configuration.Configuration;
|
import com.robertvokac.dbmigration.core.configuration.Configuration;
|
||||||
import org.nanoboot.dbmigration.core.configuration.ConfigurationEntry;
|
import com.robertvokac.dbmigration.core.configuration.ConfigurationEntry;
|
||||||
import org.nanoboot.dbmigration.core.configuration.ConfigurationKeys;
|
import com.robertvokac.dbmigration.core.configuration.ConfigurationKeys;
|
||||||
import org.nanoboot.dbmigration.core.entity.DBMigrationSchemaHistory;
|
import com.robertvokac.dbmigration.core.entity.DBMigrationSchemaHistory;
|
||||||
import org.nanoboot.dbmigration.core.resources.SqlFile;
|
import com.robertvokac.dbmigration.core.resources.SqlFile;
|
||||||
import org.nanoboot.dbmigration.core.persistence.api.DBMigrationPersistence;
|
import com.robertvokac.dbmigration.core.persistence.api.DBMigrationPersistence;
|
||||||
import org.nanoboot.dbmigration.core.query.DBMigrationSchemaHistoryTable;
|
import com.robertvokac.dbmigration.core.query.DBMigrationSchemaHistoryTable;
|
||||||
import org.nanoboot.dbmigration.core.resources.FileSystemSqlFileProvider;
|
import com.robertvokac.dbmigration.core.resources.FileSystemSqlFileProvider;
|
||||||
import org.nanoboot.dbmigration.core.resources.ResourcesSqlFileProvider;
|
import com.robertvokac.dbmigration.core.resources.ResourcesSqlFileProvider;
|
||||||
import org.nanoboot.dbmigration.core.resources.SqlFileVersion;
|
import com.robertvokac.dbmigration.core.resources.SqlFileVersion;
|
||||||
import org.nanoboot.powerframework.time.duration.StopWatch;
|
import com.robertvokac.powerframework.time.duration.StopWatch;
|
||||||
import org.nanoboot.powerframework.time.moment.UniversalDateTime;
|
import com.robertvokac.powerframework.time.moment.UniversalDateTime;
|
||||||
import org.nanoboot.powerframework.time.utils.TimeUnit;
|
import com.robertvokac.powerframework.time.utils.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigration {
|
public class DBMigration {
|
||||||
@ -109,7 +110,7 @@ public class DBMigration {
|
|||||||
private final Configuration configuration;
|
private final Configuration configuration;
|
||||||
private final DBMigrationPersistence persistence;
|
private final DBMigrationPersistence persistence;
|
||||||
|
|
||||||
//validate -datasource.jdbc-url=jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3 -name=testDev -sql-dialect=sqlite -sql-migrations-directory=/home/robertvokac/Desktop/testDev/ -installed-by=robertvokac -sql-dialect-impl-class=org.nanoboot.dbmigration.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl
|
//validate -datasource.jdbc-url=jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3 -name=testDev -sql-dialect=sqlite -sql-migrations-directory=/home/robertvokac/Desktop/testDev/ -installed-by=robertvokac -sql-dialect-impl-class=com.robertvokac.dbmigration.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
LOG.info("*** DB Migration ***");
|
LOG.info("*** DB Migration ***");
|
||||||
LOG.info("DB Migration main static method has just started.");
|
LOG.info("DB Migration main static method has just started.");
|
||||||
@ -132,11 +133,11 @@ public class DBMigration {
|
|||||||
configuration.addAndAddPrefixIfNeeded(ConfigurationEntry.ofArgument(arg));
|
configuration.addAndAddPrefixIfNeeded(ConfigurationEntry.ofArgument(arg));
|
||||||
}
|
}
|
||||||
DBMigration dBMigration = new DBMigration(configuration);
|
DBMigration dBMigration = new DBMigration(configuration);
|
||||||
//info -datasource.jdbc-url=jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3 -name=testDev -sql-dialect=sqlite -sql-migrations-directory=/home/robertvokac/Desktop/testDev/ -installed-by=robertvokac -sql-dialect-impl-class=org.nanoboot.dbmigration.core.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl
|
//info -datasource.jdbc-url=jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3 -name=testDev -sql-dialect=sqlite -sql-migrations-directory=/home/robertvokac/Desktop/testDev/ -installed-by=robertvokac -sql-dialect-impl-class=com.robertvokac.dbmigration.core.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl
|
||||||
// DBMigration dBMigration = DBMigration.configure()
|
// DBMigration dBMigration = DBMigration.configure()
|
||||||
// .dataSource("jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3")
|
// .dataSource("jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3")
|
||||||
// .name("testDev")
|
// .name("testDev")
|
||||||
// .sqlDialect("sqlite", "org.nanoboot.dbmigration.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl")
|
// .sqlDialect("sqlite", "com.robertvokac.dbmigration.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl")
|
||||||
// .sqlMigrationsDirectory("/home/robertvokac/Desktop/testDev/")
|
// .sqlMigrationsDirectory("/home/robertvokac/Desktop/testDev/")
|
||||||
// .installedBy("robertvokac")
|
// .installedBy("robertvokac")
|
||||||
// .load();
|
// .load();
|
@ -0,0 +1,44 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public class DBMigrationException extends RuntimeException {
|
||||||
|
|
||||||
|
public DBMigrationException(String msg, Exception ex) {
|
||||||
|
super(msg, ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBMigrationException(String msg) {
|
||||||
|
super(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBMigrationException(Exception ex) {
|
||||||
|
super(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -17,11 +17,11 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public enum DBMigrationTarget {
|
public enum DBMigrationTarget {
|
@ -0,0 +1,31 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public enum MigrationResult {
|
||||||
|
SUCCESS, FAILURE;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public enum MigrationType {
|
||||||
|
SQL, JAVA;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public enum RepairResult {
|
||||||
|
SUCCESS, FAILURE;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.core.main;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public class SqlMigration {
|
||||||
|
|
||||||
|
}
|
@ -2,30 +2,31 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.persistence.api;
|
package com.robertvokac.dbmigration.core.persistence.api;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.nanoboot.dbmigration.core.configuration.Configuration;
|
import com.robertvokac.dbmigration.core.configuration.Configuration;
|
||||||
import org.nanoboot.dbmigration.core.entity.DBMigrationSchemaHistory;
|
import com.robertvokac.dbmigration.core.entity.DBMigrationSchemaHistory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public interface DBMigrationPersistence {
|
public interface DBMigrationPersistence {
|
@ -2,22 +2,23 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.persistence.impl.base;
|
package com.robertvokac.dbmigration.core.persistence.impl.base;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
@ -32,17 +33,17 @@ import java.util.UUID;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.nanoboot.dbmigration.core.configuration.Configuration;
|
import com.robertvokac.dbmigration.core.configuration.Configuration;
|
||||||
import org.nanoboot.dbmigration.core.entity.DBMigrationSchemaHistory;
|
import com.robertvokac.dbmigration.core.entity.DBMigrationSchemaHistory;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.nanoboot.dbmigration.core.main.MigrationType;
|
import com.robertvokac.dbmigration.core.main.MigrationType;
|
||||||
import org.nanoboot.dbmigration.core.persistence.api.DBMigrationPersistence;
|
import com.robertvokac.dbmigration.core.persistence.api.DBMigrationPersistence;
|
||||||
import org.nanoboot.dbmigration.core.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl;
|
import com.robertvokac.dbmigration.core.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl;
|
||||||
import org.nanoboot.dbmigration.core.query.DBMigrationSchemaHistoryTable;
|
import com.robertvokac.dbmigration.core.query.DBMigrationSchemaHistoryTable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public abstract class DBMigrationPersistenceBase implements DBMigrationPersistence {
|
public abstract class DBMigrationPersistenceBase implements DBMigrationPersistence {
|
@ -2,34 +2,35 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.persistence.impl.sqlite;
|
package com.robertvokac.dbmigration.core.persistence.impl.sqlite;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.nanoboot.dbmigration.core.entity.DBMigrationSchemaHistory;
|
import com.robertvokac.dbmigration.core.entity.DBMigrationSchemaHistory;
|
||||||
import org.nanoboot.dbmigration.core.persistence.impl.base.DBMigrationPersistenceBase;
|
import com.robertvokac.dbmigration.core.persistence.impl.base.DBMigrationPersistenceBase;
|
||||||
import org.nanoboot.dbmigration.core.query.DBMigrationSchemaHistoryTable;
|
import com.robertvokac.dbmigration.core.query.DBMigrationSchemaHistoryTable;
|
||||||
import org.nanoboot.dbmigration.core.persistence.api.DBMigrationPersistence;
|
import com.robertvokac.dbmigration.core.persistence.api.DBMigrationPersistence;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigrationPersistenceSqliteImpl extends DBMigrationPersistenceBase implements DBMigrationPersistence {
|
public class DBMigrationPersistenceSqliteImpl extends DBMigrationPersistenceBase implements DBMigrationPersistence {
|
@ -2,26 +2,27 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.query;
|
package com.robertvokac.dbmigration.core.query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigrationSchemaHistoryTable {
|
public class DBMigrationSchemaHistoryTable {
|
@ -2,34 +2,35 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import static org.nanoboot.dbmigration.core.utils.DBMigrationUtils.readTextFromFile;
|
import static com.robertvokac.dbmigration.core.utils.DBMigrationUtils.readTextFromFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public final class FileSystemSqlFileProvider implements SqlFileProvider {
|
public final class FileSystemSqlFileProvider implements SqlFileProvider {
|
@ -2,22 +2,23 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -37,12 +38,12 @@ import java.util.List;
|
|||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.nanoboot.dbmigration.core.utils.DBMigrationConstants;
|
import com.robertvokac.dbmigration.core.utils.DBMigrationConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public final class ResourcesSqlFileProvider implements SqlFileProvider {
|
public final class ResourcesSqlFileProvider implements SqlFileProvider {
|
@ -2,29 +2,30 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.nanoboot.dbmigration.core.utils.DBMigrationUtils;
|
import com.robertvokac.dbmigration.core.utils.DBMigrationUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
@ -2,34 +2,35 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.nanoboot.dbmigration.core.utils.DBMigrationUtils;
|
import com.robertvokac.dbmigration.core.utils.DBMigrationUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
@ -0,0 +1,38 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public interface SqlFileProvider {
|
||||||
|
|
||||||
|
List<SqlFile> provide(String path, Class<?> clazz);
|
||||||
|
|
||||||
|
default List<SqlFile> provide(String path) {
|
||||||
|
return provide(path, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -2,22 +2,23 @@
|
|||||||
// db-migration: A database schema versioning tool.
|
// db-migration: A database schema versioning tool.
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This program is free software: you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU General Public License
|
||||||
// License as published by the Free Software Foundation;
|
// as published by the Free Software Foundation, either version 3
|
||||||
// version 2.1 of the License only.
|
// of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// Lesser General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU General Public License
|
||||||
// License along with this library; if not, write to the Free Software
|
// along with this program. If not, see
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -26,7 +27,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
@ -17,11 +17,11 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.utils;
|
package com.robertvokac.dbmigration.core.utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigrationConstants {
|
public class DBMigrationConstants {
|
@ -17,7 +17,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.utils;
|
package com.robertvokac.dbmigration.core.utils;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
@ -25,14 +25,14 @@ import java.io.FileReader;
|
|||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import org.nanoboot.powerframework.security.hash.locator.HashCalculatorLocator;
|
import com.robertvokac.powerframework.security.hash.locator.HashCalculatorLocator;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.nanoboot.powerframework.security.hash.locator.HashImpl;
|
import com.robertvokac.powerframework.security.hash.locator.HashImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigrationUtils {
|
public class DBMigrationUtils {
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
module dbmigration.core {
|
module dbmigration.core {
|
||||||
@ -31,5 +31,5 @@ module dbmigration.core {
|
|||||||
requires powerframework.security;
|
requires powerframework.security;
|
||||||
requires org.apache.logging.log4j;
|
requires org.apache.logging.log4j;
|
||||||
requires org.apache.logging.log4j.core;
|
requires org.apache.logging.log4j.core;
|
||||||
exports org.nanoboot.dbmigration.core.main;
|
exports com.robertvokac.dbmigration.core.main;
|
||||||
}
|
}
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public class DBMigrationException extends RuntimeException {
|
|
||||||
|
|
||||||
public DBMigrationException(String msg, Exception ex) {
|
|
||||||
super(msg, ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DBMigrationException(String msg) {
|
|
||||||
super(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DBMigrationException(Exception ex) {
|
|
||||||
super(ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public enum MigrationResult {
|
|
||||||
SUCCESS, FAILURE;
|
|
||||||
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public enum MigrationType {
|
|
||||||
SQL, JAVA;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public enum RepairResult {
|
|
||||||
SUCCESS, FAILURE;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.main;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public class SqlMigration {
|
|
||||||
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public interface SqlFileProvider {
|
|
||||||
|
|
||||||
List<SqlFile> provide(String path, Class<?> clazz);
|
|
||||||
|
|
||||||
default List<SqlFile> provide(String path) {
|
|
||||||
return provide(path, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -17,7 +17,7 @@
|
|||||||
</File>
|
</File>
|
||||||
</Appenders>
|
</Appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Logger name="org.nanoboot.dbmigration" level="debug" additivity="false">
|
<Logger name="com.robertvokac.dbmigration" level="debug" additivity="false">
|
||||||
<AppenderRef ref="File"/>
|
<AppenderRef ref="File"/>
|
||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
</Logger>
|
</Logger>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</File>
|
</File>
|
||||||
</Appenders>
|
</Appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Logger name="org.nanoboot.dbmigration" level="debug" additivity="false">
|
<Logger name="com.robertvokac.dbmigration" level="debug" additivity="false">
|
||||||
<AppenderRef ref="File"/>
|
<AppenderRef ref="File"/>
|
||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
</Logger>
|
</Logger>
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.configuration;
|
package com.robertvokac.dbmigration.core.configuration;
|
||||||
|
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class ConfigurationEntryTest {
|
public class ConfigurationEntryTest {
|
@ -17,11 +17,11 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.configuration;
|
package com.robertvokac.dbmigration.core.configuration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class ConfigurationTest {
|
public class ConfigurationTest {
|
@ -17,13 +17,13 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.entity;
|
package com.robertvokac.dbmigration.core.entity;
|
||||||
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.net.ssl.KeyManagerFactory;
|
import javax.net.ssl.KeyManagerFactory;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigrationSchemaHistoryTest {
|
public class DBMigrationSchemaHistoryTest {
|
@ -17,13 +17,13 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import static org.nanoboot.dbmigration.core.utils.DBMigrationUtils.writeToFile;
|
import static com.robertvokac.dbmigration.core.utils.DBMigrationUtils.writeToFile;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class FileSystemSqlFileProviderTest {
|
public class FileSystemSqlFileProviderTest {
|
@ -17,10 +17,10 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class ResourcesSqlFileProviderTest {
|
public class ResourcesSqlFileProviderTest {
|
||||||
@ -95,7 +95,7 @@ public class ResourcesSqlFileProviderTest {
|
|||||||
System.out.println("provide(String,Class)");
|
System.out.println("provide(String,Class)");
|
||||||
//prepare
|
//prepare
|
||||||
String path = ResourcesSqlFileProvider.createPath("sqlite", "test");
|
String path = ResourcesSqlFileProvider.createPath("sqlite", "test");
|
||||||
Class clazz = org.nanoboot.dbmigration.test.jar.DBMigrationTestJarDummyClass.class;
|
Class clazz = com.robertvokac.dbmigration.test.jar.DBMigrationTestJarDummyClass.class;
|
||||||
ResourcesSqlFileProvider instance = new ResourcesSqlFileProvider();
|
ResourcesSqlFileProvider instance = new ResourcesSqlFileProvider();
|
||||||
List<SqlFile> expResult = null;
|
List<SqlFile> expResult = null;
|
||||||
//execute
|
//execute
|
@ -17,19 +17,19 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.nanoboot.dbmigration.core.entity.DBMigrationSchemaHistory;
|
import com.robertvokac.dbmigration.core.entity.DBMigrationSchemaHistory;
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class SqlFileNameTest {
|
public class SqlFileNameTest {
|
@ -17,7 +17,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class SqlFileProviderTest {
|
public class SqlFileProviderTest {
|
@ -17,9 +17,9 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.resources;
|
package com.robertvokac.dbmigration.core.resources;
|
||||||
|
|
||||||
import org.nanoboot.dbmigration.core.main.DBMigrationException;
|
import com.robertvokac.dbmigration.core.main.DBMigrationException;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.AfterAll;
|
import org.junit.jupiter.api.AfterAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class SqlFileTest {
|
public class SqlFileTest {
|
@ -17,7 +17,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.core.utils;
|
package com.robertvokac.dbmigration.core.utils;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
public class DBMigrationUtilsTest {
|
public class DBMigrationUtilsTest {
|
@ -23,12 +23,12 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.nanoboot.tools.dbmigration</groupId>
|
<groupId>com.robertvokac.tools.dbmigration</groupId>
|
||||||
<artifactId>db-migration</artifactId>
|
<artifactId>db-migration</artifactId>
|
||||||
<version>0.1.1-SNAPSHOT</version>
|
<version>0.1.1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.nanoboot.tools.dbmigration</groupId>
|
<groupId>com.robertvokac.tools.dbmigration</groupId>
|
||||||
<artifactId>db-migration-test-jar</artifactId>
|
<artifactId>db-migration-test-jar</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
@ -153,17 +153,17 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- Power dependencies -->
|
<!-- Power dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.powerframework</groupId>
|
<groupId>com.robertvokac.powerframework</groupId>
|
||||||
<artifactId>power-time</artifactId>
|
<artifactId>power-time</artifactId>
|
||||||
<version>${power.version}</version>
|
<version>${power.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.powerframework</groupId>
|
<groupId>com.robertvokac.powerframework</groupId>
|
||||||
<artifactId>power-core</artifactId>
|
<artifactId>power-core</artifactId>
|
||||||
<version>${power.version}</version>
|
<version>${power.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.nanoboot.powerframework</groupId>
|
<groupId>com.robertvokac.powerframework</groupId>
|
||||||
<artifactId>power-security</artifactId>
|
<artifactId>power-security</artifactId>
|
||||||
<version>${power.version}</version>
|
<version>${power.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// db-migration: A database schema versioning tool.
|
||||||
|
// Copyright (C) 2021-2022 the original author or authors.
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation, either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see
|
||||||
|
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
package com.robertvokac.dbmigration.test.jar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
|
* @since 0.1.0
|
||||||
|
*/
|
||||||
|
public class DBMigrationTestJarDummyClass {
|
||||||
|
|
||||||
|
}
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
* @author <a href="mailto:robertvokac@robertvokac.com">Robert Vokac</a>
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
module dbmigration.testjar {
|
module dbmigration.testjar {
|
||||||
@ -31,5 +31,5 @@ module dbmigration.testjar {
|
|||||||
requires powerframework.security;
|
requires powerframework.security;
|
||||||
requires org.apache.logging.log4j;
|
requires org.apache.logging.log4j;
|
||||||
requires org.apache.logging.log4j.core;
|
requires org.apache.logging.log4j.core;
|
||||||
exports org.nanoboot.dbmigration.test.jar;
|
exports com.robertvokac.dbmigration.test.jar;
|
||||||
}
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// db-migration: A database schema versioning tool.
|
|
||||||
// Copyright (C) 2021-2022 the original author or authors.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation;
|
|
||||||
// version 2.1 of the License only.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
package org.nanoboot.dbmigration.test.jar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:robertvokac@nanoboot.org">Robert Vokac</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
*/
|
|
||||||
public class DBMigrationTestJarDummyClass {
|
|
||||||
|
|
||||||
}
|
|
34
pom.xml
34
pom.xml
@ -23,12 +23,12 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.nanoboot.essential</groupId>
|
<groupId>com.robertvokac.essential</groupId>
|
||||||
<artifactId>nanoboot-parent</artifactId>
|
<artifactId>robertvokac-parent</artifactId>
|
||||||
<version>0.1.1-SNAPSHOT</version>
|
<version>0.1.1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.nanoboot.tools.dbmigration</groupId>
|
<groupId>com.robertvokac.tools.dbmigration</groupId>
|
||||||
<artifactId>db-migration</artifactId>
|
<artifactId>db-migration</artifactId>
|
||||||
<version>0.1.1-SNAPSHOT</version>
|
<version>0.1.1-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
@ -65,29 +65,29 @@
|
|||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>releases</id>
|
<id>robertvokac-releases-repository</id>
|
||||||
<name>nanoboot-releases-repository</name>
|
<name>robertvokac-releases-repository</name>
|
||||||
<url>https://maven.nanoboot.org/releases</url>
|
<url>https://maven.robertvokac.com/releases</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>snapshots</id>
|
<id>robertvokac-snapshots-repository</id>
|
||||||
<name>nanoboot-snapshots-repository</name>
|
<name>robertvokac-snapshots-repository</name>
|
||||||
<url>https://maven.nanoboot.org/snapshots</url>
|
<url>https://maven.robertvokac.com/snapshots</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>releases</id>
|
<id>robertvokac-releases-repository</id>
|
||||||
<name>nanoboot-releases-repository</name>
|
<name>robertvokac-releases-repository</name>
|
||||||
<url>https://maven.nanoboot.org/releases</url>
|
<url>https://maven.robertvokac.com/releases</url>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>snapshots</id>
|
<id>robertvokac-snapshots-repository</id>
|
||||||
<name>nanoboot-snapshots-repository</name>
|
<name>robertvokac-snapshots-repository</name>
|
||||||
<url>https://maven.nanoboot.org/snapshots</url>
|
<url>https://maven.robertvokac.com/snapshots</url>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
|
|
||||||
|
6
test.sh
6
test.sh
@ -3,13 +3,13 @@ cd ./db-migration-core/target&& \
|
|||||||
java \
|
java \
|
||||||
-cp "db-migration-core-0.0.0-SNAPSHOT-jar-with-dependencies.jar:../../db-migration-test-jar/target/db-migration-test-jar-0.0.0-SNAPSHOT.jar" \
|
-cp "db-migration-core-0.0.0-SNAPSHOT-jar-with-dependencies.jar:../../db-migration-test-jar/target/db-migration-test-jar-0.0.0-SNAPSHOT.jar" \
|
||||||
--module-path "db-migration-core-0.0.0-SNAPSHOT-jar-with-dependencies.jar:../../db-migration-test-jar/target/db-migration-test-jar-0.0.0-SNAPSHOT.jar" \
|
--module-path "db-migration-core-0.0.0-SNAPSHOT-jar-with-dependencies.jar:../../db-migration-test-jar/target/db-migration-test-jar-0.0.0-SNAPSHOT.jar" \
|
||||||
org.nanoboot.dbmigration.core.main.DBMigration \
|
com.robertvokac.dbmigration.core.main.DBMigration \
|
||||||
migrate \
|
migrate \
|
||||||
-datasource.jdbc-url=jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3 \
|
-datasource.jdbc-url=jdbc:sqlite:/home/robertvokac/Desktop/test.sqlite3 \
|
||||||
-name=test -sql-dialect=sqlite \
|
-name=test -sql-dialect=sqlite \
|
||||||
-sql-migrations-directory=/home/robertvokac/Desktop/testDev/ \
|
-sql-migrations-directory=/home/robertvokac/Desktop/testDev/ \
|
||||||
-installed-by=robertvokac \
|
-installed-by=robertvokac \
|
||||||
-sql-dialect-impl-class=org.nanoboot.dbmigration.core.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl \
|
-sql-dialect-impl-class=com.robertvokac.dbmigration.core.persistence.impl.sqlite.DBMigrationPersistenceSqliteImpl \
|
||||||
&&cd ../..
|
&&cd ../..
|
||||||
|
|
||||||
#org.nanoboot.dbmigration.test.jar.DBMigrationTestJarDummyClass
|
#com.robertvokac.dbmigration.test.jar.DBMigrationTestJarDummyClass
|
||||||
|
Reference in New Issue
Block a user