Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
initial commit
  • Loading branch information
psteinroe committed Jan 21, 2025
commit a5bea505d26c1f9441e94bd9660d8c0d1aba6ada
5 changes: 5 additions & 0 deletions crates/pg_cli/src/execute/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,11 @@ impl TraversalContext for TraversalOptions<'_, '_> {
return false;
}

// only allow .sql and .pg files for now
if path.extension().is_some_and(|ext| ext != "sql" && ext != "pg") {
return false;
}

match self.execution.traversal_mode() {
TraversalMode::Dummy { .. } => true,
TraversalMode::Check { .. } => true,
Expand Down
5 changes: 5 additions & 0 deletions crates/pg_configuration/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ pub struct FilesConfiguration {
/// match these patterns.
#[partial(bpaf(hide))]
pub include: StringSet,

/// The directory where the migration files are stored
#[partial(bpaf(hide))]
pub migration_dir: String,
}

impl Default for FilesConfiguration {
Expand All @@ -37,6 +41,7 @@ impl Default for FilesConfiguration {
max_size: DEFAULT_FILE_SIZE_LIMIT,
ignore: Default::default(),
include: Default::default(),
migration_dir: "migrations".to_string(),
}
}
}
Loading