UPDATE: Add super admin
All checks were successful
Build and Release / release (push) Successful in 1m20s
All checks were successful
Build and Release / release (push) Successful in 1m20s
This commit is contained in:
@@ -47,8 +47,17 @@ services:
|
||||
- |
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user