|
|
@ -601,6 +601,11 @@ export default class Column<T = any> implements ColumnType { |
|
|
|
static async delete(id, ncMeta = Noco.ncMeta) { |
|
|
|
static async delete(id, ncMeta = Noco.ncMeta) { |
|
|
|
const col = await this.get({ colId: id }, ncMeta); |
|
|
|
const col = await this.get({ colId: id }, ncMeta); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if column is not found, return
|
|
|
|
|
|
|
|
if (!col) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// todo: or instead of delete reset related foreign key value to null and handle in BaseModel
|
|
|
|
// todo: or instead of delete reset related foreign key value to null and handle in BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
// get qr code columns and delete
|
|
|
|
// get qr code columns and delete
|
|
|
|