diff --git a/api/src/database/index.ts b/api/src/database/index.ts index 9a3b2ed434..b2bd5037f2 100644 --- a/api/src/database/index.ts +++ b/api/src/database/index.ts @@ -54,7 +54,12 @@ export default function getDatabase(): Knex { connection: env.DB_CONNECTION_STRING || connectionConfig, log: { warn: (msg) => { + // Ignore warnings about returning not being supported in some DBs if (msg.startsWith('.returning()')) return; + + // Ignore warning about MySQL not supporting TRX for DDL + if (msg.startsWith('Transaction was implicitly committed, do not mix transactions and DDL with MySQL')) return; + return logger.warn(msg); }, error: (msg) => logger.error(msg), diff --git a/api/src/services/collections.ts b/api/src/services/collections.ts index df6a55d5bc..7bf1995a84 100644 --- a/api/src/services/collections.ts +++ b/api/src/services/collections.ts @@ -414,15 +414,6 @@ export class CollectionsService { if (relation.related_collection === collectionKey) { await fieldsService.deleteField(relation.collection, relation.field); } - - const isM2O = relation.collection === collectionKey; - - // Delete any fields that have a relationship to/from the current collection - if (isM2O && relation.related_collection && relation.meta?.one_field) { - await fieldsService.deleteField(relation.related_collection!, relation.meta.one_field); - } else { - await fieldsService.deleteField(relation.collection, relation.field); - } } const m2aRelationsThatIncludeThisCollection = this.schema.relations.filter((relation) => {