refactor: rename connection.RateLimit to connection.RateLimitPerHour#2492
Conversation
likyh
left a comment
There was a problem hiding this comment.
Maybe you can add some new migration scripts.
| Name string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"` | ||
| Endpoint string `mapstructure:"endpoint" env:"GITHUB_ENDPOINT" validate:"required"` | ||
| Proxy string `mapstructure:"proxy" env:"GITHUB_PROXY"` | ||
| RateLimitPerHour int `comment:"api request rate limit per hour"` |
There was a problem hiding this comment.
No, you can not change the archived file. It will break existing magrations.
There was a problem hiding this comment.
No, you can not change the archived file. It will break existing magrations.
@likyh
How about we don't add the migration script this time, just so v0.12 doesn't affect it, and we'll add it in a subsequent version?
There was a problem hiding this comment.
or we need to change version.
There was a problem hiding this comment.
Change the version value of the migration script to a newer value is sufficient before next release
There was a problem hiding this comment.
Keep going, K-ON @phzbbbbbbbb 😹
| Name string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"` | ||
| Endpoint string `mapstructure:"endpoint" env:"GITHUB_ENDPOINT" validate:"required"` | ||
| Proxy string `mapstructure:"proxy" env:"GITHUB_PROXY"` | ||
| RateLimitPerHour int `comment:"api request rate limit per hour"` |
There was a problem hiding this comment.
Change the version value of the migration script to a newer value is sufficient before next release
| RemotelinkCommitShaPattern string `gorm:"type:varchar(255);comment='golang regexp, the first group will be recognized as commit sha, ref https://github.com/google/re2/wiki/Syntax'" json:"remotelinkCommitShaPattern"` | ||
| Proxy string `json:"proxy"` | ||
| RateLimit int `comment:"api request rate limt per hour" json:"rateLimit"` | ||
| RateLimitPerHour int `comment:"api request rate limt per hour" json:"rateLimit"` |
There was a problem hiding this comment.
For Jira, please add a new migration script to rename the column, because unlink other plugins (connection is not supported before, thus no record in the database), Jira connection exists a long time ago, we need to keep those existing records in database intact. Here is an example FYI:
https://github.com/apache/incubator-devlake/blob/release-v0.11-hotfix/plugins/gitlab/models/migrationscripts/updateSchemas20220510.go
There was a problem hiding this comment.
I found that jira tables have been dropped too
There was a problem hiding this comment.
I found that jira tables have been dropped too
@warren830
No, connction exists. zhenmian is right, but the other way is that I directly changed the ratelimit parameter, then he doesn't need to write the migration scripts.
|
@phzbbbbbbbb Hi, thank you for your contribution to Apache Devlake, Devlake community specially invites you to join our contributor group and issue you a contributor certificate. If you are willing, please contact 13120413800@163.com. |

Summary
Description
rename connection.RateLimit to connection.RateLimitPerHour
Does this close any open issues?
close #2360