Versioned migrations (NNNN_) run once, in ordered version sequence: schema evolution, tables, columns, indexes, constraints. Runs-always migrations (RA__) run on every migrate execution, the class for objects that should always match the repository, views and grants. Runs-on-change migrations (ROC__) run when their content checksum changes, the class for routines and policies that should only reapply when they actually changed, functions, triggers, and policies.
At runtime, migrate builds one execution plan from file discovery plus migration metadata: pending versioned files first, then runs-always files, then runs-on-change files whose checksum differs from the last run, all under the same lock protection as the versioned sequence.
NNNN_ runs once, in version order
RA__ refreshed on every migrate
ROC__ reapplied when the checksum changesWhich class should a function or trigger use?
Runs-on-change (ROC__). The routine is reapplied only when the file content changes, so unchanged objects are left alone.
How do repeatable migrations interact with the versioned sequence?
migrate builds the plan as pending versioned files first, then RA__ files, then changed ROC__ files, all under the same lock protection.