Category Archives: Без рубрики

Java.DBMigrationTools.How can you log or monitor applied migrations in production?

You monitor migrations in prod by combining (1) the tool’s schema history table, (2) structured app logs around migration lifecycle, and (3) metrics/alerts. In interviews, I’m looking for all three. 1) Treat the migration history table as the source of … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How can you log or monitor applied migrations in production?

Java.DBMigrationTools.What strategies help avoid merge conflicts in changelog files?

Merge conflicts in changelog/migration files happen for one reason: multiple people append to the same “central” file or reuse the same version/id space. Fix that by making migrations append-only, isolated, and deterministic. 1) Stop editing a single “big” changelog Liquibase … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What strategies help avoid merge conflicts in changelog files?

Java.DBMigrationTools.How do you simulate a migration on a dev database before applying to prod?

To simulate a migration safely before prod, you want repeatability, prod-like data, and the same execution path your deployment will use. Here’s the playbook I expect a senior backend engineer to describe in an interview. 1) Use a prod-like environment, … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you simulate a migration on a dev database before applying to prod?

Algo.Theory.Trees.TraverseOrders

1️⃣ What is a tree (in computer science)? Think of a tree like a family tree 🌳 One root (top person) Each node can have children No cycles (you can’t come back up in a loop) Key words (very important) … Continue reading →

Posted in Без рубрики | Comments Off on Algo.Theory.Trees.TraverseOrders

Java.DBMigrationTools.What’s the best approach to seed data with a migration tool?

the “best” approach depends on what kind of data you’re seeding. The senior answer is: don’t treat all seed data the same—split it into categories and choose the mechanism that matches the lifecycle. 1) Classify seed data first A) Reference … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What’s the best approach to seed data with a migration tool?

Java.DBMigrationTools.How do you deal with legacy databases in a migration tool?

1) First: decide what “legacy” means Usually one of: DB exists, no migration history table DB exists, some scripts exist but not reliably reproducible Multiple environments drifted (prod ≠ stage ≠ dev) Your approach depends on which one it is. … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you deal with legacy databases in a migration tool?

Java.DBMigrationTools.How do you write migrations that work in both MySQL and Postgres?

“migrations that work on both MySQL and Postgres” is mostly about choosing the common subset, and when you can’t, splitting by DB in a controlled way. If you try to force 100% identical SQL, you’ll either lose important constraints or … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you write migrations that work in both MySQL and Postgres?

Java.DBMigrationTools.CREATE INDEX without CONCURRENTLY (Postgres) and No non-transactional DDL when migrate

1️⃣ “No CREATE INDEX without CONCURRENTLY (Postgres) if table is large” What actually happens in Postgres CREATE INDEX (default) Takes a SHARE LOCK on the table Blocks writes (INSERT / UPDATE / DELETE) On large tables → lock can be … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.CREATE INDEX without CONCURRENTLY (Postgres) and No non-transactional DDL when migrate

Java.DBMigrationTools.How can you automate validation of changelogs before applying them?

Automating “validate before apply” is basically: (1) static checks + (2) dry-run SQL generation + (3) run against an ephemeral DB + (4) gate merge/deploy. Below are the best-practice ways teams do it for Liquibase and Flyway. 1) Static validation … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How can you automate validation of changelogs before applying them?

Java.DBMigrationTools.How do you perform a zero-downtime deployment using migration tools?

for zero-downtime with Flyway/Liquibase the tool is not the magic — the migration strategy is. The standard interview answer is Expand → Migrate → Contract (aka parallel change), plus operational guardrails. Core pattern: Expand → Migrate → Contract 1) Expand … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you perform a zero-downtime deployment using migration tools?