<commit_before>CREATE TABLE note_flags (player_id int(10) unsigned NOT NULL DEFAULT 0, note_id int(10) unsigned NOT NULL DEFAULT 0, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (player_id, note_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE note_shares (share_id  int(10) unsigned NOT NULL AUTO_INCREMENT, player_id  int(10) unsigned NOT NULL DEFAULT 0, note_id int(10) unsigned NOT NULL DEFAULT 0, share_type enum('FACEBOOK', 'TWITTER', 'PINTEREST', 'EMAIL') COLLATE utf8_unicode_ci DEFAULT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (share_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE players ADD curator tinyint(1) unsigned NOT NULL DEFAULT 0;
ALTER TABLE players ADD facebook_id int(11) unsigned NOT NULL DEFAULT 0;
ALTER TABLE game_tags ADD media_id int(11) unsigned NOT NULL DEFAULT 0;

ALTER TABLE quests DROP COLUMN exit_to_tab;
ALTER TABLE quests ADD COLUMN go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';

ALTER TABLE games ADD COLUMN note_title_behavior ENUM('NONE','FORCE_OVERWRITE') NOT NULL DEFAULT 'FORCE_OVERWRITE';

ALTER TABLE game_object_tags ADD COLUMN media_id int(10) unsigned NOT NULL DEFAULT 0;

ALTER TABLE game_object_tags ADD COLUMN use_for_sort tinyint(1) unsigned NOT NULL DEFAULT 0;

ALTER TABLE player_log CHANGE event_type event_type enum('LOGIN','MOVE','PICKUP_ITEM','DROP_ITEM','DROP_NOTE','DESTROY_ITEM','VIEW_ITEM','VIEW_NODE','VIEW_NPC','VIEW_WEBPAGE','VIEW_AUGBUBBLE','VIEW_MAP','VIEW_QUESTS','VIEW_INVENTORY','ENTER_QRCODE','UPLOAD_MEDIA_ITEM','UPLOAD_MEDIA_ITEM_IMAGE','UPLOAD_MEDIA_ITEM_AUDIO','UPLOAD_MEDIA_ITEM_VIDEO','RECEIVE_WEBHOOK','SEND_WEBHOOK','COMPLETE_QUEST','CREATE_NOTE','GET_NOTE','GIVE_NOTE_LIKE','GET_NOTE_LIKE','GIVE_NOTE_COMMENT','GET_NOTE_COMMENT');

ALTER TABLE games ADD COLUMN latitude   DOUBLE NOT NULL DEFAULT 0.0;
ALTER TABLE games ADD COLUMN longitude  DOUBLE NOT NULL DEFAULT 0.0;
ALTER TABLE games ADD COLUMN zoom_level DOUBLE NOT NULL DEFAULT 0.0;

ALTER TABLE quests ADD COLUMN description_notification TINYTEXT NOT NULL DEFAULT "";
ALTER TABLE quests ADD COLUMN text_when_complete_notification TINYTEXT NOT NULL DEFAULT "";
ALTER TABLE quests ADD COLUMN active_notification_media_id INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE quests ADD COLUMN complete_notification_media_id INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE quests ADD COLUMN complete_go_function ENUM('NONE','NEARBY','GPS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT "NONE";

ALTER TABLE quests ADD COLUMN complete_full_screen_notify TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE quests ADD COLUMN active_notif_show_dismiss TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE quests ADD COLUMN complete_notif_show_dismiss TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE quests ADD COLUMN notif_go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';
ALTER TABLE quests ADD COLUMN complete_notif_go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';
ALTER TABLE quests CHANGE complete_go_function complete_go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';

ALTER TABLE notes ADD COLUMN description tinytext NOT NULL DEFAULT "";

DROP TABLE overlay_tiles;
DROP TABLE overlays;

CREATE TABLE overlays (overlay_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, game_id INT(11) UNSIGNED NOT NULL, name VARCHAR(100) NOT NULL DEFAULT "", media_id INT(11) UNSIGNED NOT NULL, top_left_latitude DOUBLE NOT NULL DEFAULT 0.0, top_left_longitude DOUBLE NOT NULL DEFAULT 0.0, top_right_latitude DOUBLE NOT NULL DEFAULT 0.0, top_right_longitude DOUBLE NOT NULL DEFAULT 0.0, bottom_left_latitude DOUBLE NOT NULL DEFAULT 0.0, bottom_left_longitude DOUBLE NOT NULL DEFAULT 0.0, PRIMARY KEY (overlay_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE INDEX game_id ON overlays (game_id);

ALTER TABLE game_comments ADD COLUMN title TINYTEXT NOT NULL DEFAULT "";

UPDATE games SET allow_trading = 0;
UPDATE items SET tradeable = 0;

CREATE TABLE requirement_root_packages (
requirement_root_package_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
game_id INT(32) UNSIGNED NOT NULL,
name VARCHAR(64) NOT NULL DEFAULT "",
created TIMESTAMP DEFAULT '0000-00-00 00:00:00',
last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE INDEX requirement_root_package_game ON requirement_root_packages(game_id);

CREATE TABLE requirement_and_packages (
requirement_and_package_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
game_id INT(32) UNSIGNED NOT NULL,
requirement_root_package_id INT(32) UNSIGNED NOT NULL,
name VARCHAR(64) NOT NULL DEFAULT "",
created TIMESTAMP DEFAULT '0000-00-00 00:00:00',
last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE INDEX and_requirement_root_package ON requirement_and_packages(requirement_root_package_id);
CREATE INDEX and_requirement_game ON requirement_and_packages(game_id);

CREATE TABLE requirement_atoms (
requirement_atom_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
game_id INT(32) UNSIGNED NOT NULL,
requirement_and_package_id INT(32) UNSIGNED NOT NULL,
bool_operator TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
requirement ENUM('PLAYER_HAS_ITEM','PLAYER_HAS_TAGGED_ITEM','PLAYER_VIEWED_ITEM','PLAYER_VIEWED_NODE','PLAYER_VIEWED_NPC','PLAYER_VIEWED_WEBPAGE','PLAYER_VIEWED_AUGBUBBLE','PLAYER_HAS_UPLOADED_MEDIA_ITEM','PLAYER_HAS_UPLOADED_MEDIA_ITEM_IMAGE','PLAYER_HAS_UPLOADED_MEDIA_ITEM_AUDIO','PLAYER_HAS_UPLOADED_MEDIA_ITEM_VIDEO','PLAYER_HAS_COMPLETED_QUEST','PLAYER_HAS_REC
EIVED_INCOMING_WEB_HOOK','PLAYER_HAS_NOTE','PLAYER_HAS_NOTE_WITH_TAG','PLAYER_HAS_NOTE_WITH_LIKES','PLAYER_HAS_NOTE_WITH_COMMENTS','PLAYER_HAS_GIVEN_NOTE_COMMENTS'),
content_id INT(32) UNSIGNED NOT NULL DEFAULT 0,
qty INT(32) UNSIGNED NOT NULL DEFAULT 0,
latitude DOUBLE NOT NULL DEFAULT 0.0,
longitude DOUBLE NOT NULL DEFAULT 0.0,
created TIMESTAMP DEFAULT '0000-00-00 00:00:00',
last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE INDEX atom_requirement_and_package ON requirement_atoms(requirement_and_package_id);
CREATE INDEX atom_requirement_game ON requirement_atoms(game_id);

ALTER TABLE quests ADD COLUMN complete_requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE quests ADD COLUMN display_requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE locations ADD COLUMN requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;<commit_msg>final updated upgrades<commit_after>CREATE TABLE note_flags (player_id int(10) unsigned NOT NULL DEFAULT 0, note_id int(10) unsigned NOT NULL DEFAULT 0, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (player_id, note_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE note_shares (share_id  int(10) unsigned NOT NULL AUTO_INCREMENT, player_id  int(10) unsigned NOT NULL DEFAULT 0, note_id int(10) unsigned NOT NULL DEFAULT 0, share_type enum('FACEBOOK', 'TWITTER', 'PINTEREST', 'EMAIL') COLLATE utf8_unicode_ci DEFAULT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (share_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE players ADD curator tinyint(1) unsigned NOT NULL DEFAULT 0;
ALTER TABLE players ADD facebook_id int(11) unsigned NOT NULL DEFAULT 0;
ALTER TABLE game_tags ADD media_id int(11) unsigned NOT NULL DEFAULT 0;

ALTER TABLE quests DROP COLUMN exit_to_tab;
ALTER TABLE quests ADD COLUMN go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';

ALTER TABLE games ADD COLUMN note_title_behavior ENUM('NONE','FORCE_OVERWRITE') NOT NULL DEFAULT 'FORCE_OVERWRITE';

ALTER TABLE game_object_tags ADD COLUMN media_id int(10) unsigned NOT NULL DEFAULT 0;

ALTER TABLE game_object_tags ADD COLUMN use_for_sort tinyint(1) unsigned NOT NULL DEFAULT 0;

ALTER TABLE player_log CHANGE event_type event_type enum('LOGIN','MOVE','PICKUP_ITEM','DROP_ITEM','DROP_NOTE','DESTROY_ITEM','VIEW_ITEM','VIEW_NODE','VIEW_NPC','VIEW_WEBPAGE','VIEW_AUGBUBBLE','VIEW_MAP','VIEW_QUESTS','VIEW_INVENTORY','ENTER_QRCODE','UPLOAD_MEDIA_ITEM','UPLOAD_MEDIA_ITEM_IMAGE','UPLOAD_MEDIA_ITEM_AUDIO','UPLOAD_MEDIA_ITEM_VIDEO','RECEIVE_WEBHOOK','SEND_WEBHOOK','COMPLETE_QUEST','CREATE_NOTE','GET_NOTE','GIVE_NOTE_LIKE','GET_NOTE_LIKE','GIVE_NOTE_COMMENT','GET_NOTE_COMMENT');

ALTER TABLE games ADD COLUMN latitude   DOUBLE NOT NULL DEFAULT 0.0;
ALTER TABLE games ADD COLUMN longitude  DOUBLE NOT NULL DEFAULT 0.0;
ALTER TABLE games ADD COLUMN zoom_level DOUBLE NOT NULL DEFAULT 0.0;

ALTER TABLE quests ADD COLUMN description_notification TINYTEXT NOT NULL DEFAULT "";
ALTER TABLE quests ADD COLUMN text_when_complete_notification TINYTEXT NOT NULL DEFAULT "";
ALTER TABLE quests ADD COLUMN active_notification_media_id INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE quests ADD COLUMN complete_notification_media_id INT(10) UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE quests ADD COLUMN complete_go_function ENUM('NONE','NEARBY','GPS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT "NONE";

ALTER TABLE quests ADD COLUMN complete_full_screen_notify TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE quests ADD COLUMN active_notif_show_dismiss TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE quests ADD COLUMN complete_notif_show_dismiss TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE quests ADD COLUMN notif_go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';
ALTER TABLE quests ADD COLUMN complete_notif_go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';
ALTER TABLE quests CHANGE complete_go_function complete_go_function ENUM('NONE','NEARBY','GPS','QUESTS','INVENTORY','PLAYER','QR','NOTE','PICKGAME','JAVASCRIPT') NOT NULL DEFAULT 'NONE';

ALTER TABLE notes ADD COLUMN description tinytext NOT NULL DEFAULT "";

DROP TABLE overlay_tiles;
DROP TABLE overlays;

CREATE TABLE overlays (overlay_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, game_id INT(11) UNSIGNED NOT NULL, name VARCHAR(100) NOT NULL DEFAULT "", media_id INT(11) UNSIGNED NOT NULL, top_left_latitude DOUBLE NOT NULL DEFAULT 0.0, top_left_longitude DOUBLE NOT NULL DEFAULT 0.0, top_right_latitude DOUBLE NOT NULL DEFAULT 0.0, top_right_longitude DOUBLE NOT NULL DEFAULT 0.0, bottom_left_latitude DOUBLE NOT NULL DEFAULT 0.0, bottom_left_longitude DOUBLE NOT NULL DEFAULT 0.0, PRIMARY KEY (overlay_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE INDEX game_id ON overlays (game_id);

ALTER TABLE game_comments ADD COLUMN title TINYTEXT NOT NULL DEFAULT "";

UPDATE games SET allow_trading = 0;
UPDATE items SET tradeable = 0;

CREATE TABLE requirement_root_packages (
requirement_root_package_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
game_id INT(32) UNSIGNED NOT NULL,
name VARCHAR(64) NOT NULL DEFAULT "",
created TIMESTAMP DEFAULT '0000-00-00 00:00:00',
last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE INDEX requirement_root_package_game ON requirement_root_packages(game_id);

CREATE TABLE requirement_and_packages (
requirement_and_package_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
game_id INT(32) UNSIGNED NOT NULL,
requirement_root_package_id INT(32) UNSIGNED NOT NULL,
name VARCHAR(64) NOT NULL DEFAULT "",
created TIMESTAMP DEFAULT '0000-00-00 00:00:00',
last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE INDEX and_requirement_root_package ON requirement_and_packages(requirement_root_package_id);
CREATE INDEX and_requirement_game ON requirement_and_packages(game_id);

CREATE TABLE requirement_atoms (
requirement_atom_id INT(32) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
game_id INT(32) UNSIGNED NOT NULL,
requirement_and_package_id INT(32) UNSIGNED NOT NULL,
bool_operator TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
requirement ENUM('PLAYER_HAS_ITEM','PLAYER_HAS_TAGGED_ITEM','PLAYER_VIEWED_ITEM','PLAYER_VIEWED_NODE','PLAYER_VIEWED_NPC','PLAYER_VIEWED_WEBPAGE','PLAYER_VIEWED_AUGBUBBLE','PLAYER_HAS_UPLOADED_MEDIA_ITEM','PLAYER_HAS_UPLOADED_MEDIA_ITEM_IMAGE','PLAYER_HAS_UPLOADED_MEDIA_ITEM_AUDIO','PLAYER_HAS_UPLOADED_MEDIA_ITEM_VIDEO','PLAYER_HAS_COMPLETED_QUEST','PLAYER_HAS_REC
EIVED_INCOMING_WEB_HOOK','PLAYER_HAS_NOTE','PLAYER_HAS_NOTE_WITH_TAG','PLAYER_HAS_NOTE_WITH_LIKES','PLAYER_HAS_NOTE_WITH_COMMENTS','PLAYER_HAS_GIVEN_NOTE_COMMENTS'),
content_id INT(32) UNSIGNED NOT NULL DEFAULT 0,
distance INT(32) NOT NULL DEFAULT 0,
qty INT(32) UNSIGNED NOT NULL DEFAULT 0,
latitude DOUBLE NOT NULL DEFAULT 0.0,
longitude DOUBLE NOT NULL DEFAULT 0.0,
created TIMESTAMP DEFAULT '0000-00-00 00:00:00',
last_active TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE INDEX atom_requirement_and_package ON requirement_atoms(requirement_and_package_id);
CREATE INDEX atom_requirement_game ON requirement_atoms(game_id);

ALTER TABLE nodes ADD COLUMN requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE quests ADD COLUMN complete_requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE quests ADD COLUMN display_requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE locations ADD COLUMN requirement_package_id INT(32) UNSIGNED NOT NULL DEFAULT 0;
{'fraction_non_alphanumeric': 0.08157382719607985, 'fraction_numerical': 0.0232038625063054, 'mean_word_length': 8.835577604535791, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6690138', 'n_tokens_mistral': 4935, 'n_tokens_neox': 4584, 'n_words': 1295}