add test that partial indexes are ignored.
@@ -143,6 +143,32 @@ async fn a_table_with_a_hash_index_no_preview(api: &TestApi) -> TestResult {
Ok(())
}
+#[test_connector(tags(Postgres))]
+async fn ignoring_of_partial_indices(api: &TestApi) -> TestResult {
+ let setup = indoc! {r#"
+ CREATE TABLE "A" (
+ id INTEGER NOT NULL,
+ a INTEGER,
+ CONSTRAINT A_pkey PRIMARY KEY (id)
+ );
+
+ CREATE INDEX "A_a_idx" ON "A" Using Btree (a) Where (a is not null);
+ "#};
+
+ api.raw_cmd(setup).await;
+
+ let expectation = expect![[r#"
+ model A {
+ id Int @id(map: "a_pkey")
+ a Int?
+ }
+ "#]];
+
+ expectation.assert_eq(&api.introspect_dml().await?);
+
+ Ok(())
+}
+
#[test_connector(tags(Postgres))]
async fn introspecting_now_functions(api: &TestApi) -> TestResult {
let setup = indoc! {r#"
@@ -157,7 +183,6 @@ async fn introspecting_now_functions(api: &TestApi) -> TestResult {
);
"#};
-
api.raw_cmd(setup).await;
let expectation = expect![[r#"
