Version 3.0 comes with several enhancements an features. Some of which require you to change the database schema of your application. Please use the following steps to upgrade your application. As per our support policy we can do upgrades for you for free. Please email support@stockawesome.io.

Backup your Data

This is very important do not skip. First you need to backup all of your data. To do this (assuming you are using phpmyadmin). Making sure that you are in the correct database (Export the database).

My helpful screenshot

After that save the file somewhere safe. (We iterate keep this file safe this is your last resort incase of an issue)

My helpful screenshot.

We will not be liable if you do not back up your data appropriately. You may ask for help for the upgrade process if you so wish

Rename and Alter Version 2.0 tables

Version 3.0 does numerous changes in purchase orders. This involves a lot of modifications of purchase order tables and product tables. You will need to alter this tables using the below command in MySQL/phpmyadmin. Before you run this make sure you have a backup as it will delete some un needed tables in version 3.0

/*
Ignore Tables 
- printers
- printer_logs
- printer_oids
- purchase_requests
- purchase_request_items
- requisitions
- retunables

*/
START TRANSACTION;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
SET sql_mode = '';
ALTER TABLE purchase_orders CHANGE `plId` `lpoId` int(10) UNSIGNED DEFAULT NULL; 
ALTER TABLE purchase_orders CHANGE `poItemCode` `productId` int(10) UNSIGNED DEFAULT NULL; 
ALTER TABLE purchase_orders CHANGE `poDescription` `productDescription` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL; 
ALTER TABLE purchase_orders CHANGE `poQty` `amount` double(15,2) NOT NULL; 
ALTER TABLE purchase_orders CHANGE `poUnitPrice` `unitCost` double(15,2) NOT NULL; 
ALTER TABLE purchase_orders CHANGE `poDisc` `discount` double(8,2) DEFAULT NULL; 
ALTER TABLE purchase_orders CHANGE `poTotal` `total` double(15,2) DEFAULT NULL; 
RENAME TABLE purchase_orders TO purchase_orders_items;
ALTER TABLE products CHANGE `expirationDate` `expiryDate` date DEFAULT NULL; 
ALTER TABLE products CHANGE `buyingPrice` `sellingPrice` double(15,2) DEFAULT NULL; 
COMMIT;

drop table printers, printer_logs,printer_oids,purchase_requests,purchase_orders_items,requisitions,retunables

START TRANSACTION;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
SET sql_mode = '';
ALTER TABLE purchase_orders_list CHANGE `polSupplierId` `supplierId` int(11) NOT NULL; 
ALTER TABLE purchase_orders_list CHANGE `polSupplierName` `supplierName` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL;  
ALTER TABLE purchase_orders_list CHANGE `polDateOfDelivery` `dateOfDelivery` date DEFAULT NULL; 
ALTER TABLE purchase_orders_list CHANGE `polTermsOfPayment` `termsOfPayment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL; 
ALTER TABLE purchase_orders_list CHANGE `polDeliverBy` `deliverBy` date DEFAULT NULL; 
RENAME TABLE purchase_orders_list TO purchase_orders;
COMMIT;

The above command will alter the existing database to the new needed structure. Now all you need to do is export the database tables data only. There is NO need of exporting the structure as it is already provided. After you have exported the structure only, keep this file safely.

My helpful screenshot.

Next delete all the tables in your application. Before deleting please make sure that you have two backups

  1. The first backup of version 2.0
  2. The second backup after column manipulation and exporting data only.

After deletion of all tables export schema from Application\Database folder and you can now import the second file with data only. you should now be done. (See below for more info)

Upgrade the application

Next delete your database and application folder and replace with the new versions. That is delete all tables in phpmyadmin and use the new database schema in the database folder and copy and replace the stockawesome folder with the new application.

Next Import the file you backed up (data only) earlier to your application.

What gets Introduced

  1. Warehousing

If this is all too confusing kindly contact us for migration