Writing the tool to fire yourself is definitely a level up from merely being asked to train your replacement.
normally I'd think not very high, at least until the first round of layoffs are done and any potential bugs with the database/application have been worked out.
“We anticipate this being the last round of layoffs so we won’t need a layoff db guy any more.”
"Why me?"
"You're more than qualified for this task."