Recommend this page to a friend! |
Download .zip |
Info | Screenshots | View files (9) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2006-07-23 (10 years ago) | Not enough user ratings | Total: 662 | All time: 4,649 This week: 920 |
Version | License | Categories | ||||
dbmedata 1.0 | GNU General Publi... | Databases |
Description | Author | |||||||||||||
This package can be used to update the schema of a MySQL database. |
|
Short description: This class can update a database structure based on metadata in a SQL script Detailed description: If you deploy your webapplication to more then one server, you need to apply the same structure updates and perhaps also the same user data patches on all servers in a similar way. Did you ever wonder how you can smoothly organize this ? This class reads a sql script with metadata, then updates the database structure accordingly and finally applies patches on user data. A user interface for editing the metadata is not provided. Code is written in PHP5. Description of files: update.php Main page to execute a update. class.mysql.db.maint.inc.php Main class which arranges update of database structure class.backbone.inc.php Class with some generic utility methods class.metadata.inc.php Class with utility methods for metadata classes.mySql.inc.php Classes with database abstraction for MySql class.sqlBuilder.inc.php Class to build a SQL INSERT or UDPATE config.database.inc.php File with database access config parameters InsertMetaData.sql SQL CREATE script, for the required tables Copyright: Nico den Boer NL: www.denboer-ims.nl, info@denboer-ims.nl CZ: www.nicodenboer.com, nico@nicodenboer.com However, you are free to copy and use the code as you like ;) Installation: 1) Create a empty database dbmetadata 2) Execute the script InsertMetaData.sql 3) Open the script InsertMetaData.sql and remove all text starting from line /* Remove the part below after initial installation */ 4) Run the page update.php to see if it works :) After installation: 1) Edit the metadata in the tables db_tables, db_fields, db_indexes 2) Create a new script InsertMetaData.sql with a full backup of db_tables, db_fields, db_indexes 3) If you have user data updates, update the page update.php with relevant patches 4) Distribute the new files update.php and InsertMetaData.sql to (the webservers of) your customers 5) Instruct your customers to run update.php (or add a auto-update function to your application to do it all automatically) |
Screenshots | ||
Files |
File | Role | Description |
---|---|---|
classes.mySql.inc.php | Class | Baseclass for Database abstraction for MySql |
class.mysql.db.maint.inc.php | Class | Arranges update of database structure, based on metadata |
update.php | Appl. | Main page to execute a update. |
class.backbone.inc.php | Class | Class with some generic utility methods |
class.metadata.inc.php | Class | Class with utility methods for metadata |
class.sqlBuilder.inc.php | Class | Class to build a SQL INSERT or UDPATE |
config.database.inc.php | Conf. | Database config |
InsertMetaData.sql | Data | SQL CREATE script, for the required tables |
readme.txt | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.