Skip to content

Commit

Permalink
Do not warn on .esdl schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Dec 2, 2024
1 parent e24ab9e commit ff0a459
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/migrations/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use crate::migrations::prompt;
use crate::migrations::source_map::{Builder, SourceMap};
use crate::migrations::squash;
use crate::migrations::timeout;
use crate::platform::{is_legacy_schema_file, is_schema_file, tmp_file_name};
use crate::platform::{is_schema_file, tmp_file_name};
use crate::print;
use crate::print::style::Styler;
use crate::question;
Expand Down Expand Up @@ -272,7 +272,6 @@ async fn gen_start_migration(ctx: &Context) -> anyhow::Result<(String, SourceMap
};

let mut paths: Vec<PathBuf> = Vec::new();
let mut has_legacy_paths: bool = false;
while let Some(item) = dir.next_entry().await? {
let fname = item.file_name();
let lossy_name = fname.to_string_lossy();
Expand All @@ -281,18 +280,9 @@ async fn gen_start_migration(ctx: &Context) -> anyhow::Result<(String, SourceMap
&& item.file_type().await?.is_file()
{
paths.push(item.path());
if is_legacy_schema_file(&lossy_name) {
has_legacy_paths = true;
}
}
}

if has_legacy_paths {
print::warn!(
"Legacy schema file extension '.esdl' detected. Consider renaming them to '.gel'."
);
}

paths.sort();

for path in paths {
Expand Down

0 comments on commit ff0a459

Please sign in to comment.