mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-12 08:00:04 +01:00
Adds `dbmate dump` command to write the database schema to a file. The intent is for this file to be checked in to the codebase, similar to Rails' `schema.rb` (or `structure.sql`) file. This allows developers to share a single file documenting the database schema, and makes it considerably easier to review PRs which add (or change) migrations. The existing `up`, `migrate`, and `rollback` commands will automatically trigger a schema dump, unless `--no-dump-schema` is passed. Closes https://github.com/amacneil/dbmate/issues/5
25 lines
495 B
YAML
25 lines
495 B
YAML
version: '2.3'
|
|
services:
|
|
dbmate:
|
|
build:
|
|
context: .
|
|
target: build
|
|
volumes:
|
|
- .:/go/src/github.com/amacneil/dbmate
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
mysql:
|
|
image: mysql:5.7
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: root
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "status", "-proot"]
|
|
|
|
postgres:
|
|
image: postgres:9.6
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready"]
|