Skip to content

Commit

Permalink
Fix wrong charset for database, should fix issues for international u…
Browse files Browse the repository at this point in the history
…sers
  • Loading branch information
oiad committed Jul 11, 2017
1 parent 79cb357 commit d62cf9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SQL/virtualGarage.sql
Expand Up @@ -6,7 +6,7 @@
i.e you have multiple servers sharing the same virtual garage database.
If your hosting provider only allows you access to 1 database (i.e your main epoch one) then leave these commented out as they are.
*/
-- CREATE DATABASE IF NOT EXISTS `extdb` /*!40100 DEFAULT CHARACTER SET latin1 */;
-- CREATE DATABASE IF NOT EXISTS `extdb` /*!40100 DEFAULT CHARACTER SET utf8 */;
-- USE `extdb`;

CREATE TABLE IF NOT EXISTS `garage` (
Expand All @@ -24,4 +24,4 @@ CREATE TABLE IF NOT EXISTS `garage` (
`Colour` varchar(50) NOT NULL,
`Colour2` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
4 changes: 3 additions & 1 deletion SQL/virtualGarageUpdate.sql
Expand Up @@ -3,7 +3,9 @@
Use SQL\virtualGarage.sql if you are starting fresh.
*/

ALTER TABLE `garage` CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `garage` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE `garage` ADD `Name` VARCHAR(50) NOT NULL DEFAULT '' AFTER `PlayerUID`;
ALTER TABLE `garage` ADD `displayName` VARCHAR(50) NOT NULL DEFAULT '' AFTER `Name`;

UPDATE garage SET Inventory = '[[[],[]],[[],[]],[[],[]]]' WHERE Inventory = '[]';
UPDATE `garage` SET Inventory = '[[[],[]],[[],[]],[[],[]]]' WHERE Inventory = '[]';

0 comments on commit d62cf9c

Please sign in to comment.