Skip to content

Migration#25

Merged
nutcas3 merged 8 commits intomainfrom
migration
Apr 29, 2026
Merged

Migration#25
nutcas3 merged 8 commits intomainfrom
migration

Conversation

@nutcas3
Copy link
Copy Markdown
Owner

@nutcas3 nutcas3 commented Apr 29, 2026

No description provided.

nutcas3 added 8 commits April 29, 2026 02:58
…grate

Update davecgh/go-spew from v1.1.1 to v1.1.2-0.20180830191138-d8f796af33cc and pmezard/go-difflib from v1.0.0 to v1.0.1-0.20181226105442-5d4384ee4fb2 for latest upstream fixes. Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from v0.60.0 to v0.61.0. Add github.com/golang-migrate/migrate/v4 v4.19.1 as indirect dependency for database migration support.
… with separate up/down files for bidirectional schema changes

Rename migration files from sequential numbering (001_*.sql) to golang-migrate timestamp format (20240429000001_*.up.sql) for version ordering. Add corresponding .down.sql files for each migration containing DROP statements in reverse dependency order with trigger/function cleanup before table drops. Maintain original schema definitions in .up.sql files unchanged.
…for bidirectional migration support and improved version control

Remove custom Migrate function and schema_migrations table management from database/migrate.go. Replace with golang-migrate/migrate/v4 library in cmd/migrate/main.go supporting up/down/version actions with optional step count. Add database URL construction from config and migrate instance creation with file source. Implement action switch handling Up/Down/Steps/Version operations
…with step control for bidirectional schema management

Replace single migrate target with migrate-up/migrate-down/migrate-version targets supporting golang-migrate actions. Add migrate-down with -steps 1 flag for single-step rollback and migrate-version for current schema version display. Update .PHONY declarations and dev-setup to use migrate-up. Retain legacy migrate target as alias to migrate-up for backward compatibility.
…ensure database schema is up-to-date

Add migrate tool build step and database migration execution to CI workflow before running tests. Build migrate binary to bin/migrate from cmd/migrate and execute migrations with up action using test database credentials (localhost:5432/betting_test). Configure DATABASE_* environment variables for migration connection and set migrations directory to ./migrations.
…d remove golangci-lint v2 config options

Downgrade golangci-lint from v1.58.0 to v1.55.2 in CI workflow for compatibility. Correct gosec installation path from securecodewarrior/gosec to securego/gosec in security workflow. Remove go version specification and default: none directive from .golangci.yml as these are not supported in golangci-lint v1 configuration format.
…nstead of manual installation

Replace manual Go setup and gosec installation steps with securego/gosec@master GitHub Action. Pass exclude-dir argument directly to action with args parameter to maintain tests directory exclusion while reducing workflow complexity.
…event build failures without license key

Comment out GeoLite2-Country.mmdb download step and remove data directory copy from final image. Add instructions for obtaining free MaxMind license key and update download URL to use official geoip_download endpoint with license key parameter and tar.gz extraction instead of deprecated GitHub raw file access.
@nutcas3 nutcas3 merged commit b896510 into main Apr 29, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant