]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-coupon.php
addCreateTableSql() is now more encapsulated
[mailer.git] / inc / extensions / ext-coupon.php
index cce501740378b99aeefc617dfa640c4d121ad066..a84c4b20ebe8884d5050df3388d07058456e387d 100644 (file)
@@ -56,7 +56,7 @@ switch (getExtensionMode()) {
 
                // Coupon data
                addDropTableSql('coupon_data');
-               addCreateTableSql('coupon_data', "(
+               addCreateTableSql('coupon_data', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `coupon_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `coupon_expired` TIMESTAMP NULL DEFAULT NULL,
@@ -65,12 +65,12 @@ switch (getExtensionMode()) {
 `total_cashed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `coupon_description` TEXT,
-PRIMARY KEY (`id`)
-) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Created coupons'");
+PRIMARY KEY (`id`)",
+               'Created coupons');
 
                // Coupon->user connection table
                addDropTableSql('user_coupons');
-               addCreateTableSql('user_coupons', "(
+               addCreateTableSql('user_coupons', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `coupon_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `userid` BIGINT(2) UNSIGNED NOT NULL DEFAULT 0,
@@ -78,8 +78,8 @@ PRIMARY KEY (`id`)
 `cashed_on` TIMESTAMP NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
 UNIQUE KEY `coupon_user` (`coupon_id`,`userid`),
-UNIQUE KEY (`coupon_code`)
-) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Coupon->user connection'");
+UNIQUE KEY (`coupon_code`)",
+                       'Coupon->user connection');
 
                // Configuration entries
                addConfigAddSql('coupon_default_time', 'BIGINT(20) NOT NULL DEFAULT ' . (getOneDay() * 7));