• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

golang-migrate / migrate / 23456178157
55%
master: 54%

Build:
Build:
LAST BUILD BRANCH: feature/tx-isolation
DEFAULT BRANCH: master
Ran 23 Mar 2026 07:47PM UTC
Jobs 2
Files 60
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Mar 2026 07:28PM UTC coverage: 55.333% (+0.9%) from 54.432%
23456178157

Pull #1230

github

JailtonJunior94
oracle: address all code review findings from PR #1230

## Bug fixes

### oracle.go
- Fix Lock()/Unlock() silently ignoring dbms_lock errors: replaced
  dbms_output.put_line with raise_application_error so any non-zero
  v_result causes ExecContext to return an error to the Go caller
- Fix Lock() setting isLocked=true even when the PL/SQL lock request
  fails: changed isLocked from plain bool to sync/atomic.Bool and
  replaced manual state mutation with database.CasRestoreOnErr, which
  performs a compare-and-swap only when the inner function succeeds
- Fix global lock name 'control_lock' causing unrelated migration sets
  to block each other: lock name is now derived from the migrations
  table (<table>_migrate_lock). Added dbmsLockName() helper that
  truncates the prefix to 115 chars so the total never exceeds the
  128-char limit of dbms_lock.allocate_unique
- Fix Version() returning wrong row: WHERE ROWNUM = 1 ORDER BY VERSION
  DESC is incorrect in Oracle because ROWNUM filtering is applied before
  ORDER BY, potentially returning an arbitrary row. Replaced with
  ORDER BY VERSION DESC FETCH FIRST 1 ROW ONLY (requires Oracle 12c+,
  which is the documented minimum)
- Fix SetVersion() using TRUNCATE inside a transaction: TRUNCATE is DDL
  in Oracle and issues an implicit commit, breaking the atomicity of the
  clear + insert pair. Changed to DELETE FROM
- Fix scanner.Err() unchecked in removeComments and parseMultiStatements:
  a read error or token-too-long condition would silently return partial
  SQL with a nil error. Both functions now check and return scanner.Err()
  after the scan loop
- Fix tables.Err() unchecked in Drop(): added post-loop rows.Err() check
  to detect iteration errors before executing DROP TABLE statements
- Add input validation for migrations table name via validateMigrationsTable
  (regex ^[A-Z][A-Z0-9_$#]{0,127}$) to prevent SQL injection through
  the x-migrations-table URL parameter
- Add compile-time interface assert... (continued)
Pull Request #1230: Add OracleDB support to golang-migrate

265 of 348 new or added lines in 1 file covered. (76.15%)

4643 of 8391 relevant lines covered (55.33%)

47.34 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
83
76.15
database/oracle/oracle.go
Jobs
ID Job ID Ran Files Coverage
1 Go-1.24.x - 23456178157.1 23 Mar 2026 07:48PM UTC 60
55.33
GitHub Action Run
2 Go-1.25.x - 23456178157.2 23 Mar 2026 07:47PM UTC 60
55.33
GitHub Action Run
Source Files on build 23456178157
  • Tree
  • List 60
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #1230
  • PR Base - master (#22942289248)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc