Commit ba6d4747 by Juho Juopperi

do not require meta field in dbupdater tables

1 parent 9ae5aa24
......@@ -4,22 +4,44 @@ import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import fi.codecrew.moya.utilities.jpa.ModelInterface;
@Entity
@Table(name = "db_models")
public class DBModel extends GenericEntity {
private static final long serialVersionUID = 5073284536090477220L;
public class DBModel implements ModelInterface {
private static final long serialVersionUID = 5073284536090477221L;
public static final String ID_COLUMN = "id";
@Column(name="revision", nullable=false)
@Id
@Column(name = ID_COLUMN, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@Column(name = "revision", nullable = false)
private Integer revision;
@Column(name="applied_at")
@Column(name = "applied_at")
@Temporal(TemporalType.TIMESTAMP)
private Date appliedAt = new Date();
@Override
public final Integer getId() {
return id;
}
@Override
public final void setId(Integer id) {
this.id = id;
}
public Date getAppliedAt() {
return appliedAt;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!