/go-disney-pass

Primary LanguageGoMIT LicenseMIT

Dependencies

Docker (windows only for running sqlc)

Sqlc

Install sqlc

go install github.com/kyleconroy/sqlc/cmd/sqlc@latest

Goose

Install Goose

go install github.com/pressly/goose/v3/cmd/goose@latest

Docker management

Start

docker-compose up -d

Stop

docker-compose down

Using sqlc from Windows

Run the following from the root of the project using a cmd shell

docker run --rm -v "%cd%:/src" -w /src kjconroy/sqlc generate

Applying Changes with Goose

Create migrations

goose -dir ./sql/schema create migration_name sql

Create seed

goose -dir ./sql/seeds create seed_name sql

Run migrations

goose -dir ./sql/schema {up|down}

Run Seeds

goose -dir ./schema/seed -no-versioning up

Using Goose CLI