0

after running

python manage.py runserver 

Got the Error port 5432 failed: FATAL: Feature not supported: RDS Proxy currently doesn’t support command-line options.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'DATABASE_NAME',
        'USER': 'DATABASE_USER'
        'PASSWORD': 'DATABASE_PASSWORD'
        'HOST': 'PROXY_HOST',
        'PORT': '5432',
        'OPTIONS': {
            'options': f"-c search_path={DATABASE_SCHEMA}"
        },
    }
}

After commented OPTIONS -- {DATABASE_SCHEMA}

 models already migrated in particular schema but schema is not detected.


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'DATABASE_NAME',
        'USER': 'DATABASE_USER'
        'PASSWORD': 'DATABASE_PASSWORD'
        'HOST': 'PROXY_HOST',
        'PORT': '5432',
        # 'OPTIONS': {
        #     'options': f"-c search_path={DATABASE_SCHEMA}"
        # },
    }
}

so finally getting migrations error because it's pointing to the database not particular schema

You have 178 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): **address, analytics, etc...**
Run 'python manage.py migrate' to apply them.
February 09, 2023 - 15:42:20
Django version 3.2.9, using settings 'MoreProjectAPI.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

it's not connected my schema could any one please suggest how can i fix this issue in root level not in every model level.

1 Answers1

0

hi your server output after commenting looks fine, try migrating first as it suggests!

python manage.py migrate

or python3 manage.py migrate

or simply

./manage.py migrate

and then run your server

rymanso
  • 869
  • 1
  • 9
  • 21
  • tables are already there only thing database host is proxy host not normal host so proxy host , RDS Proxy currently doesn’t support command-line option to select schema name – veeresh G.S Feb 09 '23 at 17:17