Skip to content

A small project that shows how psql migrations are applied in golang

Notifications You must be signed in to change notification settings

syordanov94/psql_migrations_golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Migrations in Go

A small lab that performs database migrations to a local PSQL database innitialized using Docker. To perform the migrations, we use the go-migrate library.

Prerequisites

  • Golang 1.19 or higher installed
  • Docker installed
  • Recomended but not mandatory VS Code or a similiar IDE

How to install and Run the project

  • First you will have to clone the project from this github repository.
git clone https://github.com/syordanov94/go_redis_concurrency.git
  • Once cloned, access the root of the project and innitiate the local PSQL instance using Docker. This can be done buy running the following command:
docker compose up

You can add (or modify) ..sql files in the migrations folder if you want to test custom migrations.

Once the database is innitialized, you can run the project and apply the migrations to your local database by running:

go run cmd/main.go

How to test the project

About

A small project that shows how psql migrations are applied in golang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages