Question about constraints during 4.4 to 5 migration

You prepare the Constrains and Indexes with correct 5.x version syntax. After all the upgrading is done and the database is created via system, then you can run constraints and indexes. This is what I did and it worked.