Add a missing introspection test
@@ -305,3 +305,35 @@ async fn should_update_schema_attribute_if_different_than_db(api: &TestApi) -> T
Ok(())
}
+
+#[test_connector(tags(Postgres), exclude(CockroachDb), preview_features("postgresqlExtensions"))]
+async fn should_remove_missing_extensions(api: &TestApi) -> TestResult {
+ let schema = indoc! {r#"
+ generator client {
+ provider = "prisma-client-js"
+ previewFeatures = ["postgresqlExtensions"]
+ }
+
+ datasource db {
+ provider = "postgresql"
+ url = "env(TEST_DATABASE_URL)"
+ extensions = [citext]
+ }
+ "#};
+
+ let expectation = expect![[r#"
+ generator client {
+ provider = "prisma-client-js"
+ previewFeatures = ["postgresqlExtensions"]
+ }
+
+ datasource db {
+ provider = "postgresql"
+ url = "env(TEST_DATABASE_URL)"
+ }
+ "#]];
+
+ expectation.assert_eq(&api.re_introspect_config(schema).await?);
+
+ Ok(())
+}
