@strapi/database 5.0.4 → 5.0.6

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.
package/dist/index.js CHANGED
@@ -643,7 +643,7 @@ class MysqlSchemaInspector {
643
643
  columns: [index2.Column_name],
644
644
  name: index2.Key_name
645
645
  };
646
- if (!index2.Non_unique || index2.Non_unique === "0") {
646
+ if (!index2.Non_unique) {
647
647
  indexInfo.type = "unique";
648
648
  }
649
649
  ret[index2.Key_name] = indexInfo;
@@ -1307,7 +1307,7 @@ const createSchemaDiff = (db) => {
1307
1307
  const hasChangedStatus = (diff) => diff.status === statuses.CHANGED;
1308
1308
  const diffIndexes = (oldIndex, index2) => {
1309
1309
  const changes = [];
1310
- if (___default.default.xor(oldIndex.columns, index2.columns).length > 0) {
1310
+ if (!___default.default.isEqual(oldIndex.columns, index2.columns)) {
1311
1311
  changes.push("columns");
1312
1312
  }
1313
1313
  if (oldIndex.type && index2.type && ___default.default.toLower(oldIndex.type) !== ___default.default.toLower(index2.type)) {
@@ -6433,7 +6433,6 @@ const createPublishedAtColumn = async (db, tableName) => {
6433
6433
  await db.schema.alterTable(tableName, (table) => {
6434
6434
  table.string("published_at");
6435
6435
  });
6436
- await db(tableName).update({ published_at: /* @__PURE__ */ new Date() });
6437
6436
  };
6438
6437
  const createdPublishedAt = {
6439
6438
  name: "5.0.0-04-created-published-at",