Skip to content

Issue with migrations #1729

@siddharth-sable

Description

@siddharth-sable

Getting the below error on running the build - created using make build

{"args":[0.014014875],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-08-20T19:06:21Z"} {"level":"fatal","msg":"running db migrations: error executing migrations/20240729123726_add_mfa_phone_config.up.sql, sql: do $$ begin\n alter type auth.factor_type add value 'phone';\nexception\n when duplicate_object then null;\nend $$;\n\n\nalter table auth.mfa_factors add column if not exists phone text unique default null;\nalter table auth.mfa_challenges add column if not exists otp_code text null;\n\n\ncreate unique index if not exists unique_verified_phone_factor on auth.mfa_factors (user_id, phone);\n: ERROR: type \"auth.factor_type\" does not exist (SQLSTATE 42704)","time":"2024-08-20T19:06:21Z"} 

Below is my .env.example - I have added these variables, please let me know if I am missing anything.

GOTRUE_JWT_SECRET= GOTRUE_JWT_EXP= GOTRUE_JWT_AUD= GOTRUE_JWT_DEFAULT_GROUP_NAME= GOTRUE_JWT_ADMIN_ROLES= GOTRUE_DB_DRIVER= DB_NAMESPACE= DATABASE_URL= API_EXTERNAL_URL= GOTRUE_API_HOST= PORT= GOTRUE_SMTP_HOST= GOTRUE_SMTP_PORT= GOTRUE_SMTP_USER= GOTRUE_SMTP_MAX_FREQUENCY= GOTRUE_SMTP_PASS= GOTRUE_SMTP_ADMIN_EMAIL= GOTRUE_SMTP_SENDER_NAME= # Google OAuth config GOTRUE_EXTERNAL_GOOGLE_ENABLED= GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID= GOTRUE_EXTERNAL_GOOGLE_SECRET= GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI= # Signup config GOTRUE_DISABLE_SIGNUP= GOTRUE_SITE_URL= GOTRUE_EXTERNAL_EMAIL_ENABLED= GOTRUE_EXTERNAL_PHONE_ENABLED= GOTRUE_EXTERNAL_IOS_BUNDLE_ID= GOTRUE_URI_ALLOW_LIST= # Additional Security config GOTRUE_LOG_LEVEL= GOTRUE_SECURITY_REFRESH_TOKEN_ROTATION_ENABLED= GOTRUE_SECURITY_REFRESH_TOKEN_REUSE_INTERVAL= GOTRUE_SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION= GOTRUE_OPERATOR_TOKEN= GOTRUE_RATE_LIMIT_HEADER= 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions