diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-13 21:03:55 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-13 21:03:55 +0200 |
commit | 7694496efa621466e327b9c00fe1c5cc092ccc1f (patch) | |
tree | b5abcd15e00999f92ea4632bdbda3410a849505b /scripts/mkdb.sh | |
parent | fix(yt/storage/migrate): Correctly state the upgrade to the topmost version (diff) | |
download | yt-7694496efa621466e327b9c00fe1c5cc092ccc1f.zip |
fix(yt/storage/migrate): Correct the two to three migration script
Diffstat (limited to '')
-rwxr-xr-x | scripts/mkdb.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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 |