Skip to content

Commit

Permalink
Task techjoomla#168 chore: Update default DB engine and charser of th…
Browse files Browse the repository at this point in the history
…e tables
ankush-maherwal committed Aug 8, 2019

Unverified

This user has not yet uploaded their public signing key.
1 parent 1c15591 commit 8d2ab50
Showing 6 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion administrator/sql/city.sql
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `#__tj_city` (
`com_socialads` tinyint(1) NOT NULL DEFAULT '1',
`com_tjlms` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

-- TRUNCATE TABLE `#__tj_city`;

2 changes: 1 addition & 1 deletion administrator/sql/country.sql
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `#__tj_country` (
`com_socialads` tinyint(1) NOT NULL DEFAULT '1',
`com_tjlms` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

-- TRUNCATE TABLE `#__tj_country`;

12 changes: 6 additions & 6 deletions administrator/sql/install.mysql.utf8.sql
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `#__tjfields_fields` (
`showonlist` tinyint(1) NOT NULL,
`params` varchar(500),
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `#__tjfields_fields_value` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `#__tjfields_fields_value` (
`email_id` varchar(255) NOT NULL,
`client` varchar(255) NOT NULL COMMENT 'client(eg com_jticketing.event)',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `#__tjfields_groups` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
@@ -44,26 +44,26 @@ CREATE TABLE IF NOT EXISTS `#__tjfields_groups` (
`title` varchar(255) NOT NULL,
`client` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `#__tjfields_options` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`field_id` int(11) NOT NULL,
`options` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `#__tjfields_client_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`client` varchar(255) NOT NULL,
`client_type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `#__tjfields_category_mapping` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`field_id` INT(11) NOT NULL,
`category_id` INT(11) NOT NULL COMMENT 'CATEGORY ID FROM JOOMLA CATEGORY TABLE FOR CLIENTS EG CLIENT=COM_QUICK2CART.PRODUCT',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
2 changes: 1 addition & 1 deletion administrator/sql/region.sql
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `#__tj_region` (
`com_socialads` tinyint(1) NOT NULL DEFAULT '1',
`com_tjlms` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;

-- TRUNCATE TABLE `#__tj_region`;

9 changes: 9 additions & 0 deletions administrator/sql/updates/mysql/1.4.2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ALTER TABLE `#__tj_city` ENGINE = InnoDB;
ALTER TABLE `#__tj_region` ENGINE = InnoDB;
ALTER TABLE `#__tj_country` ENGINE = InnoDB;
ALTER TABLE `#__tjfields_category_mapping` ENGINE = InnoDB;
ALTER TABLE `#__tjfields_client_type` ENGINE = InnoDB;
ALTER TABLE `#__tjfields_options` ENGINE = InnoDB;
ALTER TABLE `#__tjfields_groups` ENGINE = InnoDB;
ALTER TABLE `#__tjfields_fields_value` ENGINE = InnoDB;
ALTER TABLE `#__tjfields_fields` ENGINE = InnoDB;
6 changes: 6 additions & 0 deletions tjfields.xml
Original file line number Diff line number Diff line change
@@ -14,6 +14,12 @@
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<update>
<!-- Runs on update -->
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>

0 comments on commit 8d2ab50

Please sign in to comment.