I am building a web app. It is currently not open source, but I am considering making it open source, so that others can fix bugs, improve it, so that others are not suspicious of my motives (fun to code & to create a useful tool for others - not making money) and so on. It is built on PHP and MySQL.
I am also trying to follow best practices whilst creating it. So for example, logins will be protected by SSL, passwords are hashed using the bcrypt algorithm by use of PHP's password_hash function, and I use prepared statements everywhere.
However I am unsure how to proceed as I have also heard that you do not want to expose your database structure to others. I have bits of SQL all over my pages so others would have a good idea of what is stored where from looking at this code. The only thing I'm sure of is that the script with the connection username/password should not be hosted on the source repository of my choice.
How can I/should I proceed with making my code open source?