@strapi/database 5.0.0-rc.10 → 5.0.0-rc.12

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
@@ -6176,15 +6176,15 @@ const getNextIdsToCreateDocumentId = async (db, knex2, {
6176
6176
  };
6177
6177
  const migrateDocumentIdsWithLocalizations = async (db, knex2, meta) => {
6178
6178
  const singularName = meta.singularName.toLowerCase();
6179
- const joinColumn = identifiers.getJoinColumnAttributeIdName(singularName);
6180
- const inverseJoinColumn = identifiers.getInverseJoinColumnAttributeIdName(singularName);
6179
+ const joinColumn = _.snakeCase(`${singularName}_id`);
6180
+ const inverseJoinColumn = _.snakeCase(`inv_${singularName}_id`);
6181
6181
  let ids;
6182
6182
  do {
6183
6183
  ids = await getNextIdsToCreateDocumentId(db, knex2, {
6184
6184
  joinColumn,
6185
6185
  inverseJoinColumn,
6186
6186
  tableName: meta.tableName,
6187
- joinTableName: identifiers.getJoinTableName(meta.tableName, `localizations`)
6187
+ joinTableName: _.snakeCase(`${meta.tableName}_localizations_links`)
6188
6188
  });
6189
6189
  if (ids.length > 0) {
6190
6190
  await knex2(meta.tableName).update({ document_id: cuid2.createId() }).whereIn("id", ids);
@@ -6206,7 +6206,7 @@ const createDocumentIdColumn = async (knex2, tableName) => {
6206
6206
  });
6207
6207
  };
6208
6208
  const hasLocalizationsJoinTable = async (knex2, tableName) => {
6209
- const joinTableName = identifiers.getJoinTableName(tableName, "localizations");
6209
+ const joinTableName = _.snakeCase(`${tableName}_localizations_links`);
6210
6210
  return knex2.schema.hasTable(joinTableName);
6211
6211
  };
6212
6212
  const createdDocumentId = {