Home - TheNewEconomy/TheNewDBUpdater GitHub Wiki
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.
- MySQL
- H2
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>
Example Table Schema YAML File: Here
Example usage:
TableManager manager = new TableManager("MySQL");
manager.generateQueriesAndRun(myDatabaseConnection, inputStreamForMySchemaFile);