👞 A simple SQL migration utility
Find a file
Marc Cataford 4f55ba624a
Some checks failed
/ sast (push) Waiting to run
/ build (push) Blocked by required conditions
/ tests (push) Has been cancelled
refactor: remove APP as part of name, carry-over from pre-extracted version
2024-07-11 21:33:20 -04:00
.forgejo/workflows ci: build linux amd64 and upload artifact 2024-07-11 21:24:35 -04:00
.gitignore feat: initial commit, extract from other repository 2024-07-10 23:08:08 -04:00
cobble.go refactor: remove APP as part of name, carry-over from pre-extracted version 2024-07-11 21:33:20 -04:00
database.go refactor: isolate db handler 2024-07-11 00:09:24 -04:00
go.mod fix: module name should match repository 2024-07-10 23:25:42 -04:00
go.sum feat: extract cli and add parsing for up command 2024-07-10 23:20:54 -04:00
LICENSE Initial commit 2024-07-11 02:51:13 +00:00
migrate_test.go refactor: ApplyMigration > Apply, remove naming redundancy 2024-07-11 21:16:44 -04:00
migration.go refactor: ApplyMigration > Apply, remove naming redundancy 2024-07-11 21:16:44 -04:00
migration_graph.go refactor: graph from directory 2024-07-11 20:24:57 -04:00
models.go refactor: group migration logic, use Migration to apply instead of path 2024-07-11 20:16:17 -04:00
parser.go feat: add inspect by index command 2024-07-11 21:15:37 -04:00
README.md refactor: remove APP as part of name, carry-over from pre-extracted version 2024-07-11 21:33:20 -04:00

cobble

👞 A simple SQL migration utility

Installing

Through go, the tool can be installed via:

go install forge.karnov.club/marc/cobble

Configuring

Connection details about the database to apply migrations on can be provided via environment variables:

DB_HOST=...         # Database host
DB_PORT=...         # Database port
DB_USER=...     # Username to connect with when applying migrations
DB_PASSWORD=... # Password to use to connect as $DB_APP_USER
DB_NAME=...         # Database name to apply migrations on