Set minimum starting ID for differentials?

Bit of an odd question: I’m setting up a new Phabricator instance, but would like diffs to not start from “1”, but a different number.

Basically we had a previous Phabricator install (which we’re not migrating the data from, for reasons not worth getting into here), and I’d like to avoid overlapping with historical diffs from our other system.

Obviously this isn’t standard functionality, so I imagine this is going to require either editing the database directly or the code, any pointers where exactly to look would be appreciated!

Run this command:

mysql> ALTER TABLE phabricator_differential.differential_revision AUTO_INCREMENT = 12345;

…where 12345 is wherever you’d like revision numbers to start at.

Then create at least one revision before restarting MySQL (InnoDB determines the auto increment value at startup time by looking at the largest ID in the table, so if you restart without creating at least one object your modification of the AUTO_INCREMENT value will be lost).

This is generally safe and reasonable and you can apply the technique to any other similar table (tasks, etc) – it’s just a slippery slope toward merging instances, which is a tangled mess of a problem.

Thanks! That’s exactly what I was looking for.