@strapi/database 5.0.5 → 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.mjs
CHANGED
|
@@ -611,7 +611,7 @@ class MysqlSchemaInspector {
|
|
|
611
611
|
columns: [index2.Column_name],
|
|
612
612
|
name: index2.Key_name
|
|
613
613
|
};
|
|
614
|
-
if (!index2.Non_unique
|
|
614
|
+
if (!index2.Non_unique) {
|
|
615
615
|
indexInfo.type = "unique";
|
|
616
616
|
}
|
|
617
617
|
ret[index2.Key_name] = indexInfo;
|
|
@@ -1275,7 +1275,7 @@ const createSchemaDiff = (db) => {
|
|
|
1275
1275
|
const hasChangedStatus = (diff) => diff.status === statuses.CHANGED;
|
|
1276
1276
|
const diffIndexes = (oldIndex, index2) => {
|
|
1277
1277
|
const changes = [];
|
|
1278
|
-
if (_.
|
|
1278
|
+
if (!_.isEqual(oldIndex.columns, index2.columns)) {
|
|
1279
1279
|
changes.push("columns");
|
|
1280
1280
|
}
|
|
1281
1281
|
if (oldIndex.type && index2.type && _.toLower(oldIndex.type) !== _.toLower(index2.type)) {
|
|
@@ -6401,7 +6401,6 @@ const createPublishedAtColumn = async (db, tableName) => {
|
|
|
6401
6401
|
await db.schema.alterTable(tableName, (table) => {
|
|
6402
6402
|
table.string("published_at");
|
|
6403
6403
|
});
|
|
6404
|
-
await db(tableName).update({ published_at: /* @__PURE__ */ new Date() });
|
|
6405
6404
|
};
|
|
6406
6405
|
const createdPublishedAt = {
|
|
6407
6406
|
name: "5.0.0-04-created-published-at",
|