yogthos/migratus

Migration fails if a comment is present on line with semicolon

Offen

#208 geöffnet am 14.01.2022

 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Clojure (99 Forks)github user discovery
bughelp wanted

Repository-Metriken

Stars
 (686 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

A migration like

select 2; -- Thing

will fail with the error

2022-01-13T18:58:54.278Z Skrutten ERROR [migratus.migration.sql:326] - failed to execute command:
 
select 2; -- Thing

2022-01-13T18:58:54.278Z Skrutten ERROR [migratus.migration.sql:326] - Too many update results were returned.
2022-01-13T18:58:54.278Z Skrutten ERROR [migratus.database:326] - Migration odlingshistorik failed because Batch entry 1 <unknown> was aborted: Too many update results were returned.  Call getNextException to see other errors in the batch. backing out
2022-01-13T18:58:54.280Z Skrutten INFO [migratus.core:326] - Ending migrations
Execution error (PSQLException) at org.postgresql.jdbc.BatchResultHandler/handleCommandStatus (BatchResultHandler.java:102).
Too many update results were returned.

while a migration like

select 1, -- Thing
2;

will work just fine. My guess would be that some sort of line splitting on semicolons is at hand, but that is just a wild guess.

Contributor Guide