-
Notifications
You must be signed in to change notification settings - Fork 7
SQL_Scripts
Ap.Muthu edited this page Oct 12, 2013
·
2 revisions
All information regarding the sql scripts used for install/update of db schema
Any change to the database design must be done in a couple of places so that everything works all OK for the users
The following files need to be updated when a database change needs to be propagated - add / modify / delete tables, indexes, fields, keys, etc.
-
.include/sql_patches.php
- Add a new patch to the sql patches file - this file gets run when the users is upgrading from a previous version. SI checks what patches have been run when it opens and prompts the user to run the required patches if it finds any not run as yet
- Below is an example sql patch
$patch['249']['name'] = "Make Simple Invoices faster - add index";
$patch['249']['patch'] = "ALTER TABLE `".TB_PREFIX."invoices` ADD INDEX(`biller_id`) ;";
$patch['249']['date'] = "20100419";
- databases/json/sample_data.json
- databases/json/essential_data.json
- databases/mysql/Full_Simple_Invoices.sql
- This is normally generated phpMyAdmin once the database is all up to date
- databases/mysql/structure.sql