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 +4 -4
- data/lib/tina4/migration.rb +19 -4
- data/lib/tina4/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73e8110a3d91bd9741ccafac4eedaca262038d970d38c510cd7bc01a8c19f722
|
|
4
|
+
data.tar.gz: 2482097eb98b8373fce52b40919589a6cafc5ed95c7da8617a33ec5f2f5eced4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba8969b6a7a6155cad15b43e9b7f2bb9dc5ca6a66ea47a039c2c7832083a61f129449e35c5628667ff2cff220b23c386643ba643d601cd8bfe4e15b979940c0e
|
|
7
|
+
data.tar.gz: 78faee9efa3f11a8e67f330630a637c98b17ccfe5977699ad009df7a40f60477201cc301679c5c15ee9016dc5c6200d681a984a315841c0744af6c73305d3eb2
|
data/lib/tina4/migration.rb
CHANGED
|
@@ -314,10 +314,13 @@ module Tina4
|
|
|
314
314
|
else
|
|
315
315
|
execute_sql_file(file)
|
|
316
316
|
end
|
|
317
|
-
#
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
#
|
|
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
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.
|
|
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-
|
|
11
|
+
date: 2026-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|