Skip to content

Commit

Permalink
Revert "HCK-8971: include schema name in index name of DDL (#59)" (#60)
Browse files Browse the repository at this point in the history
This reverts commit fbd5db7.
  • Loading branch information
Nightlngale authored Dec 5, 2024
1 parent fbd5db7 commit 4893a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions forward_engineering/ddlProvider/ddlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = (baseProvider, options, app) => {
const { assignTemplates } = app.require('@hackolade/ddl-fe-utils');
const { decorateDefault, decorateType, canBeNational, getSign, canHaveAutoIncrement } =
require('./ddlHelpers/columnDefinitionHelper')(_, wrap);
const { getTableName, getIndexName, getTableOptions, getPartitions, getViewData, getCharacteristics, escapeQuotes, wrapInTics } =
const { getTableName, getTableOptions, getPartitions, getViewData, getCharacteristics, escapeQuotes, wrapInTics } =
require('../utils/general')({ _, wrap });
const { generateConstraintsString, foreignKeysToString, foreignActiveKeysToString, createKeyConstraint } =
require('./ddlHelpers/constraintsHelper')({
Expand Down Expand Up @@ -204,7 +204,7 @@ module.exports = (baseProvider, options, app) => {
const wholeStatementCommented = index.isActivated === false || !isParentActivated || allDeactivated;
const indexType = index.indexType ? `${_.toUpper(index.indexType)} ` : '';
const ifNotExist = index.ifNotExist ? 'IF NOT EXISTS ' : '';
const name = getIndexName({ name: index.indxName, schemaName: dbData.databaseName });
const name = wrap(index.indxName, '`', '`');
const table = getTableName(tableName, dbData.databaseName);
const indexCategory = index.indexCategory ? ` USING ${index.indexCategory}` : '';
let indexOptions = [];
Expand Down
11 changes: 0 additions & 11 deletions forward_engineering/utils/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ module.exports = ({ _, wrap }) => {
return getNamePrefixedWithSchemaName(tableName, schemaName);
};

/**
* @param {Object} params
* @param {string} params.name
* @param {string} params.schemaName
* @returns {string}
*/
const getIndexName = ({ name, schemaName }) => {
return getNamePrefixedWithSchemaName(name, schemaName);
}

/**
* @param schemaName {string}
* @param procedureName {string}
Expand Down Expand Up @@ -404,7 +394,6 @@ module.exports = ({ _, wrap }) => {

return {
getTableName,
getIndexName,
getCollectionName,
getCollectionSchema,
getDatabaseName,
Expand Down

0 comments on commit 4893a7c

Please sign in to comment.