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

Question about interaction between migrations and model #58

Open
tblattner opened this issue Jan 30, 2025 · 0 comments
Open

Question about interaction between migrations and model #58

tblattner opened this issue Jan 30, 2025 · 0 comments

Comments

@tblattner
Copy link

tblattner commented Jan 30, 2025

I have an existing database with about a dozen or so tables that I'm thinking of shifting to integrate with the TinyORM system.

I've read through the documentation about migrations and TinyORM, and want to get your take on what the next logical steps should be.

What I'd like to do is utilize the migrations mechanism to track database updates, while also having a model to interact with the database using ORM.

From what I can tell, you have to specify the full structure of the database using the model interface, but then at the same time expressing the migrations side separately.

My question is: Is there a way to map the migrations into the model? For example, if we have changes to a table, we would create a new migration to express those changes, then would we also have to update the model code as well? Or could the migration change update the model? I didn't see any mention of that interaction in the documentation, so I'm guessing they are meant to be independent?

Also, thank you for a great C++ tool for ORMs, hoping to get a chance to express the database using this library.

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

No branches or pull requests

1 participant