mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -298,7 +298,11 @@ export class FieldsService {
|
||||
|
||||
await this.knex('directus_fields').delete().where({ collection, field });
|
||||
|
||||
if (this.schema.collections[collection] && field in this.schema.collections[collection].fields) {
|
||||
if (
|
||||
this.schema.collections[collection] &&
|
||||
field in this.schema.collections[collection].fields &&
|
||||
this.schema.collections[collection].fields[field].alias === false
|
||||
) {
|
||||
await this.knex.schema.table(collection, (table) => {
|
||||
table.dropColumn(field);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user