Example: I have a base on the local server and on the hosting. I work only on the local and then upload to the host. Suppose I made changes to the tables (added new columns, changed old ones, etc.) and I want to move the new structure to the one that the database does not affect the data in the tables.
- in any textbook there is a section for modifying the database structure, this answer is very voluminous, I think you can only give here a link to the detailed material. Lynn Bailey - Learning SKL, Section 5. - Jean-Claude
|
1 answer
Usually make a system of patches / migrations for the database. That is, for any change in the structure or data, write requests for this change and requests for rollback of this change. A special script rolls (executes) and, if necessary, rolls back the changes. If you are working alone, you can simply write requests, put them in files named by dates and apply the code you need when laying out the combat code. Often, in addition to changing the structure, you must also change the data in the database. Alternatively - scripts that automatically transfer the structure between the bases. Here already understand, whether they will suit you or not.
|