Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): print documentation if parameter is ignored/infered #3370

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sqlx-cli/src/migrate.rs
Original file line number Diff line number Diff line change
@@ -113,6 +113,12 @@ pub async fn add(
// Type of newly created migration will be the same as the first one
// or reversible flag if this is the first migration
let migration_type = MigrationType::infer(&migrator, reversible);
if reversible && !migration_type.is_reversible() {
println!("Ignoring the -r option as the first migration is non-reversible");
}
if !reversible && migration_type.is_reversible() {
println!("Infering the -r option to be set as the first migration is reversible");
}

let ordering = MigrationOrdering::infer(sequential, timestamp, &migrator);
let file_prefix = ordering.file_prefix();

Unchanged files with check annotations Beta

pub struct TypeName {
pub val: String,
pub span: Span,

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / SQLite Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / MySQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read

Check warning on line 33 in sqlx-macros-core/src/derives/attributes.rs

GitHub Actions / PostgreSQL Examples

field `span` is never read
}
impl TypeName {