paint-brush
Learn Why and How to Use Relational Database Migrations by@artemsutulov
1,445 reads
1,445 reads

Learn Why and How to Use Relational Database Migrations

by Artem Sutulov7mJuly 16th, 2022
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Introduction When developing backend services, it’s effortless to create problems if database integration is implemented incorrectly. Nowadays, developers mostly use two approaches: Automatic generation, e.g., JPA or Hibernate - database initializes and keeps up to date by comparing classes and the current DB state; if changes are needed, they apply. That means that in Hibernate entity, we add the new column: @Column(name = "receive_notifications", nullable = false) private Boolean receiveNotifications; After starting the app, we see the error in logs and no new column. Each developer requires a separate environment. But it’s better next time to consider migrations because it will relieve Java entities, remove excess responsibility, and benefit you with a lot of control over DDL. You can find the fully working example on GitHub.
featured image - Learn Why and How to Use Relational Database Migrations
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
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).

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

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