//! Migration folder naming.
use Local;
use Path;
/// Timestamp prefix format shared by every migration folder.
const TIMESTAMP: &str = "%Y%m%d%H%M%S";
/// Returns a migration folder path that does not already exist.
///
/// The prefix has second resolution, so generating two migrations with the same
/// name inside one second would otherwise collide. That happens in practice when a
/// tool retries, so a numeric suffix is appended until the path is free rather than
/// failing the generate.