530a7dea86
This PR will create the migration to be run for the morph relations - We created a dedicated util to generate the column name and refactored a little the code in order to have less dependencies and a clearer devX (updated the snapshot that changed because of this) - Moved the `createMigrationActions` to its own util as well - Created the `MorphRelationColumnActionFactory` based on the relation one --------- Co-authored-by: Charles Bochet <charles@twenty.com>
10 lines
202 B
TypeScript
10 lines
202 B
TypeScript
type ComputeRelationFieldJoinColumnNameArgs = {
|
|
name: string;
|
|
};
|
|
|
|
export const computeRelationFieldJoinColumnName = ({
|
|
name,
|
|
}: ComputeRelationFieldJoinColumnNameArgs) => {
|
|
return `${name}Id`;
|
|
};
|