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

💡 Obsolete column attribute for save column drop #107

Open
gam6itko opened this issue Jan 23, 2025 · 0 comments
Open

💡 Obsolete column attribute for save column drop #107

gam6itko opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
type:feature New feature.

Comments

@gam6itko
Copy link
Contributor

gam6itko commented Jan 23, 2025

I have one database and several services are connected to it, let's say 3 of them (A, B, C).
I need to drop deprecated column in one of the tables.

I can simply delete Entity property, make a migration and apply it in service A. Then the other 2 services will start throwing errors that the column is missing. In this case, I need to update them ASAP. This is not always possible.

What if we add a new property to Column obsolete/deprecated/disable/forgotten/you_name_it) ?
This property:

  • tells schema-builder not to render schema for this column
  • tells query-builder not to build queries with this column
  • tells the migrator not to generate dropColumn for this column

In this case, we could first mark the column as obsolete, deploy update to all services.
Second step - we can delete Entity property, create migration with dropColumn and safely apply at all services.

@gam6itko gam6itko added the type:feature New feature. label Jan 23, 2025
@gam6itko gam6itko changed the title 💡 Obsolete column for save column drop 💡 Obsolete column attribute for save column drop Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature.
Projects
None yet
Development

No branches or pull requests

2 participants