Chore/fix index delete (#36774)

pass schema to delete index
This commit is contained in:
Terry Sutton authored and GitHub committed 2025-06-30 13:06:18 -02:30
1 parent 92eabe3e3e
commit 2aee61530d
2 files changed
+4 -1

No files matched your search

@@ -77,6 +77,7 @@ const Indexes = () => {
projectRef: project.ref,
connectionString: project.connectionString,
name: index.name,
schema: selectedSchema,
})
}
@@ -9,14 +9,16 @@ export type DatabaseIndexDeleteVariables = {
projectRef: string
connectionString?: string | null
name: string
schema: string
}
export async function deleteDatabaseIndex({
projectRef,
connectionString,
name,
schema,
}: DatabaseIndexDeleteVariables) {
const sql = `drop index if exists "${name}"`
const sql = `drop index if exists "${schema}"."${name}"`
const { result } = await executeSql({
projectRef,