From 3fe6e8330059391067bef6351d21055355a1660a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Mon, 6 Sep 2021 14:40:04 +0200 Subject: [PATCH] M20210712c: fix rollback --- bin/migrations/m20210712c.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/migrations/m20210712c.ml b/bin/migrations/m20210712c.ml index 209d1c3..938a04b 100644 --- a/bin/migrations/m20210712c.ml +++ b/bin/migrations/m20210712c.ml @@ -137,6 +137,12 @@ let console_to_string console = let console_of_string data = let lines = String.split_on_char '\n' data in + (* remove last empty line *) + let lines = + match List.rev lines with + | "" :: lines -> List.rev lines + | _ -> lines + in let console = List.map (fun line -> match String.split_on_char ':' line with | ts :: tail ->