Skip to content

(POC) Manage postgres migrations (db versioning) using goose

Notifications You must be signed in to change notification settings

fpopic/docker-postgres-adminer-goose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-postgres-adminer-goose

Used:

Steps:

  1. Clone the repository

    git clone [email protected]:fpopic/docker-postgres-adminer-goose.git
    cd docker-postgres-adminer-goose
  2. Spin up composed services: postgres, adminer, goose with Dockerfile entrypoint

    docker-compose up --build
  3. Run goose standalone:

    docker-compose run goose status
    docker-compose run goose create <name_of_migration> sql
    # edit db/migrations/<name_of_migration>.sql
    docker-compose run goose up
  4. Check changes in adminer:

    open 'http://localhost:8080/?pgsql=migrations-postgres&username=goose&db=goose&ns=public'

About

(POC) Manage postgres migrations (db versioning) using goose

Topics

Resources

Stars

Watchers

Forks