k98kurz / sqloquent

Python 3+ SQL ORM system inspired by Eloquent
Other
1 stars 0 forks source link

sqloquent.tools.make_migration_from_model should take just the model class as a parameter #10

Closed k98kurz closed 1 month ago

k98kurz commented 1 month ago

Is your feature request related to a problem? Please describe.

Currently, the sqloquent.tools.make_migration_from_model function takes a name and file path.

Describe the solution you'd like

This tool would be more useful for use in other libraries/packages if it took just the model itself as a parameter and let the tool user import the model.

Describe alternatives you've considered

Retaining the existing function will make using it more difficult for library authors.

Additional context

There is a function in sqloquent.tools called _make_migration_from_model with the correct functionality. The leading underscore can be removed and the original function with that name have "_path" appended to its name.

k98kurz commented 1 month ago

Done