Proposal to add support for space-separated migration names in the sea-orm-cli tool. #1653
babalolajnr
started this conversation in
Ideas
Replies: 1 comment
-
|
This is an interesting idea. A PR would be welcomed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discussed in #1536
Originally posted by babalolajnr March 11, 2023
Currently, the sea-orm-cli tool only supports generating migrations using underscore-separated names. For example, the following command generates a migration named "create_user_table":
While this works well, it can be cumbersome to type out long migration names that require underscores after each word. To address this, I propose adding support for space-separated migration names in the sea-orm-cli tool. This would allow users to generate migrations using a more natural and convenient syntax. For example, the following command would generate a migration named "create user table":
$ sea-orm-cli migrate generate "create user table"This change would improve the user experience of the sea-orm-cli tool, making it easier and more intuitive to use.
Technical Implementation
To implement this feature, I propose adding a new command-line option to the sea-orm-cli migrate generate command. This option would allow users to specify a space-separated migration name. The tool would then convert the space-separated name to an underscore-separated name before generating the migration file.
Specifically, the implementation would involve the following steps:
To ensure that the tool works as expected, thorough testing would be required. This would involve testing the tool with various migration names, including ones with spaces and underscores, to verify that the conversion from space-separated to underscore-separated names works correctly.
Conclusion
In summary, adding support for space-separated migration names in the sea-orm-cli tool would improve the usability and convenience of the tool for users. This proposal outlines a straightforward technical implementation for this feature, and thorough testing would be required to ensure its reliability. As a first-time contributor, I am excited about the opportunity to work on this feature and contribute to the sea-orm-cli project. I would also like to stick around, use this as an opportunity to get my feet wet with the codebase.
Beta Was this translation helpful? Give feedback.
All reactions