tina4ruby 3.13.72 → 3.13.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ed4c522a29f92b73683272345e23d289b81698615cc9d006c72a09d19dca1a2
4
- data.tar.gz: 77e3fb90d8ce8c4a7609655c512e2794fead60a70ec03c728968cea1f9f5a122
3
+ metadata.gz: 73e8110a3d91bd9741ccafac4eedaca262038d970d38c510cd7bc01a8c19f722
4
+ data.tar.gz: 2482097eb98b8373fce52b40919589a6cafc5ed95c7da8617a33ec5f2f5eced4
5
5
  SHA512:
6
- metadata.gz: 0dfd6b813d86acf8b6977e0132d60dc0ab735d2f312197e8bef771f20a74c607d31fb720b9496227430fb205d40ec02f185d8b7b2e459f15ee594779e53df381
7
- data.tar.gz: e112213e75cbd5ffadbaca25f4a910bd409542c40bdde4f194bfc93d591e9d780b628615f6f7b3831191113d60722f087fb93c7c3c091c7876aa1316649b07f8
6
+ metadata.gz: ba8969b6a7a6155cad15b43e9b7f2bb9dc5ca6a66ea47a039c2c7832083a61f129449e35c5628667ff2cff220b23c386643ba643d601cd8bfe4e15b979940c0e
7
+ data.tar.gz: 78faee9efa3f11a8e67f330630a637c98b17ccfe5977699ad009df7a40f60477201cc301679c5c15ee9016dc5c6200d681a984a315841c0744af6c73305d3eb2
@@ -314,10 +314,13 @@ module Tina4
314
314
  else
315
315
  execute_sql_file(file)
316
316
  end
317
- # ROW-EXISTENCE tracking: only a SUCCESS row is ever written. A
318
- # migration is "applied" iff a success row exists failures are never
319
- # recorded, nothing is deleted, the file rolls back and we surface the
320
- # error. Fix the bad file and re-run.
317
+ # A migration is "applied" iff a passed=1 row exists. On success,
318
+ # _record_migration deletes any existing row for this migration_name
319
+ # (superseding a leftover passed=0) and writes the fresh passed=1 row, so
320
+ # a previously-failed migration re-applies cleanly instead of colliding
321
+ # on the UNIQUE migration_name. On a FAILURE the file rolls back and NO
322
+ # row is written (failures are never recorded) - fix the bad file and
323
+ # re-run.
321
324
  _record_migration(name, batch, passed: 1)
322
325
  @db.commit
323
326
  { name: name, status: "success" }
@@ -633,6 +636,18 @@ module Tina4
633
636
  # executed_at is a written VARCHAR(50) string (canonical shape has no
634
637
  # CURRENT_TIMESTAMP default), ISO-8601 UTC. strftime avoids a require "time".
635
638
  executed_at = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
639
+ # Delete-before-insert: supersede any existing row for this migration_name
640
+ # first, so a leftover passed=0 row (a public record_migration(passed: 0)
641
+ # call, or a state carried in from elsewhere) does NOT collide on the
642
+ # UNIQUE migration_name when the fresh row is inserted - the migration
643
+ # re-applies cleanly instead of wedging on the constraint. DELETE+INSERT is
644
+ # portable across every engine (no UPSERT dialect variance). Invariant: the
645
+ # bookkeeping table holds AT MOST ONE row per migration_name, latest state
646
+ # wins. Within run_migration's transaction the delete is part of the same
647
+ # unit (autocommit is a no-op while a transaction is pinned); on the public
648
+ # record_migration path it is a standalone write, mirroring the Python
649
+ # master's two-statement delete-then-insert.
650
+ _remove_migration_record(name)
636
651
  if firebird?
637
652
  # Firebird: generate ID from sequence
638
653
  row = @db.fetch_one(
data/lib/tina4/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tina4
4
- VERSION = "3.13.72"
4
+ VERSION = "3.13.73"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tina4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.72
4
+ version: 3.13.73
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tina4 Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-12 00:00:00.000000000 Z
11
+ date: 2026-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack