From b21c7adff1ef2530327199de4ad5d19169cbfd6a Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Mon, 14 May 2018 15:41:08 -0400 Subject: [PATCH] Corrected schema and added migrations for the popularplaces table. Region category returned by Datasnapshot module is a string and not an integer. --- webroot/sql/ossearch-migrations.sql | 6 ++++++ webroot/sql/ossearch.sql | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/webroot/sql/ossearch-migrations.sql b/webroot/sql/ossearch-migrations.sql index 652d7f3..fbfcade 100644 --- a/webroot/sql/ossearch-migrations.sql +++ b/webroot/sql/ossearch-migrations.sql @@ -62,3 +62,9 @@ COMMIT; BEGIN; ALTER TABLE `events` ADD `parcelUUID` CHAR( 36 ) NOT NULL AFTER `simname`; COMMIT; + +#Revision 9 +BEGIN; +ALTER TABLE `popularplaces` CHANGE `mature` `mature` varchar(10) COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `popularplaces` ADD PRIMARY KEY (`parcelUUID`); +COMMIT; diff --git a/webroot/sql/ossearch.sql b/webroot/sql/ossearch.sql index 092afec..63a01ec 100644 --- a/webroot/sql/ossearch.sql +++ b/webroot/sql/ossearch.sql @@ -168,7 +168,8 @@ CREATE TABLE IF NOT EXISTS `popularplaces` ( `dwell` float NOT NULL, `infoUUID` char(36) NOT NULL, `has_picture` tinyint(1) NOT NULL, - `mature` tinyint(4) NOT NULL + `mature` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`parcelUUID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- --------------------------------------------------------