Создаю spring приложение. Нужно создать бд связную manytoone вылетает ошибка
Error executing DDL "alter table page add constraint FKj2jx0gqa4h7wg8ls0
@Entity
@Table(name = "Page",indexes =
@Index(columnList = "path"))
@Getter
@Setter
public class PageTable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "site_id",nullable = false)
private SiteTable siteId;
@Column(columnDefinition = "TEXT", nullable = false)
private String path;
@Column(nullable = false)
private int code;
@Column(columnDefinition = "MEDIUMTEXT",nullable = false)
private String content;
}
@Entity
@Table(name = "Site")
@Getter
@Setter
public class SiteTable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false)
private int id;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private StatusEnum status;
@Column(columnDefinition = "DataTime",nullable = false,name = "status_time")
private LocalDateTime statusTime;
@Column(columnDefinition = "TEXT",name = "last_error")
private String lastError;
@Column(columnDefinition = "VARCHAR(255)",nullable = false)
private String url;
@Column(columnDefinition = "VARCHAR(255)",nullable = false)
private String name;
}