UPDATE: Add super admin
All checks were successful
Build and Release / release (push) Successful in 1m20s

This commit is contained in:
2026-03-31 00:00:11 +07:00
parent f4644d893a
commit 338f6da83c
2 changed files with 13 additions and 4 deletions

View File

@@ -46,9 +46,18 @@ services:
- -c
- |
DB_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable"
echo "Running migrations..."
/migrate -path /migrations -database "$$DB_URL" up
for i in 1 2 3; do
echo "Migration attempt $$i..."
if /migrate -path /migrations -database "$$DB_URL" up; then
echo "Migration success"
exit 0
fi
sleep 2
done
echo "Migration failed after 3 attempts"
exit 1
networks:
- history-api-project

View File

@@ -70,7 +70,7 @@ func SeedSuperAdmin(pool *pgxpool.Pool) error {
return err
}
role, err := q.GetRoleByName(ctx, constants.USER.String())
role, err := q.GetRoleByName(ctx, constants.ADMIN.String())
if err != nil {
return err
}