@ductape/cli 0.3.19 → 0.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -259,6 +259,11 @@ export async function runDbSchemaGenerate(opts) {
259
259
  },
260
260
  ];
261
261
  for (const { fieldName, unique } of parsed.indexFields) {
262
+ // createCollection already materializes fields marked unique. Emitting a
263
+ // second named createIndex operation gives MongoDB the same key/options
264
+ // under a different name and fails with IndexOptionsConflict.
265
+ if (unique)
266
+ continue;
262
267
  up.push({
263
268
  type: 'createIndex',
264
269
  collection: tableName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/cli",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Ductape CLI — local platform, login, link projects, and manage resources via the proxy (Workbench-compatible)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",