Primary node becomes secondary before application is deployed and moved into AAG We have a small database that was created on a primary node. But by the time the application was deployed and it was time to move the db into the AG I noticed that it became the secondary node.  For client connectivity I gave the listener name. The application has been installed successfully. Is is still possible to move the database into the AG (because the former primary is now the secondary) 

Please advice
You can only add a database to an AG from the Primary node.  Your options are to back and restore the database to the new primary, or fail back over to SQL06 to make it the primary, then add it to the AG.