---
# System prepended metadata

title: DISS
tags: [DISS]

---

# DISS
###### tags: `DISS`

# Existing Tools


## dbmate

Link: https://github.com/amacneil/dbmate (confirm with Eurico this is the correct version, there is at least 1 more repo with the same name/description)

### Description

* Dbmate is a database migration tool, to keep your database schema in sync across multiple developers and your production servers.
* It is a standalone command line tool
* Can be used with any language or framework

### Features

* Supports MySQL, PostgreSQL, SQLite, and ClickHouse.
* Uses plain SQL for writing schema migrations.
* Migrations are timestamp-versioned, to avoid version number conflicts with multiple developers.
* Migrations are run atomically inside a transaction.
* Supports creating and dropping databases (handy in development/test).
* Supports saving a schema.sql file to easily diff schema changes in git.
* Database connection URL is defined using an environment variable (DATABASE_URL by default), or specified on the command line.
* Built-in support for reading environment variables from your .env file.
* Easy to distribute, single self-contained binary.

### Installation

* macOS - brew
* Linux - curl
* docker - (has image)
* Heroku - (similar to Linux)

It's installed on the machine and not as a project dependency for example

### Commands

```
dbmate           # print help
dbmate new       # generate a new migration file
dbmate up        # create the database (if it does not already exist) and run any pending migrations
dbmate create    # create the database
dbmate drop      # drop the database
dbmate migrate   # run any pending migrations
dbmate rollback  # roll back the most recent migration
dbmate down      # alias for rollback
dbmate status    # show the status of all migrations (supports --exit-code and --quiet)
dbmate dump      # write the database schema.sql file
dbmate wait      # wait for the database server to become available
```

### Summary

Dbmate locates your database using the DATABASE_URL environment variable by default.
To make this easy in development, dbmate looks for a .env file in the current directory, and treats any variables listed there as if they were specified in the current environment (but existing environment variables take preference).
Dbmate is written mainly in Go.

























