The application is hosted in google app engine, we are using google cloud sql as database.
we are in testing phase of our application, so we have to database
- live database
- test database.
so can anyone please suggest a way to switch from live database to test database without changing the source code, for now we have created 2 different source code with different urls to connect to different database instances and have created 2 instance of application but we want to keep the source code same.
there are many ways to do this. you could pass a url parameter to indicate which db to use. you could also have an admin page where you select which db all will use.