You can upgrade anytime provided 1, your seniority allows,2, company need. FO's often wait until they can hold a line as a captain in the base and equipment of their choice. And this leads to many FO being senior to the Capt. And once you upgrade you shuffle into the Capt seniority list at your company and base seniority.