DEVELOPMENT ENVIRONMENT

~liljamo/tixe

c2c8487693ca1dec7f206f8c2093a811280af43b — Jonni Liljamo 1 year, 1 month ago 1713004
fix: a small error in the migration code

i swear it worked when i've tried migrations in the past,
but it may be that i just forgot to push the fix...
1 files changed, 2 insertions(+), 2 deletions(-)

M db/migrations.go
M db/migrations.go => db/migrations.go +2 -2
@@ 32,8 32,8 @@ func RunMigrations() {
	migrations := migrations()
	if schemaVersion != len(migrations) {
		for i := 0; i < len(migrations); i++ {
			if i <= schemaVersion {
				log.Printf("[tixe/db] Running migration %d", i)
			if i >= schemaVersion {
				log.Printf("[tixe/db] Running migration %d", i + 1) // + 1 is just a visual thing
				_, err := PgPool.Exec(context.Background(), migrations[i])
				if err != nil {
					log.Fatalf("[tixe/db] Migration %d failed to run!", i)