apache / incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
https://devlake.apache.org/
Apache License 2.0
2.6k stars 528 forks source link

[Bug][Jira] Migration script not added to register.go #8177

Closed sstojak1 closed 2 weeks ago

sstojak1 commented 3 weeks ago

Search before asking

What happened

Add missing migration script for issues table to register.go. ... continuation on #7885

What do you expect to happen

migration script to be added to register.go so that it's executed when Devlake is started

How to reproduce

.

Anything else

No response

Version

v1.0.2-beta3@7cf1a60

Are you willing to submit PR?

Code of Conduct

dosubot[bot] commented 3 weeks ago

To add the missing migration script for the issues table to register.go, you need to follow these steps:

  1. Locate the register.go File: For the Jira plugin, the register.go file is located at backend/plugins/jira/models/migrationscripts/register.go [1].

  2. Add the Migration Script: Open the register.go file and add your migration script to the list returned by the All function. This function should include your new migration script in the slice of plugin.MigrationScript. For example:

    func All() []plugin.MigrationScript {
       return []plugin.MigrationScript{
           new(addCustomizedField),
           new(yourNewMigrationScript), // Add your migration script here
       }
    }
  3. Ensure Correct Naming: Make sure your migration script follows the naming convention, which includes a descriptive action and a timestamp formatted as YYYYMMDDHHMMSS [1][2].

  4. Test the Migration: Before submitting a pull request, test the migration script to ensure it executes correctly. Follow best practices for testing migration scripts, such as ensuring fault tolerance and using meaningful naming [2].

Once you've added and tested the migration script, you can proceed with submitting your pull request.

To continue talking to Dosu, mention @dosu.

sstojak1 commented 3 weeks ago

PR created