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

[cli] Add -u, --universal-time option in generate to use UTC Time instead of Local Time for migration filename. #947

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

Animeshz
Copy link
Contributor

@Animeshz Animeshz commented Aug 8, 2022

PR Info

Adds

  • Option -u | --universal-time to sea-orm-cli migrate generate MIGRATION_NAME command, for generating the filename with GMT+0:00.

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Animeshz, thanks for the prompt PR!!

Could you please also update sea-orm-migration?

error[E0027]: pattern does not mention field `universal_time`
  --> /home/runner/work/sea-orm/sea-orm/sea-orm-migration/src/cli.rs:68:14
   |
68 |         Some(MigrateSubcommands::Generate { migration_name }) => {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `universal_time`
   |
help: include the missing field in the pattern
   |
68 |         Some(MigrateSubcommands::Generate { migration_name, universal_time }) => {
   |                                                           ~~~~~~~~~~~~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
   |
68 |         Some(MigrateSubcommands::Generate { migration_name, .. }) => {
   |                                                           ~~~~~~

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/runner/work/sea-orm/sea-orm/sea-orm-migration/src/cli.rs:69:13
    |
69  |             run_migrate_generate(MIGRATION_DIR, &migration_name)?
    |             ^^^^^^^^^^^^^^^^^^^^ -------------  --------------- supplied 2 arguments
    |             |
    |             expected 3 arguments
    |
note: function defined here
   --> /home/runner/work/sea-orm/sea-orm/sea-orm-cli/src/commands/migrate.rs:105:8
    |
105 | pub fn run_migrate_generate(
    |        ^^^^^^^^^^^^^^^^^^^^

https://github.com/SeaQL/sea-orm/runs/7722249442?check_suite_focus=true#step:4:580

Again, thank you for the contributions!!

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! @Animeshz

@billy1624 billy1624 requested a review from tyt2y3 August 10, 2022 08:12
@billy1624 billy1624 merged commit ad5e8c1 into SeaQL:master Sep 25, 2022
billy1624 added a commit that referenced this pull request Sep 25, 2022
billy1624 pushed a commit to SeaQL/seaql.github.io that referenced this pull request Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FeatureRequest] An option to generate migration file based on UTC time instead of LocalTime
2 participants