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

An option to 'loosely' follow unmanaged models in certain scenarios #1

Open
hannylicious opened this issue Nov 14, 2024 · 0 comments
Open

Comments

@hannylicious
Copy link
Owner

There should be an option to follow unmanaged models 'strictly' (which should be the default); but in some instances - people have projects with unmanaged models that are a 'bare bones' basic model, because the columns are already setup in the DB and they just want a model to be able to interface with them.

For example maybe there is a model that on the database level allows null fields in a column. The developer builds out a basic model, just the 'bare minimum model' to get working. It just has the column name and type (it does not have null=True).

In it's current form, there will be an issue when the user tries to save something to that row if the data being entered has a null value, despite that being a perfectly allowable outcome (on the staging/production dbs for example).

Perhaps an argument like --loose would make it create the fields in the 'loosest' sense possible (allowing null/blank for any/all) for when a user needs that.

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