Skip to content

Commit

Permalink
Added ; separator to schema.sql output from sqlite_master (#186)
Browse files Browse the repository at this point in the history
* Added ; separator to schema.sql output from `sqlite_master`

* Bumped version
  • Loading branch information
emilpriver authored Sep 19, 2024
1 parent fa5abfa commit f7e6ffb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "geni"
version = "1.1.2"
version = "1.1.3"
edition = "2021"
resolver = "2"
description = "A standalone database CLI migration tool"
Expand Down
14 changes: 7 additions & 7 deletions src/lib/database_drivers/libsql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ impl DatabaseDriver for LibSQLDriver {
let mut schemas: Vec<String> = vec![];
while let Some(row) = result.next().await.unwrap_or(None) {
if let Ok(r) = row.get_str(0) {
schemas.push(
r.to_string()
.trim_start_matches('"')
.trim_end_matches('"')
.to_string()
.replace("\\n", "\n"),
);
let text = r
.to_string()
.trim_start_matches('"')
.trim_end_matches('"')
.to_string()
.replace("\\n", "\n");
schemas.push(format!("{};", text));
}
}

Expand Down
14 changes: 7 additions & 7 deletions src/lib/database_drivers/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ impl DatabaseDriver for SqliteDriver {
let mut schemas: Vec<String> = vec![];
while let Some(row) = result.next().await.unwrap_or(None) {
if let Ok(r) = row.get_str(0) {
schemas.push(
r.to_string()
.trim_start_matches('"')
.trim_end_matches('"')
.to_string()
.replace("\\n", "\n"),
);
let text = r
.to_string()
.trim_start_matches('"')
.trim_end_matches('"')
.to_string()
.replace("\\n", "\n");
schemas.push(format!("{};", text));
}
}

Expand Down

0 comments on commit f7e6ffb

Please sign in to comment.