Skip to content

[RFC] rename migration folder #129

Open

Description

@legalsylvain

When making a patch on a migration script, we have to rename the migration folder with the same name as the bumped revision. It could be automated.

I think that it could be an option of the ocabot. like bump-migration. the patch / minor / nobump / major is a choice of the people that are merging. (maintainers) not a choice of the developper.

CC : @sbidoul : what do you think ?

Ref : OCA/server-ux#213

Activity

  1. sbidoul commented on Nov 3, 2020

    @sbidoul
    Member

    Sounds interesting.

  2. hparfr commented on Mar 28, 2024

    @hparfr

    Hi,

    I think we can achieve it if in the merge requests we:

      1. tell the developper puts the migrations scripts in the directory 0.0.0/
      1. adapt oca-ci, to always increment version number of the module before running the tests
      1. adapt oca-bot bump to rename the directory 0.0.0 to the new version number
    1. should be possible according to odoo
            A special folder named ``0.0.0`` can contain scripts that will be run on any version change.
    
    1. with a temporary / throw-away version number like major.minor.patch+1
  3. hparfr commented on Mar 29, 2024

    @hparfr
  4. legalsylvain commented on Mar 29, 2024

    @legalsylvain
    CollaboratorAuthor

    tell the developper puts the migrations scripts in the directory 0.0.0/

    That can not be asked to developpers. Sometimes, it is not possible to write idempotens scripts.

  5. hparfr commented on Mar 30, 2024

    @hparfr

    I don't think migrations scripts have to be idempotants.

    It should allow to run migration scripts and do not generate conflicts on github/oca pull requests.

    With my proposal we may break the workflow when someone checkout pr - branches instead of stable.

    One should adapt his tooling to manage modules containing a migrations/0.0.0 by doing the kind of steps (increment manifest and name the migration directory with the good version) to apply after the checkout instead of in the PR.

  6. legalsylvain commented on Mar 30, 2024

    @legalsylvain
    CollaboratorAuthor

    I didn't understood your proposal i think.
    On the meantime, i'm not sure to be agree with what i wrote 3 years ago.
    Let's talk about that topic in the next oca days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot TaskA task the bot does or should doenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions