#69 managed to create a connection through a new entity
parent
14c28050c7
commit
8564f2cf34
@ -0,0 +1,28 @@
|
|||||||
|
package ru.ulstu.user.model;
|
||||||
|
|
||||||
|
import ru.ulstu.core.model.BaseEntity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "users_conference")
|
||||||
|
public class UserConference extends BaseEntity {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Column(name = "participation", nullable = false)
|
||||||
|
private String participation;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Column(name = "deposit", nullable = false)
|
||||||
|
private String deposit;
|
||||||
|
|
||||||
|
@ManyToOne(optional = false)
|
||||||
|
@JoinColumn(name = "users_id")
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||||
|
<changeSet author="vova" id="20190417_000000-1">
|
||||||
|
<addColumn tableName="users_conference">
|
||||||
|
<column name="id" type="integer"></column>
|
||||||
|
<column name="version" type="integer"></column>
|
||||||
|
</addColumn>
|
||||||
|
<addPrimaryKey columnNames="id" constraintName="pk_users_conference" tableName="users_conference"/>
|
||||||
|
<modifyDataType tableName="users_conference" columnName="participation" newDataType="varchar(255)"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
Loading…
Reference in New Issue