ALTER TABLE `sps_transactions` CHANGE `in_payment_referance_number` `in_payment_referance_number` VARCHAR(255) NOT NULL;

ALTER TABLE `sps_transactions` CHANGE `out_payment_reference_number` `out_payment_reference_number` VARCHAR(255) NOT NULL;

ALTER TABLE `sps_cps` CHANGE `cps_payment_reference_number` `cps_payment_reference_number` VARCHAR(255) DEFAULT '0' NOT NULL;


DROP TABLE IF EXISTS `sps_payment_modes`;

CREATE TABLE IF NOT EXISTS `sps_payment_modes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `payment_mode` varchar(255) NOT NULL,
  `master_id` bigint(20) NOT NULL,
  `parent_id` tinyint(4) DEFAULT '0',
  `location_id` bigint(20) NOT NULL,
  `area_id` bigint(20) NOT NULL,
  `created_by` bigint(20) NOT NULL,
  `updated_by` bigint(20) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `deleted_at` timestamp NULL DEFAULT NULL,
  `payment_description` mediumtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;


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
(1, 'Cash', 1, 0, 0, 0, 0, 0, '2017-11-06 02:05:17', '2017-12-07 05:12:10', NULL, 'cash'),
(2, 'EDC Pay', 2, 0, 0, 0, 0, 0, '2017-11-07 00:52:45', '2018-03-26 22:51:31', NULL, 'Bank Card'),
(3, 'Paytm', 4, 0, 0, 0, 0, 0, '2017-12-07 01:52:52', '2017-12-07 23:55:10', NULL, 'Paytm'),
(4, 'Static QR', 4, 0, 0, 0, 0, 0, '2020-05-22 05:46:57', '2020-05-22 05:46:57', NULL, 'Mobile gate UPI'),
(5, 'Dynamic QR', 4, 0, 0, 0, 0, 0, '2020-06-05 01:09:30', '2020-06-09 06:56:18', NULL, 'Dynamic QR Code');
