Skip to content

Optimizing where schema is stored #23

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

Open
nguyenk opened this issue Jul 6, 2016 · 2 comments
Open

Optimizing where schema is stored #23

nguyenk opened this issue Jul 6, 2016 · 2 comments
Assignees

Comments

@nguyenk
Copy link
Member

nguyenk commented Jul 6, 2016

Schema is stored in a file inside the package, meaning, if I remove the package I loose the shema file, and next time I will register a DB patch, it will create a complete DB creation patch.

Quick Solution : store if in mouf/no_commit, or in any unversionned file/folder INSIDE the project

Clean Solution : TDB :). Maybe the best is storing it in database...

@xhuberty
Copy link
Contributor

xhuberty commented Mar 1, 2017

As we want to dissociate package from Mouf framework the quick solution will not implemented.
We still need to work on it to find the best solution since this package will help all DataMapper ORM user.

@moufmouf
Copy link
Member

moufmouf commented Mar 2, 2017

As we want to dissociate package from Mouf framework the quick solution will not implemented.

So far, the database.patch package is very much linked to Mouf (because it massively uses instances to register patches and because it is heavily based on the UI to register a new patch). I mean: we don't really have a way to register a patch out the UI.

So I'd still be ok to move the patch file to mouf/no_commit (if the directory exists), with a fallback to the package directory maybe?

Yet, I was thinking about something a bit different. I think we should create a completely new patch type that stores a complete DB model instead of just some SQL. Bonus: we should have a UI (using Vue or Angular) that let's us create/add/modify tables.

When applying the patch, a diff is made with the current model and the diff is applied.

What do you think?

@moufmouf moufmouf changed the title Optimizing where shema is stored Optimizing where schema is stored Mar 2, 2017
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

3 participants