fix: use go-migrate pkg to init or update db schema
Instead to implement own logic how the database scheme should be updated or migrated to a newer or older version flucky use now instead the go-migrate package.
This commit is contained in:
18
Makefile
18
Makefile
@ -66,13 +66,25 @@ bin/tmp/${EXECUTABLE}: bindata
|
||||
# GO-BINDATA
|
||||
# ==============================================================================
|
||||
BINDATA_TARGETS := \
|
||||
pkg/repository/db/bindataSQL.go \
|
||||
pkg/repository/db/postgres/ddl/bindata.go \
|
||||
pkg/repository/db/postgres/dml/bindata.go \
|
||||
pkg/repository/db/sqlite3/ddl/bindata.go \
|
||||
pkg/repository/db/sqlite3/dml/bindata.go
|
||||
|
||||
PHONY+=bindata
|
||||
bindata: clean ${BINDATA_TARGETS}
|
||||
|
||||
pkg/repository/db/bindataSQL.go:
|
||||
go-bindata -pkg db -o ./pkg/repository/db/bindataSQL.go pkg/repository/db/postgres/*** pkg/repository/db/sqlite3/***
|
||||
pkg/repository/db/postgres/ddl/bindata.go:
|
||||
go-bindata -pkg postgresddl -prefix ${@:%/bindata.go=%} -o ${@} ${@:%/bindata.go=%}/*
|
||||
|
||||
pkg/repository/db/postgres/dml/bindata.go:
|
||||
go-bindata -pkg postgresdml -prefix ${@:%/bindata.go=%} -o ${@} ${@:%/bindata.go=%}/*
|
||||
|
||||
pkg/repository/db/sqlite3/ddl/bindata.go:
|
||||
go-bindata -pkg sqlite3ddl -prefix ${@:%/bindata.go=%} -o ${@} ${@:%/bindata.go=%}/*
|
||||
|
||||
pkg/repository/db/sqlite3/dml/bindata.go:
|
||||
go-bindata -pkg sqlite3dml -prefix ${@:%/bindata.go=%} -o ${@} ${@:%/bindata.go=%}/*
|
||||
|
||||
# CLEAN
|
||||
# ==============================================================================
|
||||
|
Reference in New Issue
Block a user