How to organize the process of web development?

0 like 0 dislike
31 views
Dear community,
for a long time develop your own website, written in PHP, MySQL. Edit scripts directly on the server. Began to realize that you need to go to work versions. I write scripts on the Linux server. Also interested in how to move to a new version of the script after working on it that users can add new data to the database, and the new version of DB structure may be different.

Tell us how to organize the development of PHP scripts version how to move to a new version without disruption of the server. If there are useful books on this topic — also recommend.
by | 31 views

4 Answers

0 like 0 dislike
To cope with the problems when upgrading to a new version of the database, some ORM is so-called "migration".
by
0 like 0 dislike
Well work using SVN/git is the most it to work with different versions. The main plus, if you are developing alone — a quick rollback changes
The transition to the new version of the scripts, with a modified database can be done in two ways:
1. Server downtime during the transition (in Your case, it's probably a couple of minutes, no business of the time you can afford)
2. Moving the main database to the new format, the launch of a new version, migration that managed to get into the old base at the time of the conversion. However, in this case, there are thousands of nuances, so it is better dramatically the structure of the database on the working draft does not change.
by
0 like 0 dislike
What about SVN/Git is already written. Another good system of tracking tasks/bugs to connect (TRAC, Bugzilla, etc., free of enough solutions that integrate with the version control systems), very convenient then to search/track changes.
\r
And about the new version of the scripts and database — would help test the server on which migration could be tested, plus an automatic backup-restore the entire website (scripts + database). Then the test could be something like:
— backup the "live" system
— deployment of a backup on the test server
— run the migration scripts on the test server
— check the result
by
0 like 0 dislike
In a simple case: crank daddy migrations, create a file 0000.sql merge it in the database structure. At changes in the structure create a file 0001.sql where write alter or create table. Committee's file however the code that knows how to work with a modified base.
\r
As soon as checking out code when you have a new file xxxx.sql, execute it. Can manually, can hook for version control system to write.
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
asked Mar 28, 2019 by NekitoSP
110,608 questions
257,187 answers
0 comments
40,796 users