Skip to main content

phase_d1_migrations

Function phase_d1_migrations 

Source
pub fn phase_d1_migrations(
    folder: Option<&AssetFolder>,
    databases: &[String],
    errors: &mut ErrorSink,
) -> D1Migrations
Expand description

Check the listed migrations/ folder against the declared databases, and read the files of each. None means no filesystem was consulted, so there is nothing to check or read.

  • bynk.d1.migration_name: a file that isn’t migrations/<database>/NNNN_<name>.sql, or a second file with the same number in one directory;
  • bynk.d1.migration_unreadable: a file that can’t be read, or isn’t UTF-8;
  • bynk.d1.migrations_unused (warning): a directory no D1 instance’s database name matches, usually a renamed capability.