[api] Do a migration in a different way

we do not modify, but entirely recreate the tables here, because there is
an issue in (older?) MySQL version which corrupt the database when modifing
these indexes. Since this is just indexed data based on sources we do not want
to go with any risk
[api] avoid adding same flag multiple times here