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

Support schema change on all branches? #7675

Open
MrSEKIRO opened this issue Apr 2, 2024 · 3 comments
Open

Support schema change on all branches? #7675

MrSEKIRO opened this issue Apr 2, 2024 · 3 comments

Comments

@MrSEKIRO
Copy link

MrSEKIRO commented Apr 2, 2024

Is it possible to apply schema changes to all branches?

I'm considering using Dolt solely for data version control in my application. If a new feature requires schema modifications, can those changes be applied consistently across all branches?

@timsehn
Copy link
Contributor

timsehn commented Apr 2, 2024

This is something we can certainly consider.

Right now, the way we recommend do this is using a schema branch and merges in the application. When you are using a non-schema branch in the application, inspect the dolt_schema_diff function between your current branch and the schema branch to see if there is a schema change in the schema branch. If so, do a merge.

Let us discuss an interface for making schema changes (and maybe all types of changes) to all heads.

@timsehn timsehn added enhancement New feature or request version control labels Apr 2, 2024
@zachmu
Copy link
Member

zachmu commented Apr 2, 2024

There are a few different ways we might implement this.

When you say "applied consistently", do you mean you expect all branches modified to update as one atomic unit? Or is it acceptable for each branch to get updated separately, in its own atomic commit?

@MrSEKIRO
Copy link
Author

MrSEKIRO commented Apr 3, 2024

There are a few different ways we might implement this.

When you say "applied consistently", do you mean you expect all branches modified to update as one atomic unit? Or is it acceptable for each branch to get updated separately, in its own atomic commit?

One approach would be to disable schema version control through specific configurations. This would allow all branches to use the same schema, enabling atomic updates.

However, this approach wouldn't be suitable for normal cases where schema changes are tracked. In such scenarios, separate updates to each branch might be necessary for certain non-atomic operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants