diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts index d55a4a5b0..d4a54a93d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/server/collections/data-sources-collections.ts @@ -7,6 +7,12 @@ export default defineCollection({ shared: true, autoGenId: false, timestamps: false, + indexes: [ + { + unique: true, + fields: ['name', 'dataSourceKey'], + }, + ], fields: [ { type: 'uid', @@ -16,7 +22,6 @@ export default defineCollection({ { type: 'string', name: 'name', - unique: true, }, { type: 'belongsTo',