Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize Column Naming in EcommerceFramework Product Index Table #160

Closed
wants to merge 1 commit into from

Conversation

rliebi
Copy link
Contributor

@rliebi rliebi commented Feb 15, 2024

Standardize Column Naming in EcommerceFramework Product Index Table

See Issue #159

This pull request introduces a migration that standardizes the column naming conventions in the ecommerceframework_productindex table by removing the 'o_' prefix from its columns. This change aims to enhance readability and maintain consistency across the database schema.

Key Changes:

Migration Implementation: A new migration (Version20240215093348) has been added to handle the renaming of columns by removing the 'o_' prefix. This includes both up() and down() methods to ensure that changes can be rolled back if necessary.
Column Renaming Logic: The migration iterates over specified columns with the 'o_' prefix, checks for their existence, and renames them accordingly. A safeguard is in place to handle potential non-existing columns gracefully, logging the attempt without causing errors.
Down Migration: To ensure reversibility, the down migration logic reinstates the 'o_' prefix to the column names, should a rollback be required.

Motivation:

This update is part of an ongoing effort to improve the codebase's consistency and adherence to best practices. By standardizing column names, we aim to improve developer experience and facilitate easier maintenance of the database schema.

Testing:

Comprehensive testing has been conducted to ensure that the migration executes as expected in both directions (up and down).
Additional tests have been added to verify that the application's functionality remains unaffected by the schema changes.

@rliebi rliebi changed the base branch from 1.x to 1.0 March 16, 2024 21:46
This commit removes the 'o_' prefix from columns in the 'ecommerceframework_productindex' table to standardize column naming conventions across the EcommerceFrameworkBundle. The update includes both the up and down migration methods to ensure seamless transition and rollback capability.
@rliebi
Copy link
Contributor Author

rliebi commented Mar 16, 2024

rebased to 1.0

@Corepex Corepex self-assigned this Mar 22, 2024
@Corepex
Copy link
Contributor

Corepex commented Mar 22, 2024

Hi @rliebi,

thanks for creating this PR.
It is absolutely awesome that you help us with the housekeeping stuff 🥳

Afaik, this is not enough to get rid of the o_ prefix since we potentially have multiple index tables (dependent on the tenant, used product technology, etc.). The ecommerceframework_productindex table is only present in one of the simplest use cases.

That also means that we talk of a BC-Break if we would really adjust these settings ...

@rliebi
Copy link
Contributor Author

rliebi commented Mar 22, 2024

Hey @Corepex Thanks for your reply. We had this issue in our environment so I thought I'd fix it for you because we could not deploy without this, so I thought I'd share.. As this is more than a month in the past I cannot provide you more details without having another look into it, which unfortunately, rn I don't have the time for :-(

@Corepex
Copy link
Contributor

Corepex commented Mar 29, 2024

@rliebi, thanks for your PR. Sadly, I can't merge that right now because there are too many open questions. This would create more than one BC break and, therefore, require a major version.

@Corepex Corepex closed this Mar 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants