paint-brush
了解为什么以及如何使用关系数据库迁移经过@artemsutulov
1,471 讀數
1,471 讀數

了解为什么以及如何使用关系数据库迁移

经过 Artem Sutulov7m2022/07/16
Read on Terminal Reader
Read this story w/o Javascript

太長; 讀書

简介在开发后端服务时,如果数据库集成实施不正确,很容易产生问题。 如今,开发人员主要使用两种方法: 自动生成,例如 JPA 或 Hibernate - 数据库通过比较类和当前数据库状态来初始化并保持最新;如果需要更改,则适用。 这意味着在 Hibernate 实体中,我们添加了新列:@Column(name = "receive_notifications", nullable = false) private Boolean receiveNotifications;启动应用程序后,我们在日志中看到错误并且没有新列。 每个开发人员都需要一个单独的环境。 但是下次最好考虑迁移,因为它会减轻 Java 实体的负担,消除过多的责任,并通过对 DDL 的大量控制使您受益。 您可以在 GitHub 上找到完整的工作示例。
featured image - 了解为什么以及如何使用关系数据库迁移
Artem Sutulov HackerNoon profile picture
Artem Sutulov

Artem Sutulov

@artemsutulov

I'm a professional FullStack Software Engineer, currently working for Revolut as Software Engineer (Backend).

學到更多
LEARN MORE ABOUT @ARTEMSUTULOV'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Artem Sutulov HackerNoon profile picture
Artem Sutulov@artemsutulov
I'm a professional FullStack Software Engineer, currently working for Revolut as Software Engineer (Backend).

標籤

Languages

这篇文章刊登在...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite