From 0cabd81abfa0267476fddcb4251bab9b63b21f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B8=D0=BC=D0=B8=D0=BD?= Date: Sun, 3 May 2026 20:38:43 +0300 Subject: [PATCH] fix(migrations): add version column for JPA optimistic locking DictionaryDefinition and DictionaryRecord entities have @Version (BIGINT) fields for optimistic locking, but the initial migrations did not create the column. App fails with 'column dd1_0.version does not exist' on first query. Add 0007-add-version-columns.xml with idempotent addColumn changesets (preConditions guard against re-add). --- .../changes/0007-add-version-columns.xml | 36 +++++++++++++++++++ .../main/resources/db/changelog/master.xml | 1 + 2 files changed, 37 insertions(+) create mode 100644 ordinis-migrations/src/main/resources/db/changelog/changes/0007-add-version-columns.xml diff --git a/ordinis-migrations/src/main/resources/db/changelog/changes/0007-add-version-columns.xml b/ordinis-migrations/src/main/resources/db/changelog/changes/0007-add-version-columns.xml new file mode 100644 index 0000000..02975d7 --- /dev/null +++ b/ordinis-migrations/src/main/resources/db/changelog/changes/0007-add-version-columns.xml @@ -0,0 +1,36 @@ + + + + + + + + + + Add @Version column for JPA optimistic locking on dictionary_definitions + + + + + + + + + + + + + + Add @Version column for JPA optimistic locking on dictionary_records + + + + + + + + diff --git a/ordinis-migrations/src/main/resources/db/changelog/master.xml b/ordinis-migrations/src/main/resources/db/changelog/master.xml index 306b63d..2bc6d2a 100644 --- a/ordinis-migrations/src/main/resources/db/changelog/master.xml +++ b/ordinis-migrations/src/main/resources/db/changelog/master.xml @@ -11,5 +11,6 @@ +