Skip to content

exc-works/migrate

Repository files navigation

migrate

SQL migration tool with PostgreSQL/MySQL/MariaDB/Oracle/SQLite/MSSQL/ClickHouse/TiDB/Redshift support.

Documentation

Install

go install github.com/exc-works/migrate/cmd/migrate@latest

Quick Start

migrate new config
migrate new version init_users
migrate create
migrate up
migrate status
migrate status --output json

Test

go test ./...
go test -tags=integration ./...

Run a specific integration dialect:

INTEGRATION_DB=sqlite go test -tags=integration ./integrationtest/...
INTEGRATION_DB=postgres,mysql,mariadb go test -tags=integration ./integrationtest/...

Run Oracle integration (requires reachable Oracle DSN):

INTEGRATION_DB=oracle INTEGRATION_ORACLE_DSN='<oracle dsn>' go test -tags=integration ./integrationtest/...

Enable Pre-commit Security Scan

./scripts/install-git-hooks.sh

This enables repository hooks via core.hooksPath=.githooks and blocks commits that add:

  • private key material
  • absolute filesystem paths (Unix and Windows)
  • hardcoded credentials (password / token / secret)

For remote enforcement, configure protected branch push protection or server-side pre-receive scanning.

About

SQL migration tool with PostgreSQL/MySQL/MariaDB/Oracle/SQLite/MSSQL/ClickHouse/TiDB/Redshift support.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors