Transforming the Springboot Postgres to MySQL having some serious issues.

Thing is I use PostGIS spatial data, here I have to figure it out. The error is confusing, the tables have been created
3 Replies
JavaBot
JavaBot2w ago
This post has been reserved for your question.
Hey @Rag...JN 🌌 🦡 👽 💰 🐊! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Rag...JN 🌌 🦡 👽 💰 🐊
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "business_group")
public class BusinessGroup {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;

private String name;

private BusinessType businessType;
private String description;
private String location;
private Double latitude;
private Double longitude;

@ManyToOne
@JoinColumn(name = "client_id")
private Client client;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

private String createdBy;
}
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "business_group")
public class BusinessGroup {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;

private String name;

private BusinessType businessType;
private String description;
private String location;
private Double latitude;
private Double longitude;

@ManyToOne
@JoinColumn(name = "client_id")
private Client client;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

private String createdBy;
}
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "hotel")
public class Hotel {
// @GeneratedValue(strategy = GenerationType.AUTO, generator = "hotel_seq")
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
// @SequenceGenerator(name = "hotel_seq", sequenceName = "hotel_seq", allocationSize = 1)

private String name;
private String description;
private String location;


@JsonSerialize(using = PointToJsonSerializer.class)
// @Column(columnDefinition = "geometry(Point,4326)")
private Point geoLocation;

@ManyToOne
@JoinColumn(name = "business_group_id")
private BusinessGroup businessGroup;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
private Date updatedDateTime;

private String createdBy;

private String updatedBy;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "hotel")
public class Hotel {
// @GeneratedValue(strategy = GenerationType.AUTO, generator = "hotel_seq")
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
// @SequenceGenerator(name = "hotel_seq", sequenceName = "hotel_seq", allocationSize = 1)

private String name;
private String description;
private String location;


@JsonSerialize(using = PointToJsonSerializer.class)
// @Column(columnDefinition = "geometry(Point,4326)")
private Point geoLocation;

@ManyToOne
@JoinColumn(name = "business_group_id")
private BusinessGroup businessGroup;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
@Column(updatable = false)
private Date createdDateTime;

@Temporal(TemporalType.TIMESTAMP)
@CreationTimestamp
private Date updatedDateTime;

private String createdBy;

private String updatedBy;

It has moe tables but this is the first error Error
Hibernate:
alter table business_group
drop
foreign key FKshjv291jkjsvi1hmjsqthmofa
Hibernate:
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn
2024-12-10 15:44:21 - GenerationTarget encountered exception accepting command : Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
Hibernate:
alter table business_group
drop
foreign key FKshjv291jkjsvi1hmjsqthmofa
Hibernate:
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn
2024-12-10 15:44:21 - GenerationTarget encountered exception accepting command : Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "
alter table hotel
drop
foreign key FK2h3jjjxm170fkkco3r9rbhshn" via JDBC [Table 'my-city.hotel' doesn't exist]
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server