This PR is dropping the column `targetColumnMap` of fieldMetadata entities. The goal of this column was to properly map field to their respecting column in the table. We decide to drop it and instead compute the column name on the fly when we need it, as it's more easier to support. Some parts of the code has been refactored to try making implementation of composite type more easier to understand and maintain. Fix #3760 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
6 lines
169 B
TypeScript
6 lines
169 B
TypeScript
export const customNamePrefix = '_';
|
|
|
|
export const computeTableName = (name: string, isCustom: boolean) => {
|
|
return isCustom ? `${customNamePrefix}${name}` : name;
|
|
};
|