mirror of
https://github.com/Portabase/agent.git
synced 2026-10-23 04:36:00 +00:00
fix(postgres): match real pg_restore -l schema line in toc_creates_public_schema
This commit is contained in:
@@ -15,8 +15,12 @@ use crate::services::backup::logger::JobLogger;
|
||||
use crate::services::config::DatabaseConfig;
|
||||
|
||||
pub(crate) fn toc_creates_public_schema(toc: &str) -> bool {
|
||||
toc.lines()
|
||||
.any(|l| l.contains(" SCHEMA ") && l.trim_end().ends_with(" public"))
|
||||
toc.lines().any(|l| {
|
||||
l.split(" SCHEMA - ")
|
||||
.nth(1)
|
||||
.and_then(|rest| rest.split_whitespace().next())
|
||||
== Some("public")
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) struct PreparedArchive {
|
||||
|
||||
Reference in New Issue
Block a user