Добавил версию pr
This commit is contained in:
parent
472782184c
commit
31ce2c6cd3
@ -49,6 +49,9 @@ public class PullRequest {
|
|||||||
@Column(name = "repository_id")
|
@Column(name = "repository_id")
|
||||||
private Long repositoryId;
|
private Long repositoryId;
|
||||||
|
|
||||||
|
@Column(name = "version")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "author_login")
|
@JoinColumn(name = "author_login")
|
||||||
private User author;
|
private User author;
|
||||||
@ -67,20 +70,4 @@ public class PullRequest {
|
|||||||
@Column(name = "status")
|
@Column(name = "status")
|
||||||
private PullRequestStatus status;
|
private PullRequestStatus status;
|
||||||
|
|
||||||
// public void setReviewers(List<Reviewer> reviewers) {
|
|
||||||
// this.reviewers = reviewers;
|
|
||||||
// this.reviewers.forEach(reviewer -> reviewer.setPullRequest(this));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public PullRequest(Long bitbucketId, Long repositoryId, User author, List<Reviewer> reviewers, String url, String name, PullRequestStatus status) {
|
|
||||||
// this.bitbucketId = bitbucketId;
|
|
||||||
// this.repositoryId = repositoryId;
|
|
||||||
// this.author = author;
|
|
||||||
// this.reviewers = reviewers;
|
|
||||||
// this.url = url;
|
|
||||||
// this.name = name;
|
|
||||||
// this.status = status;
|
|
||||||
// this.reviewers.forEach(reviewer -> reviewer.setPullRequest(this));
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ public class PullRequestJsonConverter implements Converter<PullRequestJson, Pull
|
|||||||
public PullRequest convert(PullRequestJson json) {
|
public PullRequest convert(PullRequestJson json) {
|
||||||
return PullRequest.builder()
|
return PullRequest.builder()
|
||||||
.bitbucketId(json.getId())
|
.bitbucketId(json.getId())
|
||||||
|
.version(json.getVersion())
|
||||||
.repositoryId(json.getFromRef().getRepository().getId())
|
.repositoryId(json.getFromRef().getRepository().getId())
|
||||||
.author(this.convertUser(json.getAuthor().getUser()))
|
.author(this.convertUser(json.getAuthor().getUser()))
|
||||||
.name(json.getTitle())
|
.name(json.getTitle())
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||||
|
|
||||||
<include file="liquibase/change-set/create-table.xml"/>
|
<include file="liquibase/change-set/create-table.xml"/>
|
||||||
|
<include file="liquibase/change-set/v1.2.0"/>
|
||||||
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
12
src/main/resources/liquibase/change-set/v1.2.0.xml
Normal file
12
src/main/resources/liquibase/change-set/v1.2.0.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<databaseChangeLog
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||||
|
|
||||||
|
<changeSet id="v1.2.0-add-atribute-pr" author="upagge">
|
||||||
|
<addColumn tableName="pull_request">
|
||||||
|
<column name="version" type="integer"/>
|
||||||
|
</addColumn>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
Loading…
Reference in New Issue
Block a user