DatabaseManager¶
DatabaseManager compares SQL database definitions stored in version-controlled files with the objects on a live server and generates SQL scripts to reconcile them. It also parses and formats SQL files.
Warning
Because this project is fairly new, you are strongly encouraged to review all generated SQL scripts carefully before executing them on a live server, or at least back up your database first.
Prerequisites¶
The CLI requires the .NET 10 runtime.
Installing¶
Using ninman¶
The simplest way to install DatabaseManager is with .NET Install Manager:
pipx install net-install-manager
# pipx ensurepath (1)
ninman install tcfoss:database-manager
dbman --help
- The
pipx ensurepathinvocation is only needed if you haven't called it before or added~/.local/binto your path manually. On Windows, if you do need to call it, you will have to close your shell and open a new one before running the next command.
Tip
Using ninman to install DatabaseManager will also make it upgradable via ninman upgrade dbman.
Release Artifact¶
- Go to the latest release page.
- Download the
.tar.gzfile that corresponds to your operating system, and unpack it. Move the contents to some reasonable directory. - Create a link to the
TcfOss.DatabaseManager.App(+.exeon Windows) executable in some place on your systemPATH, or create a launcher script that invokes it.
Compile from Source¶
You can also clone the repository and compile DatabaseManager from source. Here are the general steps:
-
Clone the repository:
git clone https://github.com/tcfoss/database-manager.git -
Build the project using the .NET SDK:
cd database-manager dotnet publish -c Release -o ./publish src/TcfOss.DatabaseManager.App/TcfOss.DatabaseManager.App.csproj -
The compiled executable will be located at
publish/TcfOss.DatabaseManager.App(+.exeon Windows). Create a link to it or add this directory to your systemPATH.
Getting Started¶
Start with the CLI guide, then configure your project using the configuration reference.
.NET Package Consumers¶
Use the .NET libraries to embed parsing, formatting, or MySQL/MariaDB definition comparison in your own application. Start with the quick start, or use manual hosting when your application owns its dependency-injection container. If you'd prefer to bypass DI entirely and construct objects manually as needed, see consuming without DI.
Contributors¶
The contributor guide covers building, testing, documentation, and development tools. Report bugs and feature requests on IssueTracker.
License and Source¶
DatabaseManager is distributed under the MIT license. See the source repository and third-party notices, including the Apache 2.0 license.