Skip to content

dhanushd-27/learn-go

Repository files navigation

Database Migration Guide

Prerequisites

  • Docker and Docker Compose installed
  • PostgreSQL client tools (optional, for manual database access)

Setup

Install golang-migrate CLI for macOS and Windows

Follow the instructions from the official golang-migrate repository to install the CLI tool.

Steps to for migration

  • export POSTGRES_URL=postgres://postgres:postgres@localhost:5438/learn-go?sslmode=disable
  • migrate -database ${POSTGRES_URL} -path internal/db/migrations up

Verify using these commands in pg running on a docker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published