When you do it at 入籍, you can get the government document stating both your new name and your old name, so you can always state they are all referring to you later. There is an item called "aka", so you can put your old name into it.
The whole purpose of 改名 when 入籍 is this: you can prove both are your legal names.