dosubot[bot] commented on issue #8177:
URL: 
https://github.com/apache/incubator-devlake/issues/8177#issuecomment-2450634540

   <!-- Answer -->
   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` 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/jira/models/migrationscripts/register.go)</sup>.
   
   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:
   
      ```go
      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` 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/jira/models/migrationscripts/register.go)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/DeveloperManuals/DBMigration.md)</sup>.
   
   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 
<sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/DeveloperManuals/DBMigration.md)</sup>.
   
   Once you've added and tested the migration script, you can proceed with 
submitting your pull request.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to