I have created a web service that is live for some time.
At the same time i purchased another domain where i imported and configured all the scripts/database from live web service.
Now i have 2 different domains; the one that i call LIVE and the other that i call TEST. Both domains have the same content now.
If i want to add a new feature, i code it on the TEST server, debug it and ensure that it works correctly. At the same time i write down all the changes to help me with implementation on the LIVE server.
After pushing the changes on the LIVE server i test them to check if everything is OK.
Questions:
1) Is this procedure valid? Any suggestions on improving it?
2) The are occasions where testing involves changes in the database (for example if i make some logic changes in my registration form).
- How do i handle testing entries inside the database? Do i delete them?
- If the real data (no testing data) in a table go up until ID 40 (1,2,3,...40) and the testing entry takes the place with ID 41, if i delete entry with ID 41, then the next real entry will take the place ID 42 (since ID is auto-increment). How do i reset the ID counter after deleting the test entry? Right now i use the following: ALTER TABLE tablename AUTO_INCREMENT = 1 and it works. Are there any site effects on the table i use this command? And why this works? I am setting the auto_increment to 1 not 41.
- Is there any problem if the entries in a database have gaps? (ex. ID: 1,2,4,5,.. missing ID=3)
ps: i am using PHP as back end, and MySQL (InnoDB) as my database.
Thanks in advance.
Christos