Hello and welcome to this tutorial. In today’s video, I’ll guide you through using Liquibase in a Spring Boot application with Maven.
Will show you how to use liquibase maven plugin to update, delete database schemas.
The liquibase dependency is present in the springboot initialiser, we add Lombok, We use Postgres database and we define two JPA entities: Employee and Department.
The JPA specification offers a diverse set of annotations facilitating the creation of corresponding database objects. For instance, the 'Entity' annotation is employed to generate a table, while the '@Table' annotation allows customization of the table name. Additionally, the '@Column' annotation is used to tailor column names, and '@Id' serves to designate a primary key.
Nevertheless, in many scenarios, there arises a necessity for enhanced control over the process of object creation within the database.
Moreover, the ability to centralize and track changes becomes crucial.
Unlike relying solely on JPA's automatic database schema generation, Liquibase offers a more controlled and versioned approach to database management in Spring Boot applications. It allows precise tracking and management of database changes, providing better control and transparency in the evolution of your database schema
For our demo, we create a Spring Boot application by adding the JPA starter, and adding the liquibase core maven dependency. And we deine two JPA entities: Employee and Department.
tramotech.de
Негізгі бет Liquibase for the Really Impatient
Пікірлер: 6