Home - TheNewEconomy/TheNewDBUpdater GitHub Wiki

About

The New Database Updater, also known as TNBDU, is a library that loads a table schema from a YAML file, and automatically updates a database to create tables that aren't already present, or if your table is not the same as the one in the schema it'll add, remove, or modify columns to make sure your database contains the correct tables and columns.

Currently Support Schemas

  • MySQL
  • H2

Maven

TNDBU utilizes maven for those who utilize it in their projects. Here's the maven information:

<repositories>
        <repository>
            <id>tndbu-repo</id>
            <url>https://dl.bintray.com/theneweconomy/java/</url>
        </repository>
</repositories>
<dependencies>
     <dependency>
            <groupId>net.tnemc</groupId>
            <artifactId>TNDBU</artifactId>
            <version>0.1.5.17</version>
            <scope>compile</scope>
      </dependency>
</dependencies>

Using The New Database Updater

Example Table Schema YAML File: Here
Example usage:

TableManager manager = new TableManager("MySQL");
manager.generateQueriesAndRun(myDatabaseConnection, inputStreamForMySchemaFile);
⚠️ **GitHub.com Fallback** ⚠️