﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36985	Reversing CreateExtension throws error on non-postgresql database	Jori Niemi	Varun Kasyap Pentamaraju	"When run on sqlite, a migration using postgres CreateExtension will skip creating the extension. Trying to reverse the migration throws an error: 
{{{
django.db.utils.OperationalError: no such table: pg_extension
}}}

I assume this is because CreateExtension.database_forwards checks schema_editor.connection.vendor != ""postgresql"" but CreateExtension.database_backwards does not.

Minimal migration example:
{{{
from django.db import migrations
from django.contrib.postgres.operations import CreateExtension

class Migration(migrations.Migration):
    dependencies = []

    operations = [
        CreateExtension(""pg_trgm"")
    ]
}}}
"	Cleanup/optimization	closed	contrib.postgres	6.0	Normal	fixed			Ready for checkin	1	0	0	0	1	0
