package main import ( "context" "log" "os" "github.com/jackc/pgx/v5/pgxpool" ) const DB_SOURCE = "postgresql://root:aaa@localhost:5432/zimple_bank?sslmode=disable" func main() {
ctx := context.Background() connPool, err := pgxpool.New(ctx, DB_SOURCE)
if err != nil {
log.Fatal("cannot connect to db:", err)
}
data, _ := os.ReadFile("db/schema/0000_init_schema.up.sql") connPool.Exec(ctx, string(data)) }