sea-orm icon indicating copy to clipboard operation
sea-orm copied to clipboard

migration up or down to the specific version

Open velasco300 opened this issue 3 years ago • 10 comments

example:
Enter at the command line: sea-orm-cli migrate up -V m20220120_000001_create_post_table

velasco300 avatar May 23 '22 10:05 velasco300

@velasco300 hello! Thank you for contribution! I think we can merge this after: https://github.com/SeaQL/sea-orm/pull/706.

ikrivosheev avatar May 25 '22 11:05 ikrivosheev

Thank you

velasco300 avatar May 25 '22 13:05 velasco300

@billy1624 Thank you for your feedback. At first What I thought was that I knew clearly that I wanted to change to a certain version, but I had to understand and handle more details. For example, in shell scripts, You have to do like this: when > version then do something when < version then do something when unknown then do something, such API are not easy to use. I'll fix it later

velasco300 avatar Jun 02 '22 03:06 velasco300

Appreciated :)

billy1624 avatar Jun 02 '22 04:06 billy1624

@billy1624 I fixed it, in your case( sea-orm-cli migrate up -V m20220120_000001_create_post_table ),In my case( sea-orm-cli migrate up -V m20220120_000001_create_post_table -f )

velasco300 avatar Jun 02 '22 07:06 velasco300

It would be appreciated if we have some test cases around

billy1624 avatar Jun 06 '22 03:06 billy1624

We have upgraded clap to 3.2. We could rebase current PR onto latest master :)

  • https://github.com/SeaQL/sea-orm/pull/706

billy1624 avatar Jun 27 '22 03:06 billy1624

Ah I don't have a clear thought / comment for this for now

tyt2y3 avatar Jun 27 '22 16:06 tyt2y3

upgraded

velasco300 avatar Jun 28 '22 10:06 velasco300

@billy1624 @tyt2y3 I think the PR is done if you want to review it.

velasco300 avatar Jun 28 '22 10:06 velasco300