#![cfg_attr(test, allow(hidden_glob_reexports))]

#[cfg(test)]
extern crate self as qraft;

pub use inventory;

#[cfg(feature = "tracing")]
macro_rules! migration_trace {
    ($($arg:tt)*) => {
        tracing::info!($($arg)*);
    };
}

#[cfg(not(feature = "tracing"))]
macro_rules! migration_trace {
    ($($arg:tt)*) => {};
}

mod context;
mod error;
mod files;
#[allow(dead_code)]
mod registry;
mod runner;
mod schema;

pub use context::{
    BlueprintExecutor, Migration, MigrationContext, MigrationEntry, MigrationFuture,
};
#[cfg(feature = "mariadb")]
pub use context::{MariadbMigration, MariadbMigrationContext, MariadbMigrationEntry};
#[cfg(feature = "postgres")]
pub use context::{PostgresMigration, PostgresMigrationContext, PostgresMigrationEntry};
#[cfg(feature = "sqlite")]
pub use context::{SqliteMigration, SqliteMigrationContext, SqliteMigrationEntry};
pub use error::{MigrationError, MigrationReport, ResetReport};
pub use runner::{CliCommand, CliOptions, Migrator, run_cli_command};
pub use schema::{
    AlterColumnBuilder, AlterTableBlueprint, ColumnBuilder, ColumnType, ConstraintBuilder,
    DefaultValue, ForeignKeyAction, ForeignKeyBuilder, IndexBlueprint, IntoSchemaColumns,
    SchemaDialect, TableBlueprint, current_timestamp,
};

#[cfg(test)]
mod tests;
