SET sql_mode = '';
ALTER TABLE `sps_tariff` ADD `sync_at` DATETIME NULL DEFAULT NULL AFTER `superadmin`;
ALTER TABLE `sps_service_type`  ADD `superadmin` TINYINT NOT NULL  AFTER `location_id`;
ALTER TABLE `sps_service_type` ADD `sync_at` DATETIME NULL DEFAULT NULL AFTER `superadmin`;
ALTER TABLE `sps_discounts`  ADD `superadmin` TINYINT NOT NULL  AFTER `location_id`;
ALTER TABLE `sps_discounts` ADD `sync_at` DATETIME NULL DEFAULT NULL AFTER `superadmin`;
ALTER TABLE `sps_special_days`  ADD `superadmin` TINYINT NOT NULL  AFTER `location_id`;
ALTER TABLE `sps_special_days` ADD `sync_at` DATETIME NULL DEFAULT NULL AFTER `superadmin`;
ALTER TABLE `sps_settings`  ADD `superadmin` TINYINT NOT NULL  AFTER `location_id`;
ALTER TABLE `sps_settings` ADD `sync_at` DATETIME NULL DEFAULT NULL AFTER `superadmin`;
ALTER TABLE `sps_tariff_tier`  ADD `superadmin` TINYINT NOT NULL  AFTER `location_id`;
ALTER TABLE `sps_tariff_tier` ADD `sync_at` DATETIME NULL DEFAULT NULL AFTER `superadmin`;

/*----Gate Configuration Table Update---------*/
ALTER TABLE `sps_gate_configurations`  ADD `is_aps` TINYINT NOT NULL  AFTER `gate_type`;
ALTER TABLE `sps_gate_configurations`  ADD `aps_gate_type` ENUM('web','machine') NULL DEFAULT NULL  AFTER `is_aps`;

/*-----APS Payment Modes-----*/
INSERT INTO `sps_master_payment_modes` (`id`, `master_payment_mode`, `location_id`, `area_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`, `master_payment_description`) VALUES
(7, 'Web Payment Gateway', 1, 1, 1, 0, '2020-12-09 11:00:00', '0000-00-00 00:00:00', NULL, 'It will accept money on APS');
INSERT INTO `sps_payment_modes` (`id`, `payment_mode`, `master_id`, `parent_id`, `location_id`, `area_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`, `payment_description`) VALUES
(6, 'Web APS', 7, 0, 0, 0, 0, 0, '2020-12-09 11:00:00', '2020-12-09 11:00:00', NULL, 'APS Payment Gateway');
