Yes. That's not a problem. Say for example, you want to reverse the order of patches 10 and 14. Simply rename 10 to be 15 (or whatever the next unassigned patch number is), and leave 10 unused. There's no need to adjust higher numbered patches to fill in the gap. In fact, that's usually impossible.
Q. How many changes should I put in a single patch file?As many as make sense to go together, depending on the patch types (sql, java, xml), and depending on the dependency order. For example, a large project that creates three new data tables plus one new config table and obsoletes one old table might have four patches as follows:
There
is a one-column table in the database called patches. It has one
row for every patch that has been applied. When the app fires up,
AutoPatch makes a list of all available patches and compares that list to
the table.
For OrderedMigrationRunnerStrategy (the default strategy), all patches with patch numbers higher than the highest patch number in the table are executed, and then those patch numbers are added to the table.
For MissingPatchMigrationRunnerStrategy, all patches that have yet to be applied, regardless of whether they are higher or lower than any numbers already in the table, are executed, and then those patch numbers are added to the table.