`coupon_code` VARCHAR(30) NULL DEFAULT NULL,
`cashed_on` TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (`id`),
-UNIQUE KEY `coupon_user` (`coupon_id`,`userid`),
+UNIQUE KEY `coupon_user` (`coupon_id`, `userid`),
UNIQUE KEY (`coupon_code`)",
'Coupon->user connection');
addExtensionDependency('order');
// Insert data in new table
- addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`ext_name`,`column_name`,`locked_mode`,`payment_method`) VALUES('coupon','order_points','LOCKED','DIRECT')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`, `column_name`, `locked_mode`, `payment_method`) VALUES ('coupon_cashed','order_points','LOCKED','DIRECT')");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes('');
+ break;
+
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update data in points_data table
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_points_data` SET `subject`='coupon_cashed' WHERE `subject`='coupon' LIMIT 1");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes('');