mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 03:45:06 +03:00
Merge pull request #13706 from supabase/hotfix/remove-wrong-column-removal-in-catch-block
Hotfix/remove wrong column removal in catch block
This commit is contained in:
1 file changed
-3
@@ -405,7 +405,6 @@ export default class MetaStore implements IMetaStore {
|
|||||||
try {
|
try {
|
||||||
// Once pg-meta supports composite keys, we can remove this logic
|
// Once pg-meta supports composite keys, we can remove this logic
|
||||||
const { isPrimaryKey, ...formattedPayload } = payload
|
const { isPrimaryKey, ...formattedPayload } = payload
|
||||||
|
|
||||||
const column: any = await this.columns.create(formattedPayload)
|
const column: any = await this.columns.create(formattedPayload)
|
||||||
if (column.error) throw column.error
|
if (column.error) throw column.error
|
||||||
|
|
||||||
@@ -469,8 +468,6 @@ export default class MetaStore implements IMetaStore {
|
|||||||
category: 'error',
|
category: 'error',
|
||||||
message: `An error occurred while creating the column "${payload.name}"`,
|
message: `An error occurred while creating the column "${payload.name}"`,
|
||||||
})
|
})
|
||||||
const query = `alter table "${selectedTable.name}" drop column if exists "${payload.name}";`
|
|
||||||
await this.rootStore.meta.query(query)
|
|
||||||
return { error }
|
return { error }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user