From 7694496efa621466e327b9c00fe1c5cc092ccc1f Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 13 Jun 2025 21:03:55 +0200 Subject: fix(yt/storage/migrate): Correct the two to three migration script --- scripts/mkdb.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mkdb.sh b/scripts/mkdb.sh index 6bcebaf..a6b453c 100755 --- a/scripts/mkdb.sh +++ b/scripts/mkdb.sh @@ -18,7 +18,12 @@ db="$root/target/database.sqlx" fd . "$root/yt/src/storage/migrate/sql" | while read -r sql_file; do echo "Applying sql migration file: $(basename "$sql_file").." - sqlite3 "$db" <"$sql_file" + { + # NOTE(@bpeetz): The wrapping in a transaction is needed to simulate the rust code. <2025-05-07> + echo "BEGIN TRANSACTION;" + cat "$sql_file" + echo "COMMIT TRANSACTION;" + } | sqlite3 "$db" done # vim: ft=sh -- cgit 1.4.1