Extension 'ltree' already exists.
See original GitHub issueI wrote a test for the migration I am writing by hand, followed the guide for unittest and so on. Now, when I run pytest to run the actual test (this one alone) I get into the followin error:
E django.db.utils.ProgrammingError: extension "ltree" already exists
I searched here as best as I could but could not find anything.
Worth mentioning we run our tests with pytest and we are using the pytest-django
plugin to manage django setup and so on.
Thank you in advance for your help!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ltree extension installed, but create table still throws error
It will create the extension for the public schema, if no schema is specified. CREATE EXTENSION IF NOT EXISTS ltree;. Share.
Read more >LTREE extension does not exist after CREATE EXTENSION
The extension ltree is installed in the schema with the object ID 361964. If you want to know the name of that schema,...
Read more >Installing the Postgres LTREE Extension
If you see the “CREATE EXTENSION” message like this, then you're all set! LTREE was already installed and you just enabled it.
Read more >Re: BUG #16698: Create extension and search path
CREATE EXTENSION it still says that it already exists. (Tested on 12.4, but ... ERROR: extension "ltree" already exists. Regards,
Read more >Installing the Postgres LTREE Extension
Learn how to test whether the LTREE extension is installed, use LTREE on a shared Postgres ... error: extension "ltree" already exists.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
But yes, that was it.
The problem stemmed from that first migration that was trying to create the extension twice and by adding the adequate SQL line in the migration that ads the extension fixed it.
Thank you for your help!
No, I use
pytest
as a runner withunittest
cases (the DRF unittest anyway, but unittest none the less).