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

Does/will Jennifer support automatic initial migrations? #342

Open
ghost opened this issue Oct 1, 2020 · 3 comments
Open

Does/will Jennifer support automatic initial migrations? #342

ghost opened this issue Oct 1, 2020 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Oct 1, 2020

ORMs such as Django and SQLAlchemy not only support type-checked migrations, but can automatically generate the initial migration to create the models. I find this by far the most valuable migration-related feature as it saves me from having to write the schema in two places (in the actual model definition and in the initial migration). I don't see it documented anywhere (my apologies if I missed), but if it's there I will switch from Granite to this (Granite kind of supports it but it only works with a tiny subset of Granite's features so I can't actually use it).

@imdrasil
Copy link
Owner

imdrasil commented Oct 2, 2020

ATM Jennifer doesn't support this and I doesn't have this in the future feature list (before I haven't use such a feature anywhere). As an alternative you can use model generator to generate model and migration (here) but it wont help in the case when you already have models written by hand. Personally I believe that the opposite feature is much more required - create basic models based on existing DB schema (I have this in my plan but with low priority). Does it help you?

@ghost
Copy link
Author

ghost commented Oct 2, 2020

Interesting. Creating models based on existing DB schema sounds like it would solve my problem, and might be the better approach anyway.

@Nicolab
Copy link

Nicolab commented Nov 5, 2020

create basic models based on existing DB schema (I have this in my plan but with low priority).

This feature would be great!

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

No branches or pull requests

2 participants