I have a Django app and a Postgresql database (in production). Now I want to intall pg_trgm extension for Postgres. But I can't find any step-by-step instructions for installing it from Django app. I have a superuser status. How to do it correctly?
How to install Django pg_trgm by makemigrations?
2.1k views Asked by Vit Amin At
1
add 'django.contrib.postgres' in your INSTALLED_APPS
add a customer migration file in the app's migration folder. (The migration files are indexed, It's better to follow that index. e.g. 0044_customer_migrations.py)
add TrigramExtension in your migration file
run migrate
python manage.py migrate