Skip to content

joaoprocopio/coreflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coreflow

pre-requirements

make sure that you have golang installed in the version that is specified in the go.mod file

https://go.dev/doc/install

docker compose up -d
go mod tidy

run the server

go run ./cmd/server/main.go

database

migrations

pre-requirements

export GOOSE_MIGRATION_DIR='./internal/db/migrations'
export GOOSE_DRIVER='postgres'
export GOOSE_DBSTRING='user=postgres password=postgres dbname=postgres host=localhost port=5432'

create a migration

go tool goose create -s INSERT_MIGRATION_NAME sql

run the migrations

go tool goose up

seeding

pre-requirements

export GOOSE_MIGRATION_DIR='./internal/db/seeds'
export GOOSE_DRIVER='postgres'
export GOOSE_DBSTRING='user=postgres password=postgres dbname=postgres host=localhost port=5432'

create a seed

go tool goose create -s INSERT_SEED_NAME sql

run the seeds

-no-versioning is fundamental here. you need to provide it to avoid the versioning of the seeds.

go tool goose -no-versioning up

jet

generate the jet files

go tool jet -dsn='postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable' -schema='public' -path='./gen'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages