Author Archives: Stanislav_Panteleev

Java.DBMigrationTools.Explain when rollback happens in liquibase, when this event fired ?

✅ Short Answer Liquibase doesn’t automatically rollback on failure.Rollback only happens when you explicitly run a rollback command — it’s a manual action you control. 🔎 When does rollback happen in Liquibase? Scenario Does rollback happen automatically? Explanation ❌ A … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Explain when rollback happens in liquibase, when this event fired ?

Java.DBMigrationTools.How rollback is implemented ? Give example

rollback support is one of the biggest advantages of using migration tools like Liquibase. It shows you’re thinking about safe deployments, disaster recovery, and controlled rollbacks — all critical in production. Let’s break it down: ✅ Short Answer In Liquibase, … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How rollback is implemented ? Give example

Java.DBMigrationTools.What formats can migration files be written in?

Migration files can be written in various formats depending on the tool: Tool Supported Formats Flyway SQL, Java (callbacks), JSON (limited) Liquibase XML, YAML, JSON, SQL 🔎 Detailed Explanation ✅ Flyway Flyway’s primary format is versioned SQL files, e.g.: Pure … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What formats can migration files be written in?

Java.DBMigrationTools.Why use tools like Liquibase or Flyway instead of raw SQL scripts?

✅ Short Answer Tools like Liquibase and Flyway are better than raw SQL scripts because they provide: Version control for schema changes Automation in deployments Auditability and rollback Safety and consistency across environmentsRaw SQL alone lacks these guarantees. 🔎 Detailed … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Why use tools like Liquibase or Flyway instead of raw SQL scripts?

Java.DBMigrationTools.What is a changeset?

A changeset is a single, versioned unit of change to the database schema — like a commit in version control.It defines one or more actions (e.g. createTable, addColumn, insertData) and is tracked by the migration tool to prevent reapplication. 🔎 … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What is a changeset?

Java.DBMigrationTools.What is a changelog file?

✅ Short Answer A changelog file is a version-controlled file that defines the sequence of changes to apply to your database schema over time.It acts as the master plan for database migrations. 🔎 Detailed Explanation A changelog file: Lists all … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What is a changelog file?

Java.DBMigrationTools.Why is schema versioning important?

✅ Short Answer Schema versioning is important because it ensures that your database structure evolves safely, consistently, and predictably across all environments (dev, staging, prod).It helps prevent data loss, deployment failures, and “it works on my machine” bugs. 🔎 Detailed … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Why is schema versioning important?

Java.DBMigrationTools.Beginner.What is a database migration tool

✅ Short Answer A database migration tool is a version control system for your database schema.It helps you: Track changes to the DB structure over time Apply those changes in a controlled and repeatable way Keep all environments (dev, staging, … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Beginner.What is a database migration tool

Java.Hibernate.Middle.How do you handle multi-tenancy with Hibernate?

✅ Short Answer Hibernate supports multi-tenancy via its built-in multi-tenancy API, which allows you to isolate data per tenant at the database, schema, or discriminator level by:✅ Choosing a multi-tenancy strategy (DATABASE, SCHEMA, or DISCRIMINATOR).✅ Implementing MultiTenantConnectionProvider (provides connections per … Continue reading →

Posted in Без рубрики | Comments Off on Java.Hibernate.Middle.How do you handle multi-tenancy with Hibernate?

Java.Hibernate.Middle.How do you implement auditing/versioning for entities in Hibernate?

How do you implement auditing/versioning for entities in Hibernate? 🔎 Option 1: Hibernate Envers (recommended) Envers is built into Hibernate → it provides automatic auditing of entity changes without requiring manual code to persist history. How it works: Envers creates … Continue reading →

Posted in Без рубрики | Comments Off on Java.Hibernate.Middle.How do you implement auditing/versioning for entities in Hibernate?