MythTV master
dbcheck.cpp
Go to the documentation of this file.
1#include <cstdio>
2#include <iostream>
3
4#include <QString>
5#include <QSqlError>
6
10#include "libmythbase/mythconfig.h"
12#include "libmythbase/mythdb.h"
15#include "libmythbase/mythversion.h"
16
17#include "cardutil.h"
18#include "dbcheck.h"
19#include "mythvideoprofile.h"
20#include "recordinginfo.h"
21#include "recordingprofile.h"
22#include "recordingrule.h"
23#include "videodbcheck.h" // for 1267
24
25// TODO convert all dates to UTC
26
27#define MINIMUM_DBMS_VERSION 5,0,15
28
29const QString currentDatabaseVersion = MYTH_DATABASE_VERSION;
30
31static bool doUpgradeTVDatabaseSchema(void);
32static bool tryUpgradeTVDatabaseSchema(bool upgradeAllowed, bool upgradeIfNoUI, bool informSystemd);
33
34#if CONFIG_SYSTEMD_NOTIFY
35#include <systemd/sd-daemon.h>
36static inline void db_sd_notify(const char *str)
37{
38 sd_notifyf(0, "STATUS=Database update: %s", str);
39}
40#else
41static inline void db_sd_notify(const char */*str*/) {};
42#endif
43
362bool UpgradeTVDatabaseSchema(const bool upgradeAllowed,
363 const bool upgradeIfNoUI,
364 [[maybe_unused]] const bool informSystemd)
365{
366#ifdef IGNORE_SCHEMA_VER_MISMATCH
367 QString dbver = gCoreContext->GetSetting("DBSchemaVer");
368 if (dbver != currentDatabaseVersion)
369 LOG(VB_GENERAL, LOG_INFO,
370 QString("Ignoring database changes between %1 and %2.")
371 .arg(dbver, currentDatabaseVersion));
372 return true;
373#endif
374 // Suppress DB messages and turn of the settings cache,
375 // These are likely to confuse the users and the code, respectively.
376 GetMythDB()->SetSuppressDBMessages(true);
378
379 // Get the schema upgrade lock
381 bool locked = DBUtil::TryLockSchema(query, 1);
382 for (uint i = 0; i < 2*60 && !locked; i++)
383 {
384 if (informSystemd)
385 db_sd_notify("waiting for lock");
386 LOG(VB_GENERAL, LOG_INFO, "Waiting for database schema upgrade lock");
387 locked = DBUtil::TryLockSchema(query, 1);
388 if (locked)
389 LOG(VB_GENERAL, LOG_INFO, "Got schema upgrade lock");
390 }
391 if (!locked)
392 {
393 LOG(VB_GENERAL, LOG_INFO, "Failed to get schema upgrade lock");
394 if (informSystemd)
395 db_sd_notify("failed to get schema upgrade lock");
396 GetMythDB()->SetSuppressDBMessages(false);
398 return false;
399 }
400
401 bool success = tryUpgradeTVDatabaseSchema(upgradeAllowed, upgradeIfNoUI, informSystemd);
402
403 // On any exit we want to re-enable the DB messages so errors
404 // are reported and we want to make sure the setting cache is
405 // enabled for good performance and we must unlock the schema
406 // lock.
407 if (informSystemd)
408 db_sd_notify(success ? "success" : "failed");
409 GetMythDB()->SetSuppressDBMessages(false);
412 return success;
413}
414
415static bool tryUpgradeTVDatabaseSchema(bool upgradeAllowed, bool upgradeIfNoUI, bool informSystemd)
416{
417 // Determine if an upgrade is needed
419 "DBSchemaVer", "MythTV", currentDatabaseVersion);
420 if (schema_wizard->Compare() == 0) // DB schema is what we need it to be..
421 return true;
422
423 if (informSystemd)
424 db_sd_notify("waiting for user input");
425 // Pop up messages, questions, warnings, etc.
426 switch (schema_wizard->PromptForUpgrade(
427 "TV", upgradeAllowed, upgradeIfNoUI, MINIMUM_DBMS_VERSION))
428 {
430 return true;
432 case MYTH_SCHEMA_EXIT:
433 return false;
435 break;
436 }
437
438 LOG(VB_GENERAL, LOG_DEBUG, QString("Newest MythTV Schema Version : %1")
440
441 // Upgrade the schema
442 if (informSystemd)
443 db_sd_notify("upgrading database");
445 {
446 LOG(VB_GENERAL, LOG_ERR, "Database schema upgrade failed.");
447 return false;
448 }
449
450 LOG(VB_GENERAL, LOG_INFO, "Database schema upgrade complete.");
451
452 return true;
453}
454
469{
470 QString dbver = gCoreContext->GetSetting("DBSchemaVer");
471 if (dbver == currentDatabaseVersion)
472 {
473 return true;
474 }
475
476 // Don't rely on this, please specify these when creating the database.
477 {
479 if (!query.exec(QString("ALTER DATABASE %1 DEFAULT "
480 "CHARACTER SET utf8 COLLATE utf8_general_ci;")
481 .arg(GetMythDB()->GetDatabaseName())))
482 {
483 MythDB::DBError("UpgradeTVDatabaseSchema -- alter charset", query);
484 }
485 }
486
488 {
490 return false;
491 dbver = gCoreContext->GetSetting("DBSchemaVer");
492 }
493
494 if (dbver.isEmpty() || dbver.toInt() < 1027)
495 {
496 LOG(VB_GENERAL, LOG_ERR, "Unrecognized database schema version. "
497 "Unable to upgrade database.");
498 return false;
499 }
500 if (dbver.toInt() < 1348)
501 {
502 LOG(VB_GENERAL, LOG_ERR, "Your database version is too old to upgrade "
503 "with this version of MythTV. You will need "
504 "to use mythtv-setup from MythTV 29 to 34 "
505 "to upgrade your database before "
506 "upgrading to this version of MythTV.");
507 return false;
508 }
509
510 if (dbver == "1348")
511 {
512 DBUpdates updates {
513 "update capturecard "
514 " set videodevice=left(videodevice, "
515 " locate('-', videodevice)-1) "
516 " where cardtype='HDHOMERUN' "
517 " and videodevice like '%-%'"
518 };
519 if (!performActualUpdate("MythTV", "DBSchemaVer",
520 updates, "1349", dbver))
521 return false;
522 }
523
524 if (dbver == "1349")
525 {
526 DBUpdates updates {
527 // Incorrect DB update removed
528 };
529 if (!performActualUpdate("MythTV", "DBSchemaVer",
530 updates, "1350", dbver))
531 return false;
532 }
533
534 if (dbver == "1350")
535 {
536 DBUpdates updates {
537 "ALTER TABLE videosource ADD COLUMN bouquet_id INT DEFAULT 0;",
538 "ALTER TABLE videosource ADD COLUMN region_id INT DEFAULT 0;"
539 };
540 if (!performActualUpdate("MythTV", "DBSchemaVer",
541 updates, "1351", dbver))
542 return false;
543 }
544
545 if (dbver == "1351")
546 {
547 DBUpdates updates {
548 "ALTER TABLE videosource MODIFY bouquet_id INT UNSIGNED;",
549 "ALTER TABLE videosource MODIFY region_id INT UNSIGNED;",
550 "ALTER TABLE channel ADD COLUMN service_type INT UNSIGNED DEFAULT 0 AFTER serviceid;"
551 };
552 if (!performActualUpdate("MythTV", "DBSchemaVer",
553 updates, "1352", dbver))
554 return false;
555 }
556
557 if (dbver == "1352")
558 {
559 DBUpdates updates {
560 "ALTER TABLE capturecard MODIFY schedgroup TINYINT(1) DEFAULT 1 NOT NULL"
561 };
562 if (!performActualUpdate("MythTV", "DBSchemaVer",
563 updates, "1353", dbver))
564 return false;
565 }
566
567 if (dbver == "1353")
568 {
569 DBUpdates updates {
570 "ALTER TABLE channel ADD COLUMN deleted TIMESTAMP NULL"
571 };
572 if (!performActualUpdate("MythTV", "DBSchemaVer",
573 updates, "1354", dbver))
574 return false;
575 }
576
577 if (dbver == "1354")
578 {
579 DBUpdates updates {
580 "ALTER TABLE videosource ADD COLUMN scanfrequency INT UNSIGNED DEFAULT 0;"
581 };
582 if (!performActualUpdate("MythTV", "DBSchemaVer",
583 updates, "1355", dbver))
584 return false;
585 }
586
587 if (dbver == "1355")
588 {
589 DBUpdates updates {
590 "UPDATE capturecard "
591 "SET displayname = CONCAT('Input ', cardid) "
592 "WHERE displayname = ''"
593 };
594 if (!performActualUpdate("MythTV", "DBSchemaVer",
595 updates, "1356", dbver))
596 return false;
597 }
598
599 if (dbver == "1356")
600 {
601 DBUpdates updates {
602 "REPLACE INTO recordfilter (filterid, description, clause, "
603 " newruledefault) "
604 " VALUES (12, 'Priority channel', 'channel.recpriority > 0', 0)"
605 };
606 if (!performActualUpdate("MythTV", "DBSchemaVer",
607 updates, "1357", dbver))
608 return false;
609 }
610
611 if (dbver == "1357")
612 {
613 // convert old VideoDisplayProfile settings to new format
615 std::vector<MythVideoProfileItem> profiles;
616
618 query.prepare("SELECT profileid, value, data FROM displayprofiles "
619 "ORDER BY profileid");
620
621 for (;;)
622 {
623 if (!query.exec())
624 break;
625
626 uint currentprofile = 0;
627 while (query.next())
628 {
629 if (query.value(0).toUInt() != currentprofile)
630 {
631 if (currentprofile)
632 {
633 temp.SetProfileID(currentprofile);
634 profiles.push_back(temp);
635 }
636 temp.Clear();
637 currentprofile = query.value(0).toUInt();
638 }
639 temp.Set(query.value(1).toString(), query.value(2).toString());
640 }
641
642 if (currentprofile)
643 {
644 temp.SetProfileID(currentprofile);
645 profiles.push_back(temp);
646 }
647
648 for (const MythVideoProfileItem& profile : std::as_const(profiles))
649 {
650 QString newdecoder;
651 QString newrender;
652 QString newdeint0;
653 QString newdeint1;
654
655 QString olddecoder = profile.Get("pref_decoder");
656 QString oldrender = profile.Get("pref_videorenderer");
657 QString olddeint0 = profile.Get("pref_deint0");
658 QString olddeint1 = profile.Get("pref_deint1");
659
660 if (oldrender == "xv-blit")
661 {
662 newdecoder = "ffmpeg";
663 newrender = "opengl-yv12";
664 }
665 if (olddecoder == "openmax" || oldrender == "openmax")
666 {
667 newdecoder = "mmal-dec";
668 newrender = "opengl-yv12";
669 }
670 if ((olddecoder == "mediacodec") || (olddecoder == "nvdec") ||
671 (olddecoder == "vda") || (olddecoder == "vaapi2") ||
672 (olddecoder == "vaapi" && oldrender == "openglvaapi") ||
673 (olddecoder == "vdpau" && oldrender == "vdpau"))
674 {
675 if (oldrender != "opengl-hw")
676 newrender = "opengl-hw";
677 }
678 if (olddecoder == "vda")
679 newdecoder = "vtb";
680 if (olddecoder == "vaapi2")
681 newdecoder = "vaapi";
682
683 auto UpdateDeinterlacer = [](const QString &Olddeint, QString &Newdeint, const QString &Decoder)
684 {
685 if (Olddeint.isEmpty())
686 {
687 Newdeint = "none";
688 }
689 else if (Olddeint == "none" ||
690 Olddeint.contains(DEINT_QUALITY_SHADER) ||
691 Olddeint.contains(DEINT_QUALITY_DRIVER) ||
692 Olddeint.contains(DEINT_QUALITY_LOW) ||
693 Olddeint.contains(DEINT_QUALITY_MEDIUM) ||
694 Olddeint.contains(DEINT_QUALITY_HIGH))
695 {
696 return;
697 }
698
699 QStringList newsettings;
700 bool driver = (Decoder != "ffmpeg") &&
701 (Olddeint.contains("vaapi") || Olddeint.contains("vdpau") ||
702 Olddeint.contains("nvdec"));
703 if (driver)
704 newsettings << DEINT_QUALITY_DRIVER;
705 if (Olddeint.contains("opengl") || driver)
706 newsettings << DEINT_QUALITY_SHADER;
707
708 if (Olddeint.contains("greedy") || Olddeint.contains("yadif") ||
709 Olddeint.contains("kernel") || Olddeint.contains("advanced") ||
710 Olddeint.contains("compensated") || Olddeint.contains("adaptive"))
711 {
712 newsettings << DEINT_QUALITY_HIGH;
713 }
714 else if (Olddeint.contains("bob") || Olddeint.contains("onefield") ||
715 Olddeint.contains("linedouble"))
716 {
717 newsettings << DEINT_QUALITY_LOW;
718 }
719 else
720 {
721 newsettings << DEINT_QUALITY_MEDIUM;
722 }
723 Newdeint = newsettings.join(":");
724 };
725
726 QString decoder = newdecoder.isEmpty() ? olddecoder : newdecoder;
727 UpdateDeinterlacer(olddeint0, newdeint0, decoder);
728 UpdateDeinterlacer(olddeint1, newdeint1, decoder);
729
730 auto UpdateData = [](uint ProfileID, const QString &Value, const QString &Data)
731 {
733 update.prepare(
734 "UPDATE displayprofiles SET data = :DATA "
735 "WHERE profileid = :PROFILEID AND value = :VALUE");
736 update.bindValue(":PROFILEID", ProfileID);
737 update.bindValue(":VALUE", Value);
738 update.bindValue(":DATA", Data);
739 if (!update.exec())
740 LOG(VB_GENERAL, LOG_ERR,
741 QString("Error updating display profile id %1").arg(ProfileID));
742 };
743
744 uint id = profile.GetProfileID();
745 if (!newdecoder.isEmpty())
746 UpdateData(id, "pref_decoder", newdecoder);
747 if (!newrender.isEmpty())
748 UpdateData(id, "pref_videorenderer", newrender);
749 if (!newdeint0.isEmpty())
750 UpdateData(id, "pref_deint0", newdeint0);
751 if (!newdeint1.isEmpty())
752 UpdateData(id, "pref_deint1", newdeint1);
753 }
754 break;
755 }
756
757 // remove old studio levels keybinding
758 DBUpdates updates {
759 "DELETE FROM keybindings WHERE action='TOGGLESTUDIOLEVELS'"
760 };
761
762 if (!performActualUpdate("MythTV", "DBSchemaVer",
763 updates, "1358", dbver))
764 return false;
765 }
766
767 if (dbver == "1358")
768 {
769 DBUpdates updates {
770 // Allow videosouce.userid to be NULL as originally intended.
771 "ALTER TABLE videosource "
772 " CHANGE COLUMN userid userid VARCHAR(128) NULL DEFAULT NULL",
773 // And fix any leftover, empty values.
774 "UPDATE videosource "
775 " SET userid = NULL "
776 " WHERE userid = ''",
777 // Remove potential clear text credentials no longer usable
778 "UPDATE videosource "
779 " SET userid = NULL, password = NULL "
780 " WHERE xmltvgrabber IN ('schedulesdirect1', 'datadirect')"
781 };
782 if (!performActualUpdate("MythTV", "DBSchemaVer",
783 updates, "1359", dbver))
784 return false;
785 }
786
787 if (dbver == "1359")
788 {
789 // XineramaMonitorAspectRatio was previously ignored for single screen
790 // setups but now acts as an override for the display aspect ratio.
791 // 0.0 indicates 'Auto' - which should be the default.
792 DBUpdates updates {
793 "UPDATE settings SET data='0.0' WHERE value='XineramaMonitorAspectRatio'"
794 };
795 if (!performActualUpdate("MythTV", "DBSchemaVer",
796 updates, "1360", dbver))
797 return false;
798 }
799
800 if (dbver == "1360")
801 {
802 // missed in 1357 - convert old vdpau and openglvaapi renderers to opengl
803 // convert ancient quartz-blit to opengl as well
805 std::vector<MythVideoProfileItem> profiles;
806
808 query.prepare("SELECT profileid, value, data FROM displayprofiles "
809 "ORDER BY profileid");
810
811 // coverity[unreachable] False positive.
812 for (;;)
813 {
814 if (!query.exec())
815 break;
816
817 uint currentprofile = 0;
818 while (query.next())
819 {
820 if (query.value(0).toUInt() != currentprofile)
821 {
822 if (currentprofile)
823 {
824 temp.SetProfileID(currentprofile);
825 profiles.push_back(temp);
826 }
827 temp.Clear();
828 currentprofile = query.value(0).toUInt();
829 }
830 temp.Set(query.value(1).toString(), query.value(2).toString());
831 }
832
833 if (currentprofile)
834 {
835 temp.SetProfileID(currentprofile);
836 profiles.push_back(temp);
837 }
838
839 for (const MythVideoProfileItem& profile : std::as_const(profiles))
840 {
841 // the old deinterlacers will have been converted already
842 QString oldrender = profile.Get("pref_videorenderer");
843 if (oldrender == "quartz-blit" || oldrender == "openglvaapi" ||
844 oldrender == "vdpau")
845 {
846 auto UpdateData = [](uint ProfileID, const QString &Value, const QString &Data)
847 {
849 update.prepare(
850 "UPDATE displayprofiles SET data = :DATA "
851 "WHERE profileid = :PROFILEID AND value = :VALUE");
852 update.bindValue(":PROFILEID", ProfileID);
853 update.bindValue(":VALUE", Value);
854 update.bindValue(":DATA", Data);
855 if (!update.exec())
856 LOG(VB_GENERAL, LOG_ERR,
857 QString("Error updating display profile id %1").arg(ProfileID));
858 };
859
860 uint id = profile.GetProfileID();
861 UpdateData(id, "pref_decoder", "ffmpeg");
862 UpdateData(id, "pref_videorenderer", "opengl-yv12");
863 }
864 }
865 break;
866 }
867
868 if (!UpdateDBVersionNumber("MythTV", "DBSchemaVer", "1361", dbver))
869 return false;
870 }
871 if (dbver == "1361")
872 {
873 DBUpdates updates {
874 "ALTER TABLE program CHANGE COLUMN videoprop videoprop "
875 " SET('WIDESCREEN', 'HDTV', 'MPEG2', 'AVC', 'HEVC') NOT NULL; ",
876 "ALTER TABLE recordedprogram CHANGE COLUMN videoprop videoprop "
877 " SET('WIDESCREEN', 'HDTV', 'MPEG2', 'AVC', 'HEVC', "
878 " '720', '1080', '4K', '3DTV', 'PROGRESSIVE', "
879 " 'DAMAGED') NOT NULL; ",
880 };
881 if (!performActualUpdate("MythTV", "DBSchemaVer",
882 updates, "1362", dbver))
883 return false;
884 }
885
886 if (dbver == "1362")
887 {
889 select.prepare(
890 QString("select index_name from information_schema.statistics "
891 "where table_schema = '%1' "
892 "and table_name = 'recordedartwork' "
893 "and seq_in_index = 1 "
894 "and column_name = 'inetref'")
895 .arg(GetMythDB()->GetDatabaseName()));
896
897 if (!select.exec())
898 {
899 MythDB::DBError("Unable to retrieve index values.", select);
900 return false;
901 }
902
903 DBUpdates updates {
904 "CREATE INDEX recordedartwork_ix1 ON recordedartwork (inetref); "
905 };
906
907 // do not create index if already done.
908 if (select.size() > 0) {
909 updates.clear();
910 }
911
912 if (!performActualUpdate("MythTV", "DBSchemaVer",
913 updates, "1363", dbver))
914 return false;
915 }
916
917 if (dbver == "1363")
918 {
920
921 // insert a new profile group for Sat>IP
922 query.prepare("INSERT INTO profilegroups SET name = 'Sat>IP Recorder', "
923 "cardtype = 'SATIP', is_default = 1;");
924 if (!query.exec())
925 {
926 MythDB::DBError("Unable to insert Sat>IP profilegroup.", query);
927 return false;
928 }
929
930 // get the id of the new profile group
931 int groupid = query.lastInsertId().toInt();
932
933 // insert the recording profiles
934 query.prepare("INSERT INTO recordingprofiles SET name = \"Default\", profilegroup = :GROUPID;");
935 query.bindValue(":GROUPID", groupid);
936 if (!query.exec())
937 {
938 MythDB::DBError("Unable to insert 'Default' recordingprofile.", query);
939 return false;
940 }
941
942 query.prepare("INSERT INTO recordingprofiles SET name = \"Live TV\", profilegroup = :GROUPID;");
943 query.bindValue(":GROUPID", groupid);
944 if (!query.exec())
945 {
946 MythDB::DBError("Unable to insert 'Live TV' recordingprofile.", query);
947 return false;
948 }
949
950 query.prepare("INSERT INTO recordingprofiles SET name = \"High Quality\", profilegroup = :GROUPID;");
951 query.bindValue(":GROUPID", groupid);
952 if (!query.exec())
953 {
954 MythDB::DBError("Unable to insert 'High Quality' recordingprofile.", query);
955 return false;
956 }
957
958 query.prepare("INSERT INTO recordingprofiles SET name = \"Low Quality\", profilegroup = :GROUPID;");
959 query.bindValue(":GROUPID", groupid);
960 if (!query.exec())
961 {
962 MythDB::DBError("Unable to insert 'Low Quality' recordingprofile.", query);
963 return false;
964 }
965
966 if (!UpdateDBVersionNumber("MythTV", "DBSchemaVer", "1364", dbver))
967 return false;
968 }
969
970 if (dbver == "1364")
971 {
972 // Set depmethod to none for all manual, recording rules.
973 DBUpdates updates {
974 "UPDATE record SET dupmethod = 1 WHERE search = 5"
975 };
976 if (!performActualUpdate("MythTV", "DBSchemaVer",
977 updates, "1365", dbver))
978 return false;
979 }
980
981 if (dbver == "1365")
982 {
983 DBUpdates updates {
984 "ALTER TABLE channelscan_channel ADD COLUMN service_type INT UNSIGNED NOT NULL DEFAULT 0;"
985 };
986 if (!performActualUpdate("MythTV", "DBSchemaVer",
987 updates, "1366", dbver))
988 return false;
989 }
990
991 if (dbver == "1366")
992 {
993 DBUpdates updates {
994 "ALTER TABLE channelscan_dtv_multiplex ADD COLUMN signal_strength INT NOT NULL DEFAULT 0;"
995 };
996 if (!performActualUpdate("MythTV", "DBSchemaVer",
997 updates, "1367", dbver))
998 return false;
999 }
1000
1001 if (dbver == "1367")
1002 {
1003 DBUpdates updates {
1004 "ALTER TABLE videosource ADD COLUMN lcnoffset INT UNSIGNED DEFAULT 0;"
1005 };
1006 if (!performActualUpdate("MythTV", "DBSchemaVer",
1007 updates, "1368", dbver))
1008 return false;
1009 }
1010 if (dbver == "1368")
1011 {
1012 DBUpdates updates {
1013 // NOLINTNEXTLINE(bugprone-suspicious-missing-comma)
1014 "ALTER TABLE credits ADD COLUMN priority "
1015 " TINYINT UNSIGNED DEFAULT 0;",
1016 "ALTER TABLE credits ADD COLUMN roleid "
1017 " MEDIUMINT UNSIGNED DEFAULT 0;",
1018 "ALTER TABLE credits drop key chanid, "
1019 " add unique key `chanid` "
1020 " (chanid, starttime, person, role, roleid);"
1021 "ALTER TABLE recordedcredits ADD COLUMN priority "
1022 " TINYINT UNSIGNED DEFAULT 0;",
1023 "ALTER TABLE recordedcredits ADD COLUMN roleid "
1024 " MEDIUMINT UNSIGNED DEFAULT 0;",
1025 "ALTER TABLE recordedcredits drop key chanid, "
1026 " add unique key `chanid` "
1027 " (chanid, starttime, person, role, roleid);"
1028 "CREATE TABLE roles (roleid MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,"
1029 " `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin"
1030 " NOT NULL DEFAULT '',"
1031 " PRIMARY KEY (roleid),"
1032 " UNIQUE KEY `name` (`name`)"
1033 ") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1034 };
1035 if (!performActualUpdate("MythTV", "DBSchemaVer",
1036 updates, "1369", dbver))
1037 return false;
1038 }
1039 if (dbver == "1369")
1040 {
1041 DBUpdates updates {
1042 "ALTER TABLE programrating MODIFY COLUMN `system` "
1043 " varchar(128);",
1044 "ALTER TABLE programrating MODIFY COLUMN rating "
1045 " varchar(128);",
1046 "ALTER TABLE recordedrating MODIFY COLUMN `system` "
1047 " varchar(128);",
1048 "ALTER TABLE recordedrating MODIFY COLUMN rating "
1049 " varchar(128);",
1050 };
1051 if (!performActualUpdate("MythTV", "DBSchemaVer",
1052 updates, "1370", dbver))
1053 return false;
1054 }
1055
1056 if (dbver == "1370")
1057 {
1058 // Migrate users from ttvdb.py to ttvdb4.py
1059 DBUpdates updates {
1060 "UPDATE settings SET data=REPLACE(data, 'ttvdb.py', 'ttvdb4.py') "
1061 "WHERE value='TelevisionGrabber'"
1062 };
1063 if (!performActualUpdate("MythTV", "DBSchemaVer",
1064 updates, "1371", dbver))
1065 return false;
1066 }
1067
1068 if (dbver == "1371")
1069 {
1070 // Recording extender tables are now created later.
1071
1072 if (!DBUtil::CheckTableColumnExists(QString("record"), QString("autoextend")))
1073 {
1074 // If that worked, modify existing tables.
1076 if (!performActualUpdate("MythTV", "DBSchemaVer",
1077 updates, "1372", dbver))
1078 return false;
1079 }
1080 else
1081 {
1082 if (!UpdateDBVersionNumber("MythTV", "DBSchemaVer", "1372", dbver))
1083 return false;
1084 }
1085 }
1086
1087 if (dbver == "1372")
1088 {
1089 if (!DBUtil::CheckTableColumnExists(QString("recorded"), QString("lastplay")))
1090 {
1091 DBUpdates updates {
1092 "ALTER TABLE recorded ADD COLUMN lastplay "
1093 " TINYINT UNSIGNED DEFAULT 0 AFTER bookmark;",
1094 };
1095 if (!performActualUpdate("MythTV", "DBSchemaVer",
1096 updates, "1373", dbver))
1097 return false;
1098 }
1099 else
1100 {
1101 if (!UpdateDBVersionNumber("MythTV", "DBSchemaVer", "1373", dbver))
1102 return false;
1103 }
1104 }
1105
1106 if (dbver == "1373")
1107 {
1108 DBUpdates updates {
1109 // adjust inetref prefixes to new grabber script
1110 "UPDATE record SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');",
1111 "UPDATE recorded SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');",
1112 "UPDATE oldrecorded SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');",
1113 "UPDATE videometadata SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');",
1114 "UPDATE program SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');",
1115 "UPDATE recordedprogram SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');",
1116 "UPDATE recordedartwork SET inetref=REPLACE(inetref, 'ttvdb.py', 'ttvdb4.py');"
1117 };
1118 if (!performActualUpdate("MythTV", "DBSchemaVer",
1119 updates, "1374", dbver))
1120 return false;
1121 }
1122
1123 if (dbver == "1374")
1124 {
1125 // Recording extender tables are now created later.
1126 DBUpdates updates {};
1127 if (!performActualUpdate("MythTV", "DBSchemaVer",
1128 updates, "1375", dbver))
1129 return false;
1130 }
1131
1132 if (dbver == "1375")
1133 {
1134 // Delete any existing recording extender tables.
1136 if (!performUpdateSeries("MythTV", updates))
1137 return false;
1138
1139 // Now (re)create them.
1140 updates = getRecordingExtenderDbInfo(1);
1141 if (!performUpdateSeries("MythTV", updates))
1142 return false;
1143
1144 // Add new tv listing name ->api name mappings for college
1145 // basketball.
1146 updates = getRecordingExtenderDbInfo(2);
1147 if (!performActualUpdate("MythTV", "DBSchemaVer",
1148 updates, "1376", dbver))
1149 return false;
1150 }
1151
1152 if (dbver == "1376")
1153 {
1154 DBUpdates updates {
1155 "DROP TABLE IF EXISTS `logging`;",
1156 "UPDATE settings SET data='0' WHERE value='LogEnabled'; ", // Keeps MythWeb happy
1157 };
1158 if (!performActualUpdate("MythTV", "DBSchemaVer",
1159 updates, "1377", dbver))
1160 return false;
1161 }
1162
1163 if (dbver == "1377")
1164 {
1165 // Change reverted, but the version number can't be reused.
1166 DBUpdates updates {};
1167 if (!performActualUpdate("MythTV", "DBSchemaVer",
1168 updates, "1378", dbver))
1169 return false;
1170 }
1171
1172 if (dbver == "1378")
1173 {
1174 DBUpdates updates {
1175 "CREATE INDEX dir_id ON gallery_files (dir_id);"
1176 };
1177 if (!performActualUpdate("MythTV", "DBSchemaVer",
1178 updates, "1379", dbver))
1179 return false;
1180 }
1181
1182 if (dbver == "1379")
1183 {
1184 DBUpdates updates {
1185 "ALTER TABLE channelscan_channel ADD COLUMN logical_channel INT UNSIGNED NOT NULL DEFAULT 0 AFTER service_type;"
1186 "ALTER TABLE channelscan_channel ADD COLUMN simulcast_channel INT UNSIGNED NOT NULL DEFAULT 0 AFTER logical_channel;"
1187 };
1188 if (!performActualUpdate("MythTV", "DBSchemaVer",
1189 updates, "1380", dbver))
1190 return false;
1191 }
1192
1193 if (dbver == "1380")
1194 {
1195 DBUpdates updates {
1196 "ALTER TABLE filemarkup ADD INDEX (type);"
1197 } ;
1198 if (!performActualUpdate("MythTV", "DBSchemaVer",
1199 updates, "1381", dbver))
1200 return false;
1201 }
1202
1203 if (dbver == "1381")
1204 {
1205 DBUpdates updates {
1206 "ALTER TABLE iptv_channel ADD INDEX (chanid);"
1207 "ALTER TABLE channelgroup ADD INDEX (chanid);"
1208 } ;
1209 if (!performActualUpdate("MythTV", "DBSchemaVer",
1210 updates, "1382", dbver))
1211 return false;
1212 }
1213
1214 if (dbver == "1382")
1215 {
1216 DBUpdates updates {
1217 "ALTER TABLE iptv_channel MODIFY iptvid INT UNSIGNED;"
1218 } ;
1219 if (!performActualUpdate("MythTV", "DBSchemaVer",
1220 updates, "1383", dbver))
1221 return false;
1222 }
1223
1224 if (dbver == "1383")
1225 {
1226 DBUpdates updates {
1227 "ALTER TABLE iptv_channel MODIFY iptvid INT UNSIGNED AUTO_INCREMENT;"
1228 } ;
1229 if (!performActualUpdate("MythTV", "DBSchemaVer",
1230 updates, "1384", dbver))
1231 return false;
1232 }
1233
1234 if (dbver == "1384")
1235 {
1236 // Remove possible inconsistent data from 1384.
1238 performUpdateSeries("MythTV", updates);
1239
1240 // Add post-season baseball listings for the MLB provider.
1241 updates = getRecordingExtenderDbInfo(3);
1242 if (!performActualUpdate("MythTV", "DBSchemaVer",
1243 updates, "1385", dbver))
1244 return false;
1245 }
1246
1247 return true;
1248}
1249
1270{
1272 query.prepare("SHOW TABLES;");
1273
1274 // check for > 1 table here since the schemalock table should exist
1275 if (query.exec() && query.isActive() && query.size() > 1)
1276 {
1277 QString msg = QString(
1278 "Told to create a NEW database schema, but the database\n"
1279 "already has %1 tables.\n"
1280 "If you are sure this is a good MythTV database, verify\n"
1281 "that the settings table has the DBSchemaVer variable.\n")
1282 .arg(query.size() - 1);
1283 LOG(VB_GENERAL, LOG_ERR, msg);
1284 return false;
1285 }
1286
1287 LOG(VB_GENERAL, LOG_NOTICE,
1288 "Inserting MythTV initial database information.");
1289
1290// Don't try to moderinze string literals in this section. This lets
1291// us cut-n-paste the output of mysqldump into the code without
1292// generating any warning messages.
1293// NOLINTBEGIN(modernize-raw-string-literal)
1294
1295 DBUpdates updates {
1296"CREATE TABLE `bdbookmark` ("
1297" `serialid` varchar(40) NOT NULL DEFAULT '',"
1298" `name` varchar(128) DEFAULT NULL,"
1299" `bdstate` varchar(4096) NOT NULL DEFAULT '',"
1300" `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,"
1301" PRIMARY KEY (`serialid`)"
1302") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1303"CREATE TABLE `capturecard` ("
1304" `cardid` int unsigned NOT NULL AUTO_INCREMENT,"
1305" `parentid` int unsigned NOT NULL DEFAULT '0',"
1306" `videodevice` varchar(128) DEFAULT NULL,"
1307" `audiodevice` varchar(128) DEFAULT NULL,"
1308" `vbidevice` varchar(128) DEFAULT NULL,"
1309" `cardtype` varchar(32) DEFAULT 'V4L',"
1310" `defaultinput` varchar(32) DEFAULT 'Television',"
1311" `audioratelimit` int DEFAULT NULL,"
1312" `hostname` varchar(64) DEFAULT NULL,"
1313" `dvb_swfilter` int DEFAULT '0',"
1314" `dvb_sat_type` int NOT NULL DEFAULT '0',"
1315" `dvb_wait_for_seqstart` int NOT NULL DEFAULT '1',"
1316" `skipbtaudio` tinyint(1) DEFAULT '0',"
1317" `dvb_on_demand` tinyint NOT NULL DEFAULT '0',"
1318" `dvb_diseqc_type` smallint DEFAULT NULL,"
1319" `firewire_speed` int unsigned NOT NULL DEFAULT '0',"
1320" `firewire_model` varchar(32) DEFAULT NULL,"
1321" `firewire_connection` int unsigned NOT NULL DEFAULT '0',"
1322" `signal_timeout` int NOT NULL DEFAULT '1000',"
1323" `channel_timeout` int NOT NULL DEFAULT '3000',"
1324" `dvb_tuning_delay` int unsigned NOT NULL DEFAULT '0',"
1325" `contrast` int NOT NULL DEFAULT '0',"
1326" `brightness` int NOT NULL DEFAULT '0',"
1327" `colour` int NOT NULL DEFAULT '0',"
1328" `hue` int NOT NULL DEFAULT '0',"
1329" `diseqcid` int unsigned DEFAULT NULL,"
1330" `dvb_eitscan` tinyint(1) NOT NULL DEFAULT '1',"
1331" `inputname` varchar(32) NOT NULL DEFAULT 'None',"
1332" `sourceid` int unsigned NOT NULL DEFAULT '0',"
1333" `externalcommand` varchar(128) DEFAULT NULL,"
1334" `changer_device` varchar(128) DEFAULT NULL,"
1335" `changer_model` varchar(128) DEFAULT NULL,"
1336" `tunechan` varchar(10) DEFAULT NULL,"
1337" `startchan` varchar(10) DEFAULT NULL,"
1338" `displayname` varchar(64) NOT NULL DEFAULT '',"
1339" `dishnet_eit` tinyint(1) NOT NULL DEFAULT '0',"
1340" `recpriority` int NOT NULL DEFAULT '0',"
1341" `quicktune` tinyint NOT NULL DEFAULT '0',"
1342" `schedorder` int unsigned NOT NULL DEFAULT '1',"
1343" `livetvorder` int unsigned NOT NULL DEFAULT '1',"
1344" `reclimit` int unsigned NOT NULL DEFAULT '1',"
1345" `schedgroup` tinyint(1) NOT NULL DEFAULT '1',"
1346" PRIMARY KEY (`cardid`)"
1347") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1348"CREATE TABLE `cardinput` ("
1349" `cardinputid` int unsigned NOT NULL AUTO_INCREMENT,"
1350" `cardid` int unsigned NOT NULL DEFAULT '0',"
1351" `sourceid` int unsigned NOT NULL DEFAULT '0',"
1352" `inputname` varchar(32) NOT NULL DEFAULT '',"
1353" `externalcommand` varchar(128) DEFAULT NULL,"
1354" `changer_device` varchar(128) DEFAULT NULL,"
1355" `changer_model` varchar(128) DEFAULT NULL,"
1356" `tunechan` varchar(10) DEFAULT NULL,"
1357" `startchan` varchar(10) DEFAULT NULL,"
1358" `displayname` varchar(64) NOT NULL DEFAULT '',"
1359" `dishnet_eit` tinyint(1) NOT NULL DEFAULT '0',"
1360" `recpriority` int NOT NULL DEFAULT '0',"
1361" `quicktune` tinyint NOT NULL DEFAULT '0',"
1362" `schedorder` int unsigned NOT NULL DEFAULT '0',"
1363" `livetvorder` int unsigned NOT NULL DEFAULT '0',"
1364" PRIMARY KEY (`cardinputid`)"
1365") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1366"CREATE TABLE `channel` ("
1367" `chanid` int unsigned NOT NULL DEFAULT '0',"
1368" `channum` varchar(10) NOT NULL DEFAULT '',"
1369" `freqid` varchar(10) DEFAULT NULL,"
1370" `sourceid` int unsigned DEFAULT NULL,"
1371" `callsign` varchar(20) NOT NULL DEFAULT '',"
1372" `name` varchar(64) NOT NULL DEFAULT '',"
1373" `icon` varchar(255) NOT NULL DEFAULT '',"
1374" `finetune` int DEFAULT NULL,"
1375" `videofilters` varchar(255) NOT NULL DEFAULT '',"
1376" `xmltvid` varchar(255) NOT NULL DEFAULT '',"
1377" `recpriority` int NOT NULL DEFAULT '0',"
1378" `contrast` int DEFAULT '32768',"
1379" `brightness` int DEFAULT '32768',"
1380" `colour` int DEFAULT '32768',"
1381" `hue` int DEFAULT '32768',"
1382" `tvformat` varchar(10) NOT NULL DEFAULT 'Default',"
1383" `visible` tinyint(1) NOT NULL DEFAULT '1',"
1384" `outputfilters` varchar(255) NOT NULL DEFAULT '',"
1385" `useonairguide` tinyint(1) DEFAULT '0',"
1386" `mplexid` smallint DEFAULT NULL,"
1387" `serviceid` mediumint unsigned DEFAULT NULL,"
1388" `service_type` int unsigned DEFAULT '0',"
1389" `tmoffset` int NOT NULL DEFAULT '0',"
1390" `atsc_major_chan` int unsigned NOT NULL DEFAULT '0',"
1391" `atsc_minor_chan` int unsigned NOT NULL DEFAULT '0',"
1392" `last_record` datetime NOT NULL,"
1393" `default_authority` varchar(32) NOT NULL DEFAULT '',"
1394" `commmethod` int NOT NULL DEFAULT '-1',"
1395" `iptvid` smallint unsigned DEFAULT NULL,"
1396" `deleted` timestamp NULL DEFAULT NULL,"
1397" PRIMARY KEY (`chanid`),"
1398" KEY `channel_src` (`channum`,`sourceid`),"
1399" KEY `sourceid` (`sourceid`,`xmltvid`,`chanid`),"
1400" KEY `visible` (`visible`)"
1401") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1402"CREATE TABLE `channelgroup` ("
1403" `id` int unsigned NOT NULL AUTO_INCREMENT,"
1404" `chanid` int unsigned NOT NULL DEFAULT '0',"
1405" `grpid` int NOT NULL DEFAULT '1',"
1406" PRIMARY KEY (`id`),"
1407" KEY `chanid` (`chanid`)"
1408") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1409"CREATE TABLE `channelgroupnames` ("
1410" `grpid` int unsigned NOT NULL AUTO_INCREMENT,"
1411" `name` varchar(64) NOT NULL DEFAULT '0',"
1412" PRIMARY KEY (`grpid`)"
1413") ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;",
1414"CREATE TABLE `channelscan` ("
1415" `scanid` int unsigned NOT NULL AUTO_INCREMENT,"
1416" `cardid` int unsigned NOT NULL,"
1417" `sourceid` int unsigned NOT NULL,"
1418" `processed` tinyint unsigned NOT NULL,"
1419" `scandate` datetime NOT NULL,"
1420" PRIMARY KEY (`scanid`)"
1421") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1422"CREATE TABLE `channelscan_channel` ("
1423" `transportid` int unsigned NOT NULL,"
1424" `scanid` int unsigned NOT NULL,"
1425" `mplex_id` smallint NOT NULL,"
1426" `source_id` int unsigned NOT NULL,"
1427" `channel_id` int unsigned NOT NULL DEFAULT '0',"
1428" `callsign` varchar(20) NOT NULL DEFAULT '',"
1429" `service_name` varchar(64) NOT NULL DEFAULT '',"
1430" `chan_num` varchar(10) NOT NULL DEFAULT '',"
1431" `service_id` mediumint unsigned NOT NULL DEFAULT '0',"
1432" `atsc_major_channel` int unsigned NOT NULL DEFAULT '0',"
1433" `atsc_minor_channel` int unsigned NOT NULL DEFAULT '0',"
1434" `use_on_air_guide` tinyint(1) NOT NULL DEFAULT '0',"
1435" `hidden` tinyint(1) NOT NULL DEFAULT '0',"
1436" `hidden_in_guide` tinyint(1) NOT NULL DEFAULT '0',"
1437" `freqid` varchar(10) NOT NULL DEFAULT '',"
1438" `icon` varchar(255) NOT NULL DEFAULT '',"
1439" `tvformat` varchar(10) NOT NULL DEFAULT 'Default',"
1440" `xmltvid` varchar(64) NOT NULL DEFAULT '',"
1441" `pat_tsid` int unsigned NOT NULL DEFAULT '0',"
1442" `vct_tsid` int unsigned NOT NULL DEFAULT '0',"
1443" `vct_chan_tsid` int unsigned NOT NULL DEFAULT '0',"
1444" `sdt_tsid` int unsigned NOT NULL DEFAULT '0',"
1445" `orig_netid` int unsigned NOT NULL DEFAULT '0',"
1446" `netid` int unsigned NOT NULL DEFAULT '0',"
1447" `si_standard` varchar(10) NOT NULL,"
1448" `in_channels_conf` tinyint unsigned NOT NULL DEFAULT '0',"
1449" `in_pat` tinyint unsigned NOT NULL DEFAULT '0',"
1450" `in_pmt` tinyint unsigned NOT NULL DEFAULT '0',"
1451" `in_vct` tinyint unsigned NOT NULL DEFAULT '0',"
1452" `in_nit` tinyint unsigned NOT NULL DEFAULT '0',"
1453" `in_sdt` tinyint unsigned NOT NULL DEFAULT '0',"
1454" `is_encrypted` tinyint unsigned NOT NULL DEFAULT '0',"
1455" `is_data_service` tinyint unsigned NOT NULL DEFAULT '0',"
1456" `is_audio_service` tinyint unsigned NOT NULL DEFAULT '0',"
1457" `is_opencable` tinyint unsigned NOT NULL DEFAULT '0',"
1458" `could_be_opencable` tinyint unsigned NOT NULL DEFAULT '0',"
1459" `decryption_status` smallint unsigned NOT NULL DEFAULT '0',"
1460" `default_authority` varchar(32) NOT NULL DEFAULT '',"
1461" `service_type` int unsigned NOT NULL DEFAULT '0',"
1462" `logical_channel` int unsigned NOT NULL DEFAULT '0',"
1463" `simulcast_channel` int unsigned NOT NULL DEFAULT '0'"
1464") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1465"CREATE TABLE `channelscan_dtv_multiplex` ("
1466" `transportid` int unsigned NOT NULL AUTO_INCREMENT,"
1467" `scanid` int unsigned NOT NULL,"
1468" `mplexid` smallint unsigned NOT NULL,"
1469" `frequency` bigint unsigned NOT NULL,"
1470" `inversion` char(1) NOT NULL DEFAULT 'a',"
1471" `symbolrate` bigint unsigned NOT NULL DEFAULT '0',"
1472" `fec` varchar(10) NOT NULL DEFAULT 'auto',"
1473" `polarity` char(1) NOT NULL DEFAULT '',"
1474" `hp_code_rate` varchar(10) NOT NULL DEFAULT 'auto',"
1475" `mod_sys` varchar(10) DEFAULT NULL,"
1476" `rolloff` varchar(4) DEFAULT NULL,"
1477" `lp_code_rate` varchar(10) NOT NULL DEFAULT 'auto',"
1478" `modulation` varchar(10) NOT NULL DEFAULT 'auto',"
1479" `transmission_mode` char(1) NOT NULL DEFAULT 'a',"
1480" `guard_interval` varchar(10) NOT NULL DEFAULT 'auto',"
1481" `hierarchy` varchar(10) NOT NULL DEFAULT 'auto',"
1482" `bandwidth` char(1) NOT NULL DEFAULT 'a',"
1483" `sistandard` varchar(10) NOT NULL,"
1484" `tuner_type` smallint unsigned NOT NULL,"
1485" `default_authority` varchar(32) NOT NULL DEFAULT '',"
1486" `signal_strength` int NOT NULL DEFAULT '0',"
1487" PRIMARY KEY (`transportid`)"
1488") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1489"CREATE TABLE `codecparams` ("
1490" `profile` int unsigned NOT NULL DEFAULT '0',"
1491" `name` varchar(128) NOT NULL DEFAULT '',"
1492" `value` varchar(128) DEFAULT NULL,"
1493" PRIMARY KEY (`profile`,`name`)"
1494") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1495"CREATE TABLE `credits` ("
1496" `person` mediumint unsigned NOT NULL DEFAULT '0',"
1497" `chanid` int unsigned NOT NULL DEFAULT '0',"
1498" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1499" `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') NOT NULL DEFAULT '',"
1500" `priority` tinyint unsigned DEFAULT '0',"
1501" `roleid` mediumint unsigned DEFAULT '0',"
1502" UNIQUE KEY `chanid` (`chanid`,`starttime`,`person`,`role`,`roleid`),"
1503" KEY `person` (`person`,`role`)"
1504") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1505"CREATE TABLE `customexample` ("
1506" `rulename` varchar(64) NOT NULL,"
1507" `fromclause` varchar(10000) NOT NULL DEFAULT '',"
1508" `whereclause` varchar(10000) NOT NULL DEFAULT '',"
1509" `search` tinyint NOT NULL DEFAULT '0',"
1510" PRIMARY KEY (`rulename`)"
1511") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1512"CREATE TABLE `diseqc_config` ("
1513" `cardinputid` int unsigned NOT NULL,"
1514" `diseqcid` int unsigned NOT NULL,"
1515" `value` varchar(16) NOT NULL DEFAULT '',"
1516" KEY `id` (`cardinputid`)"
1517") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1518"CREATE TABLE `diseqc_tree` ("
1519" `diseqcid` int unsigned NOT NULL AUTO_INCREMENT,"
1520" `parentid` int unsigned DEFAULT NULL,"
1521" `ordinal` tinyint unsigned NOT NULL,"
1522" `type` varchar(16) NOT NULL DEFAULT '',"
1523" `subtype` varchar(16) NOT NULL DEFAULT '',"
1524" `description` varchar(32) NOT NULL DEFAULT '',"
1525" `switch_ports` tinyint unsigned NOT NULL DEFAULT '0',"
1526" `rotor_hi_speed` float NOT NULL DEFAULT '0',"
1527" `rotor_lo_speed` float NOT NULL DEFAULT '0',"
1528" `rotor_positions` varchar(255) NOT NULL DEFAULT '',"
1529" `lnb_lof_switch` int NOT NULL DEFAULT '0',"
1530" `lnb_lof_hi` int NOT NULL DEFAULT '0',"
1531" `lnb_lof_lo` int NOT NULL DEFAULT '0',"
1532" `cmd_repeat` int NOT NULL DEFAULT '1',"
1533" `lnb_pol_inv` tinyint NOT NULL DEFAULT '0',"
1534" `address` tinyint unsigned NOT NULL DEFAULT '0',"
1535" `scr_userband` int unsigned NOT NULL DEFAULT '0',"
1536" `scr_frequency` int unsigned NOT NULL DEFAULT '1400',"
1537" `scr_pin` int NOT NULL DEFAULT '-1',"
1538" PRIMARY KEY (`diseqcid`),"
1539" KEY `parentid` (`parentid`)"
1540") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1541"CREATE TABLE `displayprofilegroups` ("
1542" `name` varchar(128) NOT NULL,"
1543" `hostname` varchar(64) NOT NULL,"
1544" `profilegroupid` int unsigned NOT NULL AUTO_INCREMENT,"
1545" PRIMARY KEY (`name`,`hostname`),"
1546" UNIQUE KEY `profilegroupid` (`profilegroupid`)"
1547") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1548"CREATE TABLE `displayprofiles` ("
1549" `profilegroupid` int unsigned NOT NULL,"
1550" `profileid` int unsigned NOT NULL AUTO_INCREMENT,"
1551" `value` varchar(128) NOT NULL,"
1552" `data` varchar(255) NOT NULL DEFAULT '',"
1553" KEY `profilegroupid` (`profilegroupid`),"
1554" KEY `profileid` (`profileid`,`value`),"
1555" KEY `profileid_2` (`profileid`)"
1556") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1557"CREATE TABLE `dtv_multiplex` ("
1558" `mplexid` smallint NOT NULL AUTO_INCREMENT,"
1559" `sourceid` smallint DEFAULT NULL,"
1560" `transportid` int DEFAULT NULL,"
1561" `networkid` int DEFAULT NULL,"
1562" `frequency` int DEFAULT NULL,"
1563" `inversion` char(1) DEFAULT 'a',"
1564" `symbolrate` int DEFAULT NULL,"
1565" `fec` varchar(10) DEFAULT 'auto',"
1566" `polarity` char(1) DEFAULT NULL,"
1567" `modulation` varchar(10) DEFAULT 'auto',"
1568" `bandwidth` char(1) DEFAULT 'a',"
1569" `lp_code_rate` varchar(10) DEFAULT 'auto',"
1570" `transmission_mode` char(1) DEFAULT 'a',"
1571" `guard_interval` varchar(10) DEFAULT 'auto',"
1572" `visible` smallint NOT NULL DEFAULT '0',"
1573" `constellation` varchar(10) DEFAULT 'auto',"
1574" `hierarchy` varchar(10) DEFAULT 'auto',"
1575" `hp_code_rate` varchar(10) DEFAULT 'auto',"
1576" `mod_sys` varchar(10) DEFAULT NULL,"
1577" `rolloff` varchar(4) DEFAULT NULL,"
1578" `sistandard` varchar(10) DEFAULT 'dvb',"
1579" `serviceversion` smallint DEFAULT '33',"
1580" `updatetimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,"
1581" `default_authority` varchar(32) NOT NULL DEFAULT '',"
1582" PRIMARY KEY (`mplexid`)"
1583") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1584"CREATE TABLE `dtv_privatetypes` ("
1585" `sitype` varchar(4) NOT NULL DEFAULT '',"
1586" `networkid` int NOT NULL DEFAULT '0',"
1587" `private_type` varchar(20) NOT NULL DEFAULT '',"
1588" `private_value` varchar(100) NOT NULL DEFAULT ''"
1589") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1590"CREATE TABLE `dvdbookmark` ("
1591" `serialid` varchar(16) NOT NULL DEFAULT '',"
1592" `name` varchar(32) DEFAULT NULL,"
1593" `title` smallint NOT NULL DEFAULT '0',"
1594" `audionum` tinyint NOT NULL DEFAULT '-1',"
1595" `subtitlenum` tinyint NOT NULL DEFAULT '-1',"
1596" `framenum` bigint NOT NULL DEFAULT '0',"
1597" `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,"
1598" `dvdstate` varchar(1024) NOT NULL DEFAULT '',"
1599" PRIMARY KEY (`serialid`)"
1600") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1601"CREATE TABLE `dvdinput` ("
1602" `intid` int unsigned NOT NULL,"
1603" `hsize` int unsigned DEFAULT NULL,"
1604" `vsize` int unsigned DEFAULT NULL,"
1605" `ar_num` int unsigned DEFAULT NULL,"
1606" `ar_denom` int unsigned DEFAULT NULL,"
1607" `fr_code` int unsigned DEFAULT NULL,"
1608" `letterbox` tinyint(1) DEFAULT NULL,"
1609" `v_format` varchar(16) DEFAULT NULL,"
1610" PRIMARY KEY (`intid`)"
1611") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1612"CREATE TABLE `dvdtranscode` ("
1613" `intid` int NOT NULL AUTO_INCREMENT,"
1614" `input` int unsigned DEFAULT NULL,"
1615" `name` varchar(128) NOT NULL,"
1616" `sync_mode` int unsigned DEFAULT NULL,"
1617" `use_yv12` tinyint(1) DEFAULT NULL,"
1618" `cliptop` int DEFAULT NULL,"
1619" `clipbottom` int DEFAULT NULL,"
1620" `clipleft` int DEFAULT NULL,"
1621" `clipright` int DEFAULT NULL,"
1622" `f_resize_h` int DEFAULT NULL,"
1623" `f_resize_w` int DEFAULT NULL,"
1624" `hq_resize_h` int DEFAULT NULL,"
1625" `hq_resize_w` int DEFAULT NULL,"
1626" `grow_h` int DEFAULT NULL,"
1627" `grow_w` int DEFAULT NULL,"
1628" `clip2top` int DEFAULT NULL,"
1629" `clip2bottom` int DEFAULT NULL,"
1630" `clip2left` int DEFAULT NULL,"
1631" `clip2right` int DEFAULT NULL,"
1632" `codec` varchar(128) NOT NULL,"
1633" `codec_param` varchar(128) DEFAULT NULL,"
1634" `bitrate` int DEFAULT NULL,"
1635" `a_sample_r` int DEFAULT NULL,"
1636" `a_bitrate` int DEFAULT NULL,"
1637" `two_pass` tinyint(1) DEFAULT NULL,"
1638" `tc_param` varchar(128) DEFAULT NULL,"
1639" PRIMARY KEY (`intid`)"
1640") ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;",
1641"CREATE TABLE `eit_cache` ("
1642" `chanid` int NOT NULL,"
1643" `eventid` int unsigned NOT NULL DEFAULT '0',"
1644" `tableid` tinyint unsigned NOT NULL,"
1645" `version` tinyint unsigned NOT NULL,"
1646" `endtime` int unsigned NOT NULL,"
1647" `status` tinyint NOT NULL DEFAULT '0',"
1648" PRIMARY KEY (`chanid`,`eventid`,`status`)"
1649") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1650"CREATE TABLE `filemarkup` ("
1651" `filename` text NOT NULL,"
1652" `mark` mediumint unsigned NOT NULL DEFAULT '0',"
1653" `offset` bigint unsigned DEFAULT NULL,"
1654" `type` tinyint NOT NULL DEFAULT '0',"
1655" KEY `filename` (`filename`(255)),"
1656" KEY `type` (`type`)"
1657") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1658"CREATE TABLE `gallery_directories` ("
1659" `dir_id` int NOT NULL AUTO_INCREMENT,"
1660" `filename` varchar(255) NOT NULL,"
1661" `name` varchar(255) NOT NULL,"
1662" `path` varchar(255) NOT NULL,"
1663" `parent_id` int NOT NULL,"
1664" `dir_count` int NOT NULL DEFAULT '0',"
1665" `file_count` int NOT NULL DEFAULT '0',"
1666" `hidden` tinyint(1) NOT NULL DEFAULT '0',"
1667" PRIMARY KEY (`dir_id`)"
1668") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1669"CREATE TABLE `gallery_files` ("
1670" `file_id` int NOT NULL AUTO_INCREMENT,"
1671" `filename` varchar(255) NOT NULL,"
1672" `name` varchar(255) NOT NULL,"
1673" `path` varchar(255) NOT NULL,"
1674" `dir_id` int NOT NULL DEFAULT '0',"
1675" `type` int NOT NULL DEFAULT '0',"
1676" `modtime` int NOT NULL DEFAULT '0',"
1677" `size` int NOT NULL DEFAULT '0',"
1678" `extension` varchar(255) NOT NULL,"
1679" `angle` int NOT NULL DEFAULT '0',"
1680" `date` int NOT NULL DEFAULT '0',"
1681" `zoom` int NOT NULL DEFAULT '0',"
1682" `hidden` tinyint(1) NOT NULL DEFAULT '0',"
1683" `orientation` int NOT NULL DEFAULT '0',"
1684" PRIMARY KEY (`file_id`),"
1685" KEY `dir_id` (`dir_id`)"
1686") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1687"CREATE TABLE `housekeeping` ("
1688" `tag` varchar(64) NOT NULL,"
1689" `hostname` varchar(64) DEFAULT NULL,"
1690" `lastrun` datetime DEFAULT NULL,"
1691" `lastsuccess` datetime DEFAULT NULL,"
1692" UNIQUE KEY `task` (`tag`,`hostname`)"
1693") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1694"CREATE TABLE `inputgroup` ("
1695" `cardinputid` int unsigned NOT NULL,"
1696" `inputgroupid` int unsigned NOT NULL,"
1697" `inputgroupname` varchar(128) DEFAULT NULL"
1698") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1699"CREATE TABLE `internetcontent` ("
1700" `name` varchar(255) NOT NULL,"
1701" `thumbnail` varchar(255) DEFAULT NULL,"
1702" `type` smallint NOT NULL,"
1703" `author` varchar(128) NOT NULL,"
1704" `description` text NOT NULL,"
1705" `commandline` text NOT NULL,"
1706" `version` double NOT NULL,"
1707" `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1708" `search` tinyint(1) NOT NULL,"
1709" `tree` tinyint(1) NOT NULL,"
1710" `podcast` tinyint(1) NOT NULL,"
1711" `download` tinyint(1) NOT NULL,"
1712" `host` varchar(128) DEFAULT NULL"
1713") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1714"CREATE TABLE `internetcontentarticles` ("
1715" `feedtitle` varchar(255) NOT NULL,"
1716" `path` text NOT NULL,"
1717" `paththumb` text NOT NULL,"
1718" `title` varchar(255) NOT NULL,"
1719" `subtitle` varchar(255) NOT NULL,"
1720" `season` smallint NOT NULL DEFAULT '0',"
1721" `episode` smallint NOT NULL DEFAULT '0',"
1722" `description` text NOT NULL,"
1723" `url` text NOT NULL,"
1724" `type` smallint NOT NULL,"
1725" `thumbnail` text NOT NULL,"
1726" `mediaURL` text NOT NULL,"
1727" `author` varchar(255) NOT NULL,"
1728" `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1729" `time` int NOT NULL,"
1730" `rating` varchar(255) NOT NULL,"
1731" `filesize` bigint NOT NULL,"
1732" `player` varchar(255) NOT NULL,"
1733" `playerargs` text NOT NULL,"
1734" `download` varchar(255) NOT NULL,"
1735" `downloadargs` text NOT NULL,"
1736" `width` smallint NOT NULL,"
1737" `height` smallint NOT NULL,"
1738" `language` varchar(128) NOT NULL,"
1739" `podcast` tinyint(1) NOT NULL,"
1740" `downloadable` tinyint(1) NOT NULL,"
1741" `customhtml` tinyint(1) NOT NULL,"
1742" `countries` varchar(255) NOT NULL"
1743") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1744"CREATE TABLE `inuseprograms` ("
1745" `chanid` int unsigned NOT NULL DEFAULT '0',"
1746" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1747" `recusage` varchar(128) NOT NULL DEFAULT '',"
1748" `lastupdatetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1749" `hostname` varchar(64) NOT NULL DEFAULT '',"
1750" `rechost` varchar(64) NOT NULL,"
1751" `recdir` varchar(255) NOT NULL DEFAULT '',"
1752" KEY `chanid` (`chanid`,`starttime`),"
1753" KEY `recusage` (`recusage`,`lastupdatetime`)"
1754") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1755"CREATE TABLE `iptv_channel` ("
1756" `iptvid` smallint unsigned NOT NULL AUTO_INCREMENT,"
1757" `chanid` int unsigned NOT NULL,"
1758" `url` text NOT NULL,"
1759" `type` set('data','rfc2733-1','rfc2733-2','rfc5109-1','rfc5109-2','smpte2022-1','smpte2022-2') DEFAULT NULL,"
1760" `bitrate` int unsigned NOT NULL,"
1761" PRIMARY KEY (`iptvid`),"
1762" KEY `chanid` (`chanid`)"
1763") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1764"CREATE TABLE `jobqueue` ("
1765" `id` int NOT NULL AUTO_INCREMENT,"
1766" `chanid` int NOT NULL DEFAULT '0',"
1767" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1768" `inserttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1769" `type` int NOT NULL DEFAULT '0',"
1770" `cmds` int NOT NULL DEFAULT '0',"
1771" `flags` int NOT NULL DEFAULT '0',"
1772" `status` int NOT NULL DEFAULT '0',"
1773" `statustime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,"
1774" `hostname` varchar(64) NOT NULL DEFAULT '',"
1775" `args` blob NOT NULL,"
1776" `comment` varchar(128) NOT NULL DEFAULT '',"
1777" `schedruntime` datetime NOT NULL DEFAULT '2007-01-01 00:00:00',"
1778" PRIMARY KEY (`id`),"
1779" UNIQUE KEY `chanid` (`chanid`,`starttime`,`type`,`inserttime`)"
1780") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1781"CREATE TABLE `jumppoints` ("
1782" `destination` varchar(128) NOT NULL DEFAULT '',"
1783" `description` varchar(255) DEFAULT NULL,"
1784" `keylist` varchar(128) DEFAULT NULL,"
1785" `hostname` varchar(64) NOT NULL DEFAULT '',"
1786" PRIMARY KEY (`destination`,`hostname`)"
1787") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1788"CREATE TABLE `keybindings` ("
1789" `context` varchar(32) NOT NULL DEFAULT '',"
1790" `action` varchar(32) NOT NULL DEFAULT '',"
1791" `description` varchar(255) DEFAULT NULL,"
1792" `keylist` varchar(128) DEFAULT NULL,"
1793" `hostname` varchar(64) NOT NULL DEFAULT '',"
1794" PRIMARY KEY (`context`,`action`,`hostname`)"
1795") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1796"CREATE TABLE `keyword` ("
1797" `phrase` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',"
1798" `searchtype` int unsigned NOT NULL DEFAULT '3',"
1799" UNIQUE KEY `phrase` (`phrase`,`searchtype`)"
1800") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1801"CREATE TABLE `livestream` ("
1802" `id` int unsigned NOT NULL AUTO_INCREMENT,"
1803" `width` int unsigned NOT NULL,"
1804" `height` int unsigned NOT NULL,"
1805" `bitrate` int unsigned NOT NULL,"
1806" `audiobitrate` int unsigned NOT NULL,"
1807" `samplerate` int unsigned NOT NULL,"
1808" `audioonlybitrate` int unsigned NOT NULL,"
1809" `segmentsize` int unsigned NOT NULL DEFAULT '10',"
1810" `maxsegments` int unsigned NOT NULL DEFAULT '0',"
1811" `startsegment` int unsigned NOT NULL DEFAULT '0',"
1812" `currentsegment` int unsigned NOT NULL DEFAULT '0',"
1813" `segmentcount` int unsigned NOT NULL DEFAULT '0',"
1814" `percentcomplete` int unsigned NOT NULL DEFAULT '0',"
1815" `created` datetime NOT NULL,"
1816" `lastmodified` datetime NOT NULL,"
1817" `relativeurl` varchar(512) NOT NULL,"
1818" `fullurl` varchar(1024) NOT NULL,"
1819" `status` int unsigned NOT NULL DEFAULT '0',"
1820" `statusmessage` varchar(256) NOT NULL,"
1821" `sourcefile` varchar(512) NOT NULL,"
1822" `sourcehost` varchar(64) NOT NULL,"
1823" `sourcewidth` int unsigned NOT NULL DEFAULT '0',"
1824" `sourceheight` int unsigned NOT NULL DEFAULT '0',"
1825" `outdir` varchar(256) NOT NULL,"
1826" `outbase` varchar(128) NOT NULL,"
1827" PRIMARY KEY (`id`)"
1828") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1829"CREATE TABLE `mythlog` ("
1830" `logid` int unsigned NOT NULL AUTO_INCREMENT,"
1831" `module` varchar(32) NOT NULL DEFAULT '',"
1832" `priority` int NOT NULL DEFAULT '0',"
1833" `acknowledged` tinyint(1) DEFAULT '0',"
1834" `logdate` datetime DEFAULT NULL,"
1835" `host` varchar(128) DEFAULT NULL,"
1836" `message` varchar(255) NOT NULL DEFAULT '',"
1837" `details` varchar(16000) NOT NULL DEFAULT '',"
1838" PRIMARY KEY (`logid`),"
1839" KEY `module` (`module`)"
1840") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1841"CREATE TABLE `oldfind` ("
1842" `recordid` int NOT NULL DEFAULT '0',"
1843" `findid` int NOT NULL DEFAULT '0',"
1844" PRIMARY KEY (`recordid`,`findid`)"
1845") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1846"CREATE TABLE `oldprogram` ("
1847" `oldtitle` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',"
1848" `airdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1849" PRIMARY KEY (`oldtitle`)"
1850") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1851"CREATE TABLE `oldrecorded` ("
1852" `chanid` int unsigned NOT NULL DEFAULT '0',"
1853" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1854" `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1855" `title` varchar(128) NOT NULL DEFAULT '',"
1856" `subtitle` varchar(128) NOT NULL DEFAULT '',"
1857" `description` varchar(16000) NOT NULL DEFAULT '',"
1858" `season` smallint NOT NULL,"
1859" `episode` smallint NOT NULL,"
1860" `category` varchar(64) NOT NULL DEFAULT '',"
1861" `seriesid` varchar(64) DEFAULT NULL,"
1862" `programid` varchar(64) DEFAULT NULL,"
1863" `inetref` varchar(40) NOT NULL,"
1864" `findid` int NOT NULL DEFAULT '0',"
1865" `recordid` int NOT NULL DEFAULT '0',"
1866" `station` varchar(20) NOT NULL DEFAULT '',"
1867" `rectype` int unsigned NOT NULL DEFAULT '0',"
1868" `duplicate` tinyint(1) NOT NULL DEFAULT '0',"
1869" `recstatus` int NOT NULL DEFAULT '0',"
1870" `reactivate` smallint NOT NULL DEFAULT '0',"
1871" `generic` tinyint(1) NOT NULL,"
1872" `future` tinyint(1) NOT NULL DEFAULT '0',"
1873" PRIMARY KEY (`station`,`starttime`,`title`),"
1874" KEY `endtime` (`endtime`),"
1875" KEY `title` (`title`),"
1876" KEY `seriesid` (`seriesid`),"
1877" KEY `programid` (`programid`),"
1878" KEY `recordid` (`recordid`),"
1879" KEY `recstatus` (`recstatus`,`programid`,`seriesid`),"
1880" KEY `recstatus_2` (`recstatus`,`title`,`subtitle`),"
1881" KEY `future` (`future`),"
1882" KEY `chanid` (`chanid`,`starttime`),"
1883" KEY `subtitle` (`subtitle`),"
1884" KEY `description` (`description`(255))"
1885") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1886"CREATE TABLE `people` ("
1887" `person` mediumint unsigned NOT NULL AUTO_INCREMENT,"
1888" `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',"
1889" PRIMARY KEY (`person`),"
1890" UNIQUE KEY `name` (`name`(41))"
1891") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1892"CREATE TABLE `pidcache` ("
1893" `chanid` smallint NOT NULL DEFAULT '0',"
1894" `pid` int NOT NULL DEFAULT '-1',"
1895" `tableid` int NOT NULL DEFAULT '-1',"
1896" KEY `chanid` (`chanid`)"
1897") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1898"CREATE TABLE `playgroup` ("
1899" `name` varchar(32) NOT NULL DEFAULT '',"
1900" `titlematch` varchar(255) NOT NULL DEFAULT '',"
1901" `skipahead` int NOT NULL DEFAULT '0',"
1902" `skipback` int NOT NULL DEFAULT '0',"
1903" `timestretch` int NOT NULL DEFAULT '0',"
1904" `jump` int NOT NULL DEFAULT '0',"
1905" PRIMARY KEY (`name`)"
1906") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1907"CREATE TABLE `powerpriority` ("
1908" `priorityname` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,"
1909" `recpriority` int NOT NULL DEFAULT '0',"
1910" `selectclause` varchar(16000) NOT NULL DEFAULT '',"
1911" PRIMARY KEY (`priorityname`)"
1912") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1913"CREATE TABLE `profilegroups` ("
1914" `id` int unsigned NOT NULL AUTO_INCREMENT,"
1915" `name` varchar(128) DEFAULT NULL,"
1916" `cardtype` varchar(32) NOT NULL DEFAULT 'V4L',"
1917" `is_default` int DEFAULT '0',"
1918" `hostname` varchar(64) DEFAULT NULL,"
1919" PRIMARY KEY (`id`),"
1920" UNIQUE KEY `name` (`name`,`hostname`),"
1921" KEY `cardtype` (`cardtype`)"
1922") ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;",
1923"CREATE TABLE `program` ("
1924" `chanid` int unsigned NOT NULL DEFAULT '0',"
1925" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1926" `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1927" `title` varchar(128) NOT NULL DEFAULT '',"
1928" `subtitle` varchar(128) NOT NULL DEFAULT '',"
1929" `description` varchar(16000) NOT NULL DEFAULT '',"
1930" `category` varchar(64) NOT NULL DEFAULT '',"
1931" `category_type` varchar(64) NOT NULL DEFAULT '',"
1932" `airdate` year NOT NULL DEFAULT '0000',"
1933" `stars` float NOT NULL DEFAULT '0',"
1934" `previouslyshown` tinyint NOT NULL DEFAULT '0',"
1935" `title_pronounce` varchar(128) NOT NULL DEFAULT '',"
1936" `stereo` tinyint(1) NOT NULL DEFAULT '0',"
1937" `subtitled` tinyint(1) NOT NULL DEFAULT '0',"
1938" `hdtv` tinyint(1) NOT NULL DEFAULT '0',"
1939" `closecaptioned` tinyint(1) NOT NULL DEFAULT '0',"
1940" `partnumber` int NOT NULL DEFAULT '0',"
1941" `parttotal` int NOT NULL DEFAULT '0',"
1942" `seriesid` varchar(64) NOT NULL DEFAULT '',"
1943" `originalairdate` date DEFAULT NULL,"
1944" `showtype` varchar(30) NOT NULL DEFAULT '',"
1945" `colorcode` varchar(20) NOT NULL DEFAULT '',"
1946" `syndicatedepisodenumber` varchar(20) NOT NULL DEFAULT '',"
1947" `programid` varchar(64) NOT NULL DEFAULT '',"
1948" `manualid` int unsigned NOT NULL DEFAULT '0',"
1949" `generic` tinyint(1) DEFAULT '0',"
1950" `listingsource` int NOT NULL DEFAULT '0',"
1951" `first` tinyint(1) NOT NULL DEFAULT '0',"
1952" `last` tinyint(1) NOT NULL DEFAULT '0',"
1953" `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') NOT NULL,"
1954" `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') NOT NULL,"
1955" `videoprop` set('WIDESCREEN','HDTV','MPEG2','AVC','HEVC') NOT NULL,"
1956" `inetref` varchar(40) DEFAULT '',"
1957" `season` int NOT NULL DEFAULT '0',"
1958" `episode` int NOT NULL DEFAULT '0',"
1959" `totalepisodes` int NOT NULL DEFAULT '0',"
1960" PRIMARY KEY (`chanid`,`starttime`,`manualid`),"
1961" KEY `endtime` (`endtime`),"
1962" KEY `title_pronounce` (`title_pronounce`),"
1963" KEY `seriesid` (`seriesid`),"
1964" KEY `id_start_end` (`chanid`,`starttime`,`endtime`),"
1965" KEY `program_manualid` (`manualid`),"
1966" KEY `previouslyshown` (`previouslyshown`),"
1967" KEY `programid` (`programid`,`starttime`),"
1968" KEY `starttime` (`starttime`),"
1969" KEY `subtitle` (`subtitle`),"
1970" KEY `description` (`description`(255)),"
1971" KEY `title_subtitle_start` (`title`,`subtitle`,`starttime`)"
1972") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1973"CREATE TABLE `programgenres` ("
1974" `chanid` int unsigned NOT NULL DEFAULT '0',"
1975" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1976" `relevance` char(1) NOT NULL DEFAULT '',"
1977" `genre` varchar(30) DEFAULT NULL,"
1978" PRIMARY KEY (`chanid`,`starttime`,`relevance`),"
1979" KEY `genre` (`genre`)"
1980") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1981"CREATE TABLE `programrating` ("
1982" `chanid` int unsigned NOT NULL DEFAULT '0',"
1983" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
1984" `system` varchar(128) DEFAULT NULL,"
1985" `rating` varchar(128) DEFAULT NULL,"
1986" UNIQUE KEY `chanid` (`chanid`,`starttime`,`system`,`rating`),"
1987" KEY `starttime` (`starttime`,`system`)"
1988") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1989"CREATE TABLE `recgrouppassword` ("
1990" `recgroup` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',"
1991" `password` varchar(10) NOT NULL DEFAULT '',"
1992" PRIMARY KEY (`recgroup`)"
1993") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
1994"CREATE TABLE `recgroups` ("
1995" `recgroupid` smallint NOT NULL AUTO_INCREMENT,"
1996" `recgroup` varchar(64) NOT NULL DEFAULT '',"
1997" `displayname` varchar(64) NOT NULL DEFAULT '',"
1998" `password` varchar(40) NOT NULL DEFAULT '',"
1999" `special` tinyint(1) NOT NULL DEFAULT '0',"
2000" PRIMARY KEY (`recgroupid`),"
2001" UNIQUE KEY `recgroup` (`recgroup`)"
2002") ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;",
2003"CREATE TABLE `record` ("
2004" `recordid` int unsigned NOT NULL AUTO_INCREMENT,"
2005" `type` int unsigned NOT NULL DEFAULT '0',"
2006" `chanid` int unsigned DEFAULT NULL,"
2007" `starttime` time DEFAULT NULL,"
2008" `startdate` date DEFAULT NULL,"
2009" `endtime` time DEFAULT NULL,"
2010" `enddate` date DEFAULT NULL,"
2011" `title` varchar(128) NOT NULL DEFAULT '',"
2012" `subtitle` varchar(128) NOT NULL DEFAULT '',"
2013" `description` varchar(16000) NOT NULL DEFAULT '',"
2014" `season` smallint NOT NULL,"
2015" `episode` smallint NOT NULL,"
2016" `category` varchar(64) NOT NULL DEFAULT '',"
2017" `profile` varchar(128) NOT NULL DEFAULT 'Default',"
2018" `recpriority` int NOT NULL DEFAULT '0',"
2019" `autoexpire` int NOT NULL DEFAULT '0',"
2020" `maxepisodes` int NOT NULL DEFAULT '0',"
2021" `maxnewest` int NOT NULL DEFAULT '0',"
2022" `startoffset` int NOT NULL DEFAULT '0',"
2023" `endoffset` int NOT NULL DEFAULT '0',"
2024" `recgroup` varchar(32) NOT NULL DEFAULT 'Default',"
2025" `dupmethod` int NOT NULL DEFAULT '6',"
2026" `dupin` int NOT NULL DEFAULT '15',"
2027" `station` varchar(20) NOT NULL DEFAULT '',"
2028" `seriesid` varchar(64) DEFAULT NULL,"
2029" `programid` varchar(64) DEFAULT NULL,"
2030" `inetref` varchar(40) NOT NULL,"
2031" `search` int unsigned NOT NULL DEFAULT '0',"
2032" `autotranscode` tinyint(1) NOT NULL DEFAULT '0',"
2033" `autocommflag` tinyint(1) NOT NULL DEFAULT '0',"
2034" `autouserjob1` tinyint(1) NOT NULL DEFAULT '0',"
2035" `autouserjob2` tinyint(1) NOT NULL DEFAULT '0',"
2036" `autouserjob3` tinyint(1) NOT NULL DEFAULT '0',"
2037" `autouserjob4` tinyint(1) NOT NULL DEFAULT '0',"
2038" `autometadata` tinyint(1) NOT NULL DEFAULT '0',"
2039" `findday` tinyint NOT NULL DEFAULT '0',"
2040" `findtime` time NOT NULL DEFAULT '00:00:00',"
2041" `findid` int NOT NULL DEFAULT '0',"
2042" `inactive` tinyint(1) NOT NULL DEFAULT '0',"
2043" `parentid` int NOT NULL DEFAULT '0',"
2044" `transcoder` int NOT NULL DEFAULT '0',"
2045" `playgroup` varchar(32) NOT NULL DEFAULT 'Default',"
2046" `prefinput` int NOT NULL DEFAULT '0',"
2047" `next_record` datetime DEFAULT NULL,"
2048" `last_record` datetime DEFAULT NULL,"
2049" `last_delete` datetime DEFAULT NULL,"
2050" `storagegroup` varchar(32) NOT NULL DEFAULT 'Default',"
2051" `avg_delay` int NOT NULL DEFAULT '100',"
2052" `filter` int unsigned NOT NULL DEFAULT '0',"
2053" `recgroupid` smallint NOT NULL DEFAULT '1',"
2054" `autoextend` tinyint unsigned DEFAULT '0',"
2055" PRIMARY KEY (`recordid`),"
2056" UNIQUE KEY `chanid` (`chanid`,`starttime`,`startdate`,`title`,`type`),"
2057" KEY `title` (`title`),"
2058" KEY `seriesid` (`seriesid`),"
2059" KEY `programid` (`programid`),"
2060" KEY `maxepisodes` (`maxepisodes`),"
2061" KEY `search` (`search`),"
2062" KEY `type` (`type`),"
2063" KEY `recgroupid` (`recgroupid`)"
2064") ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;",
2065"CREATE TABLE `recorded` ("
2066" `chanid` int unsigned NOT NULL DEFAULT '0',"
2067" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2068" `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2069" `title` varchar(128) NOT NULL DEFAULT '',"
2070" `subtitle` varchar(128) NOT NULL DEFAULT '',"
2071" `description` varchar(16000) NOT NULL DEFAULT '',"
2072" `season` smallint NOT NULL,"
2073" `episode` smallint NOT NULL,"
2074" `category` varchar(64) NOT NULL DEFAULT '',"
2075" `hostname` varchar(64) NOT NULL DEFAULT '',"
2076" `bookmark` tinyint(1) NOT NULL DEFAULT '0',"
2077" `lastplay` tinyint unsigned DEFAULT '0',"
2078" `editing` int unsigned NOT NULL DEFAULT '0',"
2079" `cutlist` tinyint(1) NOT NULL DEFAULT '0',"
2080" `autoexpire` int NOT NULL DEFAULT '0',"
2081" `commflagged` int unsigned NOT NULL DEFAULT '0',"
2082" `recgroup` varchar(32) NOT NULL DEFAULT 'Default',"
2083" `recordid` int DEFAULT NULL,"
2084" `seriesid` varchar(64) DEFAULT NULL,"
2085" `programid` varchar(64) DEFAULT NULL,"
2086" `inetref` varchar(40) NOT NULL,"
2087" `lastmodified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,"
2088" `filesize` bigint NOT NULL DEFAULT '0',"
2089" `stars` float NOT NULL DEFAULT '0',"
2090" `previouslyshown` tinyint(1) DEFAULT '0',"
2091" `originalairdate` date DEFAULT NULL,"
2092" `preserve` tinyint(1) NOT NULL DEFAULT '0',"
2093" `findid` int NOT NULL DEFAULT '0',"
2094" `deletepending` tinyint(1) NOT NULL DEFAULT '0',"
2095" `transcoder` int NOT NULL DEFAULT '0',"
2096" `timestretch` float NOT NULL DEFAULT '1',"
2097" `recpriority` int NOT NULL DEFAULT '0',"
2098" `basename` varchar(255) NOT NULL,"
2099" `progstart` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2100" `progend` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2101" `playgroup` varchar(32) NOT NULL DEFAULT 'Default',"
2102" `profile` varchar(32) NOT NULL DEFAULT '',"
2103" `duplicate` tinyint(1) NOT NULL DEFAULT '0',"
2104" `transcoded` tinyint(1) NOT NULL DEFAULT '0',"
2105" `watched` tinyint NOT NULL DEFAULT '0',"
2106" `storagegroup` varchar(32) NOT NULL DEFAULT 'Default',"
2107" `bookmarkupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',"
2108" `recgroupid` smallint NOT NULL DEFAULT '1',"
2109" `recordedid` int unsigned NOT NULL AUTO_INCREMENT,"
2110" `inputname` varchar(32) DEFAULT NULL,"
2111" PRIMARY KEY (`recordedid`),"
2112" UNIQUE KEY `chanid` (`chanid`,`starttime`),"
2113" KEY `endtime` (`endtime`),"
2114" KEY `seriesid` (`seriesid`),"
2115" KEY `programid` (`programid`),"
2116" KEY `title` (`title`),"
2117" KEY `recordid` (`recordid`),"
2118" KEY `deletepending` (`deletepending`,`lastmodified`),"
2119" KEY `recgroup` (`recgroup`,`endtime`),"
2120" KEY `recgroupid` (`recgroupid`)"
2121") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2122"CREATE TABLE `recordedartwork` ("
2123" `inetref` varchar(255) NOT NULL,"
2124" `season` smallint NOT NULL,"
2125" `host` text NOT NULL,"
2126" `coverart` text NOT NULL,"
2127" `fanart` text NOT NULL,"
2128" `banner` text NOT NULL,"
2129" KEY `recordedartwork_ix1` (`inetref`)"
2130") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2131"CREATE TABLE `recordedcredits` ("
2132" `person` mediumint unsigned NOT NULL DEFAULT '0',"
2133" `chanid` int unsigned NOT NULL DEFAULT '0',"
2134" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2135" `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') NOT NULL DEFAULT '',"
2136" `priority` tinyint unsigned DEFAULT '0',"
2137" `roleid` mediumint unsigned DEFAULT '0',"
2138" UNIQUE KEY `chanid` (`chanid`,`starttime`,`person`,`role`,`roleid`),"
2139" KEY `person` (`person`,`role`)"
2140") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2141"CREATE TABLE `recordedfile` ("
2142" `basename` varchar(128) NOT NULL DEFAULT '',"
2143" `filesize` bigint NOT NULL DEFAULT '0',"
2144" `width` smallint unsigned NOT NULL DEFAULT '0',"
2145" `height` smallint unsigned NOT NULL DEFAULT '0',"
2146" `fps` float(6,3) NOT NULL DEFAULT '0.000',"
2147" `aspect` float(8,6) NOT NULL DEFAULT '0.000000',"
2148" `audio_sample_rate` smallint unsigned NOT NULL DEFAULT '0',"
2149" `audio_channels` tinyint unsigned NOT NULL DEFAULT '0',"
2150" `audio_codec` varchar(255) NOT NULL DEFAULT '',"
2151" `video_codec` varchar(255) NOT NULL DEFAULT '',"
2152" `comment` varchar(255) NOT NULL DEFAULT '',"
2153" `hostname` varchar(64) NOT NULL,"
2154" `storagegroup` varchar(32) NOT NULL,"
2155" `id` int NOT NULL AUTO_INCREMENT,"
2156" `recordedid` int unsigned NOT NULL,"
2157" `container` varchar(255) NOT NULL DEFAULT '',"
2158" `total_bitrate` mediumint unsigned NOT NULL DEFAULT '0',"
2159" `video_avg_bitrate` mediumint unsigned NOT NULL DEFAULT '0',"
2160" `video_max_bitrate` mediumint unsigned NOT NULL DEFAULT '0',"
2161" `audio_avg_bitrate` mediumint unsigned NOT NULL DEFAULT '0',"
2162" `audio_max_bitrate` mediumint unsigned NOT NULL DEFAULT '0',"
2163" PRIMARY KEY (`id`),"
2164" UNIQUE KEY `recordedid` (`recordedid`),"
2165" KEY `basename` (`basename`)"
2166") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2167"CREATE TABLE `recordedmarkup` ("
2168" `chanid` int unsigned NOT NULL DEFAULT '0',"
2169" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2170" `mark` mediumint unsigned NOT NULL DEFAULT '0',"
2171" `type` tinyint NOT NULL DEFAULT '0',"
2172" `data` int unsigned DEFAULT NULL,"
2173" PRIMARY KEY (`chanid`,`starttime`,`type`,`mark`)"
2174") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2175"CREATE TABLE `recordedprogram` ("
2176" `chanid` int unsigned NOT NULL DEFAULT '0',"
2177" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2178" `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2179" `title` varchar(128) NOT NULL DEFAULT '',"
2180" `subtitle` varchar(128) NOT NULL DEFAULT '',"
2181" `description` varchar(16000) NOT NULL DEFAULT '',"
2182" `category` varchar(64) NOT NULL DEFAULT '',"
2183" `category_type` varchar(64) NOT NULL DEFAULT '',"
2184" `airdate` year NOT NULL DEFAULT '0000',"
2185" `stars` float unsigned NOT NULL DEFAULT '0',"
2186" `previouslyshown` tinyint NOT NULL DEFAULT '0',"
2187" `title_pronounce` varchar(128) NOT NULL DEFAULT '',"
2188" `stereo` tinyint(1) NOT NULL DEFAULT '0',"
2189" `subtitled` tinyint(1) NOT NULL DEFAULT '0',"
2190" `hdtv` tinyint(1) NOT NULL DEFAULT '0',"
2191" `closecaptioned` tinyint(1) NOT NULL DEFAULT '0',"
2192" `partnumber` int NOT NULL DEFAULT '0',"
2193" `parttotal` int NOT NULL DEFAULT '0',"
2194" `seriesid` varchar(64) DEFAULT NULL,"
2195" `originalairdate` date DEFAULT NULL,"
2196" `showtype` varchar(30) NOT NULL DEFAULT '',"
2197" `colorcode` varchar(20) NOT NULL DEFAULT '',"
2198" `syndicatedepisodenumber` varchar(20) NOT NULL DEFAULT '',"
2199" `programid` varchar(64) DEFAULT NULL,"
2200" `manualid` int unsigned NOT NULL DEFAULT '0',"
2201" `generic` tinyint(1) DEFAULT '0',"
2202" `listingsource` int NOT NULL DEFAULT '0',"
2203" `first` tinyint(1) NOT NULL DEFAULT '0',"
2204" `last` tinyint(1) NOT NULL DEFAULT '0',"
2205" `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') NOT NULL,"
2206" `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') NOT NULL,"
2207" `videoprop` set('WIDESCREEN','HDTV','MPEG2','AVC','HEVC','720','1080','4K','3DTV','PROGRESSIVE','DAMAGED') NOT NULL,"
2208" `inetref` varchar(40) DEFAULT '',"
2209" `season` int NOT NULL DEFAULT '0',"
2210" `episode` int NOT NULL DEFAULT '0',"
2211" `totalepisodes` int NOT NULL DEFAULT '0',"
2212" PRIMARY KEY (`chanid`,`starttime`,`manualid`),"
2213" KEY `endtime` (`endtime`),"
2214" KEY `title` (`title`),"
2215" KEY `title_pronounce` (`title_pronounce`),"
2216" KEY `seriesid` (`seriesid`),"
2217" KEY `programid` (`programid`),"
2218" KEY `id_start_end` (`chanid`,`starttime`,`endtime`)"
2219") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2220"CREATE TABLE `recordedrating` ("
2221" `chanid` int unsigned NOT NULL DEFAULT '0',"
2222" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2223" `system` varchar(128) DEFAULT NULL,"
2224" `rating` varchar(128) DEFAULT NULL,"
2225" UNIQUE KEY `chanid` (`chanid`,`starttime`,`system`,`rating`),"
2226" KEY `starttime` (`starttime`,`system`)"
2227") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2228"CREATE TABLE `recordedseek` ("
2229" `chanid` int unsigned NOT NULL DEFAULT '0',"
2230" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2231" `mark` mediumint unsigned NOT NULL DEFAULT '0',"
2232" `offset` bigint unsigned NOT NULL,"
2233" `type` tinyint NOT NULL DEFAULT '0',"
2234" PRIMARY KEY (`chanid`,`starttime`,`type`,`mark`)"
2235") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2236"CREATE TABLE `recordfilter` ("
2237" `filterid` int unsigned NOT NULL,"
2238" `description` varchar(64) DEFAULT NULL,"
2239" `clause` varchar(256) DEFAULT NULL,"
2240" `newruledefault` tinyint(1) DEFAULT '0',"
2241" PRIMARY KEY (`filterid`)"
2242") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2243"CREATE TABLE `recordingprofiles` ("
2244" `id` int unsigned NOT NULL AUTO_INCREMENT,"
2245" `name` varchar(128) DEFAULT NULL,"
2246" `videocodec` varchar(128) DEFAULT NULL,"
2247" `audiocodec` varchar(128) DEFAULT NULL,"
2248" `profilegroup` int unsigned NOT NULL DEFAULT '0',"
2249" PRIMARY KEY (`id`),"
2250" KEY `profilegroup` (`profilegroup`)"
2251") ENGINE=MyISAM AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;",
2252"CREATE TABLE `recordmatch` ("
2253" `recordid` int unsigned NOT NULL,"
2254" `chanid` int unsigned NOT NULL,"
2255" `starttime` datetime NOT NULL,"
2256" `manualid` int unsigned NOT NULL,"
2257" `oldrecduplicate` tinyint(1) DEFAULT NULL,"
2258" `recduplicate` tinyint(1) DEFAULT NULL,"
2259" `findduplicate` tinyint(1) DEFAULT NULL,"
2260" `oldrecstatus` int DEFAULT NULL,"
2261" `findid` int NOT NULL DEFAULT '0',"
2262" UNIQUE KEY `recordid` (`recordid`,`chanid`,`starttime`),"
2263" KEY `chanid` (`chanid`,`starttime`,`manualid`),"
2264" KEY `recordid_2` (`recordid`,`findid`)"
2265") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2266"CREATE TABLE `roles` ("
2267" `roleid` mediumint unsigned NOT NULL AUTO_INCREMENT,"
2268" `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',"
2269" PRIMARY KEY (`roleid`),"
2270" UNIQUE KEY `name` (`name`)"
2271") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2272"CREATE TABLE `scannerfile` ("
2273" `fileid` bigint unsigned NOT NULL AUTO_INCREMENT,"
2274" `filesize` bigint unsigned NOT NULL DEFAULT '0',"
2275" `filehash` varchar(64) NOT NULL DEFAULT '',"
2276" `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,"
2277" PRIMARY KEY (`fileid`),"
2278" UNIQUE KEY `filehash` (`filehash`)"
2279") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2280"CREATE TABLE `scannerpath` ("
2281" `fileid` bigint unsigned NOT NULL,"
2282" `hostname` varchar(64) NOT NULL DEFAULT 'localhost',"
2283" `storagegroup` varchar(32) NOT NULL DEFAULT 'Default',"
2284" `filename` varchar(255) NOT NULL DEFAULT '',"
2285" PRIMARY KEY (`fileid`)"
2286") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2287"CREATE TABLE `settings` ("
2288" `value` varchar(128) NOT NULL DEFAULT '',"
2289" `data` varchar(16000) NOT NULL DEFAULT '',"
2290" `hostname` varchar(64) DEFAULT NULL,"
2291" KEY `value` (`value`,`hostname`)"
2292") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2293"CREATE TABLE `sportsapi` ("
2294" `id` int unsigned NOT NULL,"
2295" `provider` tinyint unsigned DEFAULT '0',"
2296" `name` varchar(128) NOT NULL,"
2297" `key1` varchar(64) NOT NULL,"
2298" `key2` varchar(64) NOT NULL,"
2299" PRIMARY KEY (`id`),"
2300" UNIQUE KEY `provider` (`provider`,`key1`(25),`key2`(50))"
2301") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2302"CREATE TABLE `sportscleanup` ("
2303" `id` int unsigned NOT NULL AUTO_INCREMENT,"
2304" `provider` tinyint unsigned DEFAULT '0',"
2305" `weight` int unsigned NOT NULL,"
2306" `key1` varchar(256) NOT NULL,"
2307" `name` varchar(256) NOT NULL,"
2308" `pattern` varchar(256) NOT NULL,"
2309" `nth` tinyint unsigned NOT NULL,"
2310" `replacement` varchar(128) NOT NULL,"
2311" PRIMARY KEY (`id`)"
2312") ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;",
2313"CREATE TABLE `sportslisting` ("
2314" `id` int unsigned NOT NULL AUTO_INCREMENT,"
2315" `api` int unsigned NOT NULL,"
2316" `title` varchar(128) NOT NULL,"
2317" PRIMARY KEY (`id`)"
2318") ENGINE=MyISAM AUTO_INCREMENT=96 DEFAULT CHARSET=utf8;",
2319"CREATE TABLE `storagegroup` ("
2320" `id` int NOT NULL AUTO_INCREMENT,"
2321" `groupname` varchar(32) NOT NULL,"
2322" `hostname` varchar(64) NOT NULL DEFAULT '',"
2323" `dirname` varchar(235) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',"
2324" PRIMARY KEY (`id`),"
2325" UNIQUE KEY `grouphostdir` (`groupname`,`hostname`,`dirname`),"
2326" KEY `hostname` (`hostname`)"
2327") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2328"CREATE TABLE `tvchain` ("
2329" `chanid` int unsigned NOT NULL DEFAULT '0',"
2330" `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2331" `chainid` varchar(128) NOT NULL DEFAULT '',"
2332" `chainpos` int NOT NULL DEFAULT '0',"
2333" `discontinuity` tinyint(1) NOT NULL DEFAULT '0',"
2334" `watching` int NOT NULL DEFAULT '0',"
2335" `hostprefix` varchar(128) NOT NULL DEFAULT '',"
2336" `cardtype` varchar(32) NOT NULL DEFAULT 'V4L',"
2337" `input` varchar(32) NOT NULL DEFAULT '',"
2338" `channame` varchar(32) NOT NULL DEFAULT '',"
2339" `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2340" PRIMARY KEY (`chanid`,`starttime`)"
2341") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2342"CREATE TABLE `tvosdmenu` ("
2343" `osdcategory` varchar(32) NOT NULL,"
2344" `livetv` tinyint NOT NULL DEFAULT '0',"
2345" `recorded` tinyint NOT NULL DEFAULT '0',"
2346" `video` tinyint NOT NULL DEFAULT '0',"
2347" `dvd` tinyint NOT NULL DEFAULT '0',"
2348" `description` varchar(32) NOT NULL,"
2349" PRIMARY KEY (`osdcategory`)"
2350") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2351"CREATE TABLE `upnpmedia` ("
2352" `intid` int unsigned NOT NULL DEFAULT '0',"
2353" `class` varchar(64) NOT NULL DEFAULT '',"
2354" `itemtype` varchar(128) NOT NULL DEFAULT '',"
2355" `parentid` int unsigned NOT NULL DEFAULT '0',"
2356" `itemproperties` varchar(255) NOT NULL DEFAULT '',"
2357" `filepath` varchar(512) NOT NULL DEFAULT '',"
2358" `title` varchar(255) NOT NULL DEFAULT '',"
2359" `filename` varchar(512) NOT NULL DEFAULT '',"
2360" `coverart` varchar(512) NOT NULL DEFAULT '',"
2361" PRIMARY KEY (`intid`),"
2362" KEY `class` (`class`),"
2363" KEY `filepath` (`filepath`(333)),"
2364" KEY `parentid` (`parentid`)"
2365") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2366"CREATE TABLE `user_permissions` ("
2367" `userid` int unsigned NOT NULL,"
2368" `permission` varchar(128) NOT NULL DEFAULT '',"
2369" PRIMARY KEY (`userid`)"
2370") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2371"CREATE TABLE `user_sessions` ("
2372" `sessiontoken` varchar(40) NOT NULL DEFAULT '',"
2373" `userid` int unsigned NOT NULL,"
2374" `client` varchar(128) NOT NULL,"
2375" `created` datetime NOT NULL,"
2376" `lastactive` datetime NOT NULL,"
2377" `expires` datetime NOT NULL,"
2378" PRIMARY KEY (`sessiontoken`),"
2379" UNIQUE KEY `userid_client` (`userid`,`client`)"
2380") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2381"CREATE TABLE `users` ("
2382" `userid` int unsigned NOT NULL AUTO_INCREMENT,"
2383" `username` varchar(128) NOT NULL DEFAULT '',"
2384" `password_digest` varchar(32) NOT NULL DEFAULT '',"
2385" `lastlogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',"
2386" PRIMARY KEY (`userid`),"
2387" KEY `username` (`username`)"
2388") ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;",
2389"CREATE TABLE `videocast` ("
2390" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2391" `cast` varchar(128) NOT NULL,"
2392" PRIMARY KEY (`intid`)"
2393") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2394"CREATE TABLE `videocategory` ("
2395" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2396" `category` varchar(128) NOT NULL,"
2397" PRIMARY KEY (`intid`)"
2398") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2399"CREATE TABLE `videocollection` ("
2400" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2401" `title` varchar(256) NOT NULL,"
2402" `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '',"
2403" `plot` text,"
2404" `network` varchar(128) DEFAULT NULL,"
2405" `collectionref` varchar(128) NOT NULL,"
2406" `certification` varchar(128) DEFAULT NULL,"
2407" `genre` varchar(128) DEFAULT '',"
2408" `releasedate` date DEFAULT NULL,"
2409" `language` varchar(10) DEFAULT NULL,"
2410" `status` varchar(64) DEFAULT NULL,"
2411" `rating` float DEFAULT '0',"
2412" `ratingcount` int DEFAULT '0',"
2413" `runtime` smallint unsigned DEFAULT '0',"
2414" `banner` text,"
2415" `fanart` text,"
2416" `coverart` text,"
2417" PRIMARY KEY (`intid`),"
2418" KEY `title` (`title`)"
2419") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2420"CREATE TABLE `videocountry` ("
2421" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2422" `country` varchar(128) NOT NULL,"
2423" PRIMARY KEY (`intid`)"
2424") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2425"CREATE TABLE `videogenre` ("
2426" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2427" `genre` varchar(128) NOT NULL,"
2428" PRIMARY KEY (`intid`)"
2429") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2430"CREATE TABLE `videometadata` ("
2431" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2432" `title` varchar(128) NOT NULL,"
2433" `subtitle` text NOT NULL,"
2434" `tagline` varchar(255) DEFAULT NULL,"
2435" `director` varchar(128) NOT NULL,"
2436" `studio` varchar(128) DEFAULT NULL,"
2437" `plot` text,"
2438" `rating` varchar(128) NOT NULL,"
2439" `inetref` varchar(255) NOT NULL,"
2440" `collectionref` int NOT NULL DEFAULT '-1',"
2441" `homepage` text NOT NULL,"
2442" `year` int unsigned NOT NULL,"
2443" `releasedate` date NOT NULL,"
2444" `userrating` float NOT NULL,"
2445" `length` int unsigned NOT NULL,"
2446" `playcount` int NOT NULL DEFAULT '0',"
2447" `season` smallint unsigned NOT NULL DEFAULT '0',"
2448" `episode` smallint unsigned NOT NULL DEFAULT '0',"
2449" `showlevel` int unsigned NOT NULL,"
2450" `filename` text NOT NULL,"
2451" `hash` varchar(128) NOT NULL,"
2452" `coverfile` text NOT NULL,"
2453" `childid` int NOT NULL DEFAULT '-1',"
2454" `browse` tinyint(1) NOT NULL DEFAULT '1',"
2455" `watched` tinyint(1) NOT NULL DEFAULT '0',"
2456" `processed` tinyint(1) NOT NULL DEFAULT '0',"
2457" `playcommand` varchar(255) DEFAULT NULL,"
2458" `category` int unsigned NOT NULL DEFAULT '0',"
2459" `trailer` text,"
2460" `host` text NOT NULL,"
2461" `screenshot` text,"
2462" `banner` text,"
2463" `fanart` text,"
2464" `insertdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,"
2465" `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '',"
2466" PRIMARY KEY (`intid`),"
2467" KEY `director` (`director`),"
2468" KEY `title` (`title`)"
2469") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2470"CREATE TABLE `videometadatacast` ("
2471" `idvideo` int unsigned NOT NULL,"
2472" `idcast` int unsigned NOT NULL,"
2473" UNIQUE KEY `idvideo` (`idvideo`,`idcast`)"
2474") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2475"CREATE TABLE `videometadatacountry` ("
2476" `idvideo` int unsigned NOT NULL,"
2477" `idcountry` int unsigned NOT NULL,"
2478" UNIQUE KEY `idvideo_2` (`idvideo`,`idcountry`),"
2479" KEY `idvideo` (`idvideo`),"
2480" KEY `idcountry` (`idcountry`)"
2481") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2482"CREATE TABLE `videometadatagenre` ("
2483" `idvideo` int unsigned NOT NULL,"
2484" `idgenre` int unsigned NOT NULL,"
2485" UNIQUE KEY `idvideo_2` (`idvideo`,`idgenre`),"
2486" KEY `idvideo` (`idvideo`),"
2487" KEY `idgenre` (`idgenre`)"
2488") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2489"CREATE TABLE `videopart` ("
2490" `fileid` bigint unsigned NOT NULL,"
2491" `videoid` int unsigned NOT NULL,"
2492" `order` smallint unsigned NOT NULL DEFAULT '1',"
2493" PRIMARY KEY (`videoid`,`order`)"
2494") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2495"CREATE TABLE `videopathinfo` ("
2496" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2497" `path` text,"
2498" `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '',"
2499" `collectionref` int DEFAULT '0',"
2500" `recurse` tinyint(1) DEFAULT '0',"
2501" PRIMARY KEY (`intid`)"
2502") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2503"CREATE TABLE `videosource` ("
2504" `sourceid` int unsigned NOT NULL AUTO_INCREMENT,"
2505" `name` varchar(128) NOT NULL DEFAULT '',"
2506" `xmltvgrabber` varchar(128) DEFAULT NULL,"
2507" `userid` varchar(128) DEFAULT NULL,"
2508" `freqtable` varchar(16) NOT NULL DEFAULT 'default',"
2509" `lineupid` varchar(64) DEFAULT NULL,"
2510" `password` varchar(64) DEFAULT NULL,"
2511" `useeit` smallint NOT NULL DEFAULT '0',"
2512" `configpath` varchar(4096) DEFAULT NULL,"
2513" `dvb_nit_id` int DEFAULT '-1',"
2514" `bouquet_id` int unsigned DEFAULT NULL,"
2515" `region_id` int unsigned DEFAULT NULL,"
2516" `scanfrequency` int unsigned DEFAULT '0',"
2517" `lcnoffset` int unsigned DEFAULT '0',"
2518" PRIMARY KEY (`sourceid`),"
2519" UNIQUE KEY `name` (`name`)"
2520") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
2521"CREATE TABLE `videotypes` ("
2522" `intid` int unsigned NOT NULL AUTO_INCREMENT,"
2523" `extension` varchar(128) NOT NULL,"
2524" `playcommand` varchar(255) NOT NULL,"
2525" `f_ignore` tinyint(1) DEFAULT NULL,"
2526" `use_default` tinyint(1) DEFAULT NULL,"
2527" PRIMARY KEY (`intid`)"
2528") ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;",
2529
2530"INSERT INTO `channelgroupnames` VALUES (1,'Favorites');",
2531"INSERT INTO `customexample` VALUES ('New Flix','','program.category_type = \\'movie\\' AND program.airdate >= \\n YEAR(DATE_SUB(NOW(), INTERVAL 1 YEAR)) \\nAND program.stars > 0.5 ',1);",
2532"INSERT INTO `dtv_privatetypes` VALUES ('dvb',9018,'channel_numbers','131');",
2533"INSERT INTO `dtv_privatetypes` VALUES ('dvb',9018,'guide_fixup','2');",
2534"INSERT INTO `dtv_privatetypes` VALUES ('dvb',256,'guide_fixup','1');",
2535"INSERT INTO `dtv_privatetypes` VALUES ('dvb',257,'guide_fixup','1');",
2536"INSERT INTO `dtv_privatetypes` VALUES ('dvb',256,'tv_types','1,150,134,133');",
2537"INSERT INTO `dtv_privatetypes` VALUES ('dvb',257,'tv_types','1,150,134,133');",
2538"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4100,'sdt_mapping','1');",
2539"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4101,'sdt_mapping','1');",
2540"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4102,'sdt_mapping','1');",
2541"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4103,'sdt_mapping','1');",
2542"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4104,'sdt_mapping','1');",
2543"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4105,'sdt_mapping','1');",
2544"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4106,'sdt_mapping','1');",
2545"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4107,'sdt_mapping','1');",
2546"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4097,'sdt_mapping','1');",
2547"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4098,'sdt_mapping','1');",
2548"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4100,'tv_types','1,145,154');",
2549"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4101,'tv_types','1,145,154');",
2550"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4102,'tv_types','1,145,154');",
2551"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4103,'tv_types','1,145,154');",
2552"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4104,'tv_types','1,145,154');",
2553"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4105,'tv_types','1,145,154');",
2554"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4106,'tv_types','1,145,154');",
2555"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4107,'tv_types','1,145,154');",
2556"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4097,'tv_types','1,145,154');",
2557"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4098,'tv_types','1,145,154');",
2558"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4100,'guide_fixup','1');",
2559"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4101,'guide_fixup','1');",
2560"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4102,'guide_fixup','1');",
2561"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4103,'guide_fixup','1');",
2562"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4104,'guide_fixup','1');",
2563"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4105,'guide_fixup','1');",
2564"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4106,'guide_fixup','1');",
2565"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4107,'guide_fixup','1');",
2566"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4096,'guide_fixup','5');",
2567"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4097,'guide_fixup','1');",
2568"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4098,'guide_fixup','1');",
2569"INSERT INTO `dtv_privatetypes` VALUES ('dvb',94,'tv_types','1,128');",
2570"INSERT INTO `dtv_privatetypes` VALUES ('atsc',1793,'guide_fixup','3');",
2571"INSERT INTO `dtv_privatetypes` VALUES ('dvb',40999,'guide_fixup','4');",
2572"INSERT INTO `dtv_privatetypes` VALUES ('dvb',70,'force_guide_present','yes');",
2573"INSERT INTO `dtv_privatetypes` VALUES ('dvb',70,'guide_ranges','80,80,96,96');",
2574"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4112,'channel_numbers','131');",
2575"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4115,'channel_numbers','131');",
2576"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4116,'channel_numbers','131');",
2577"INSERT INTO `dtv_privatetypes` VALUES ('dvb',12802,'channel_numbers','131');",
2578"INSERT INTO `dtv_privatetypes` VALUES ('dvb',12803,'channel_numbers','131');",
2579"INSERT INTO `dtv_privatetypes` VALUES ('dvb',12829,'channel_numbers','131');",
2580"INSERT INTO `dtv_privatetypes` VALUES ('dvb',40999,'parse_subtitle_list','1070,1308,1041,1306,1307,1030,1016,1131,1068,1069');",
2581"INSERT INTO `dtv_privatetypes` VALUES ('dvb',4096,'guide_fixup','5');",
2582"INSERT INTO `dvdinput` VALUES (1,720,480,16,9,1,1,'ntsc');",
2583"INSERT INTO `dvdinput` VALUES (2,720,480,16,9,1,0,'ntsc');",
2584"INSERT INTO `dvdinput` VALUES (3,720,480,4,3,1,1,'ntsc');",
2585"INSERT INTO `dvdinput` VALUES (4,720,480,4,3,1,0,'ntsc');",
2586"INSERT INTO `dvdinput` VALUES (5,720,576,16,9,3,1,'pal');",
2587"INSERT INTO `dvdinput` VALUES (6,720,576,16,9,3,0,'pal');",
2588"INSERT INTO `dvdinput` VALUES (7,720,576,4,3,3,1,'pal');",
2589"INSERT INTO `dvdinput` VALUES (8,720,576,4,3,3,0,'pal');",
2590"INSERT INTO `dvdtranscode` VALUES (1,1,'Good',2,1,16,16,0,0,2,0,0,0,0,0,32,32,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2591"INSERT INTO `dvdtranscode` VALUES (2,2,'Excellent',2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'divx5',NULL,0,NULL,NULL,1,NULL);",
2592"INSERT INTO `dvdtranscode` VALUES (3,2,'Good',2,1,0,0,8,8,0,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2593"INSERT INTO `dvdtranscode` VALUES (4,2,'Medium',2,1,0,0,8,8,5,5,0,0,0,0,0,0,0,0,'divx5',NULL,1200,NULL,NULL,0,NULL);",
2594"INSERT INTO `dvdtranscode` VALUES (5,3,'Good',2,1,0,0,0,0,0,0,0,0,2,0,80,80,8,8,'divx5',NULL,0,NULL,NULL,0,NULL);",
2595"INSERT INTO `dvdtranscode` VALUES (6,4,'Excellent',2,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,'divx5',NULL,0,NULL,NULL,1,NULL);",
2596"INSERT INTO `dvdtranscode` VALUES (7,4,'Good',2,1,0,0,8,8,0,2,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2597"INSERT INTO `dvdtranscode` VALUES (8,5,'Good',1,1,16,16,0,0,5,0,0,0,0,0,40,40,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2598"INSERT INTO `dvdtranscode` VALUES (9,6,'Good',1,1,0,0,16,16,5,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2599"INSERT INTO `dvdtranscode` VALUES (10,7,'Good',1,1,0,0,0,0,1,0,0,0,0,0,76,76,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2600"INSERT INTO `dvdtranscode` VALUES (11,8,'Good',1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL);",
2601"INSERT INTO `playgroup` VALUES ('Default','',30,5,100,0);",
2602"INSERT INTO `profilegroups` VALUES (1,'Software Encoders (v4l based)','V4L',1,NULL);",
2603"INSERT INTO `profilegroups` VALUES (2,'IVTV MPEG-2 Encoders','MPEG',1,NULL);",
2604"INSERT INTO `profilegroups` VALUES (3,'Hardware MJPEG Encoders (Matrox G200-TV, Miro DC10, etc)','MJPEG',1,NULL);",
2605"INSERT INTO `profilegroups` VALUES (4,'Hardware HDTV','HDTV',1,NULL);",
2606"INSERT INTO `profilegroups` VALUES (5,'Hardware DVB Encoders','DVB',1,NULL);",
2607"INSERT INTO `profilegroups` VALUES (6,'Transcoders','TRANSCODE',1,NULL);",
2608"INSERT INTO `profilegroups` VALUES (7,'FireWire Input','FIREWIRE',1,NULL);",
2609"INSERT INTO `profilegroups` VALUES (8,'USB Mpeg-4 Encoder (Plextor ConvertX, etc)','GO7007',1,NULL);",
2610"INSERT INTO `profilegroups` VALUES (14,'Import Recorder','IMPORT',1,NULL);",
2611"INSERT INTO `profilegroups` VALUES (10,'Freebox Input','FREEBOX',1,NULL);",
2612"INSERT INTO `profilegroups` VALUES (11,'HDHomeRun Recorders','HDHOMERUN',1,NULL);",
2613"INSERT INTO `profilegroups` VALUES (12,'CRC IP Recorders','CRC_IP',1,NULL);",
2614"INSERT INTO `profilegroups` VALUES (13,'HD-PVR Recorders','HDPVR',1,NULL);",
2615"INSERT INTO `profilegroups` VALUES (15,'ASI Recorder (DVEO)','ASI',1,NULL);",
2616"INSERT INTO `profilegroups` VALUES (16,'OCUR Recorder (CableLabs)','OCUR',1,NULL);",
2617"INSERT INTO `profilegroups` VALUES (17,'Ceton Recorder','CETON',1,NULL);",
2618"INSERT INTO `profilegroups` VALUES (18,'VBox Recorder','VBOX',1,NULL);",
2619"INSERT INTO `profilegroups` VALUES (19,'Sat>IP Recorder','SATIP',1,NULL);",
2620"INSERT INTO `recgroups` VALUES (1,'Default','','',1);",
2621"INSERT INTO `recgroups` VALUES (2,'LiveTV','','',1);",
2622"INSERT INTO `recgroups` VALUES (3,'Deleted','','',1);",
2623"INSERT INTO `record` VALUES (1,11,0,'21:57:44','2012-08-11','21:57:44','2012-08-11','Default (Template)','','',0,0,'Default','Default',0,0,0,0,0,0,'Default',6,15,'','','','',0,0,1,0,0,0,0,1,-1,'00:00:00',735091,0,0,0,'Default',0,NULL,NULL,NULL,'Default',100,0,1,0);",
2624"INSERT INTO `recordfilter` VALUES (0,'New episode','program.previouslyshown = 0',0);",
2625"INSERT INTO `recordfilter` VALUES (1,'Identifiable episode','program.generic = 0',0);",
2626"INSERT INTO `recordfilter` VALUES (2,'First showing','program.first > 0',0);",
2627"INSERT INTO `recordfilter` VALUES (3,'Prime time','HOUR(CONVERT_TZ(program.starttime, \\'Etc/UTC\\', \\'SYSTEM\\')) >= 19 AND HOUR(CONVERT_TZ(program.starttime, \\'Etc/UTC\\', \\'SYSTEM\\')) < 22',0);",
2628"INSERT INTO `recordfilter` VALUES (4,'Commercial free','channel.commmethod = -2',0);",
2629"INSERT INTO `recordfilter` VALUES (5,'High definition','program.hdtv > 0',0);",
2630"INSERT INTO `recordfilter` VALUES (6,'This episode','(RECTABLE.programid <> \\'\\' AND program.programid = RECTABLE.programid) OR (RECTABLE.programid = \\'\\' AND program.subtitle = RECTABLE.subtitle AND program.description = RECTABLE.description)',0);",
2631"INSERT INTO `recordfilter` VALUES (7,'This series','(RECTABLE.seriesid <> \\'\\' AND program.seriesid = RECTABLE.seriesid)',0);",
2632"INSERT INTO `recordfilter` VALUES (8,'This time','ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ( ADDTIME(RECTABLE.startdate, RECTABLE.starttime), \\'Etc/UTC\\', \\'SYSTEM\\'), CONVERT_TZ(program.starttime, \\'Etc/UTC\\', \\'SYSTEM\\'))) MOD 1440 NOT BETWEEN 11 AND 1429',0);",
2633"INSERT INTO `recordfilter` VALUES (9,'This day and time','ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ( ADDTIME(RECTABLE.startdate, RECTABLE.starttime), \\'Etc/UTC\\', \\'SYSTEM\\'), CONVERT_TZ(program.starttime, \\'Etc/UTC\\', \\'SYSTEM\\'))) MOD 10080 NOT BETWEEN 11 AND 10069',0);",
2634"INSERT INTO `recordfilter` VALUES (10,'This channel','channel.callsign = RECTABLE.station',0);",
2635"INSERT INTO `recordfilter` VALUES (11,'No episodes','program.category_type <> \\'series\\'',0);",
2636"INSERT INTO `recordfilter` VALUES (12,'Priority channel','channel.recpriority > 0',0);",
2637"INSERT INTO `recordingprofiles` VALUES (1,'Default',NULL,NULL,1);",
2638"INSERT INTO `recordingprofiles` VALUES (2,'Live TV',NULL,NULL,1);",
2639"INSERT INTO `recordingprofiles` VALUES (3,'High Quality',NULL,NULL,1);",
2640"INSERT INTO `recordingprofiles` VALUES (4,'Low Quality',NULL,NULL,1);",
2641"INSERT INTO `recordingprofiles` VALUES (5,'Default',NULL,NULL,2);",
2642"INSERT INTO `recordingprofiles` VALUES (6,'Live TV',NULL,NULL,2);",
2643"INSERT INTO `recordingprofiles` VALUES (7,'High Quality',NULL,NULL,2);",
2644"INSERT INTO `recordingprofiles` VALUES (8,'Low Quality',NULL,NULL,2);",
2645"INSERT INTO `recordingprofiles` VALUES (9,'Default',NULL,NULL,3);",
2646"INSERT INTO `recordingprofiles` VALUES (10,'Live TV',NULL,NULL,3);",
2647"INSERT INTO `recordingprofiles` VALUES (11,'High Quality',NULL,NULL,3);",
2648"INSERT INTO `recordingprofiles` VALUES (12,'Low Quality',NULL,NULL,3);",
2649"INSERT INTO `recordingprofiles` VALUES (13,'Default',NULL,NULL,4);",
2650"INSERT INTO `recordingprofiles` VALUES (14,'Live TV',NULL,NULL,4);",
2651"INSERT INTO `recordingprofiles` VALUES (15,'High Quality',NULL,NULL,4);",
2652"INSERT INTO `recordingprofiles` VALUES (16,'Low Quality',NULL,NULL,4);",
2653"INSERT INTO `recordingprofiles` VALUES (17,'Default',NULL,NULL,5);",
2654"INSERT INTO `recordingprofiles` VALUES (18,'Live TV',NULL,NULL,5);",
2655"INSERT INTO `recordingprofiles` VALUES (19,'High Quality',NULL,NULL,5);",
2656"INSERT INTO `recordingprofiles` VALUES (20,'Low Quality',NULL,NULL,5);",
2657"INSERT INTO `recordingprofiles` VALUES (21,'RTjpeg/MPEG4',NULL,NULL,6);",
2658"INSERT INTO `recordingprofiles` VALUES (22,'MPEG2',NULL,NULL,6);",
2659"INSERT INTO `recordingprofiles` VALUES (23,'Default',NULL,NULL,8);",
2660"INSERT INTO `recordingprofiles` VALUES (24,'Live TV',NULL,NULL,8);",
2661"INSERT INTO `recordingprofiles` VALUES (25,'High Quality',NULL,NULL,8);",
2662"INSERT INTO `recordingprofiles` VALUES (26,'Low Quality',NULL,NULL,8);",
2663"INSERT INTO `recordingprofiles` VALUES (27,'High Quality',NULL,NULL,6);",
2664"INSERT INTO `recordingprofiles` VALUES (28,'Medium Quality',NULL,NULL,6);",
2665"INSERT INTO `recordingprofiles` VALUES (29,'Low Quality',NULL,NULL,6);",
2666"INSERT INTO `recordingprofiles` VALUES (30,'Default',NULL,NULL,10);",
2667"INSERT INTO `recordingprofiles` VALUES (31,'Live TV',NULL,NULL,10);",
2668"INSERT INTO `recordingprofiles` VALUES (32,'High Quality',NULL,NULL,10);",
2669"INSERT INTO `recordingprofiles` VALUES (33,'Low Quality',NULL,NULL,10);",
2670"INSERT INTO `recordingprofiles` VALUES (34,'Default',NULL,NULL,11);",
2671"INSERT INTO `recordingprofiles` VALUES (35,'Live TV',NULL,NULL,11);",
2672"INSERT INTO `recordingprofiles` VALUES (36,'High Quality',NULL,NULL,11);",
2673"INSERT INTO `recordingprofiles` VALUES (37,'Low Quality',NULL,NULL,11);",
2674"INSERT INTO `recordingprofiles` VALUES (38,'Default',NULL,NULL,12);",
2675"INSERT INTO `recordingprofiles` VALUES (39,'Live TV',NULL,NULL,12);",
2676"INSERT INTO `recordingprofiles` VALUES (40,'High Quality',NULL,NULL,12);",
2677"INSERT INTO `recordingprofiles` VALUES (41,'Low Quality',NULL,NULL,12);",
2678"INSERT INTO `recordingprofiles` VALUES (42,'Default',NULL,NULL,7);",
2679"INSERT INTO `recordingprofiles` VALUES (43,'Live TV',NULL,NULL,7);",
2680"INSERT INTO `recordingprofiles` VALUES (44,'High Quality',NULL,NULL,7);",
2681"INSERT INTO `recordingprofiles` VALUES (45,'Low Quality',NULL,NULL,7);",
2682"INSERT INTO `recordingprofiles` VALUES (46,'Default',NULL,NULL,9);",
2683"INSERT INTO `recordingprofiles` VALUES (47,'Live TV',NULL,NULL,9);",
2684"INSERT INTO `recordingprofiles` VALUES (48,'High Quality',NULL,NULL,9);",
2685"INSERT INTO `recordingprofiles` VALUES (49,'Low Quality',NULL,NULL,9);",
2686"INSERT INTO `recordingprofiles` VALUES (50,'Default',NULL,NULL,13);",
2687"INSERT INTO `recordingprofiles` VALUES (51,'Live TV',NULL,NULL,13);",
2688"INSERT INTO `recordingprofiles` VALUES (52,'High Quality',NULL,NULL,13);",
2689"INSERT INTO `recordingprofiles` VALUES (53,'Low Quality',NULL,NULL,13);",
2690"INSERT INTO `recordingprofiles` VALUES (54,'Default',NULL,NULL,14);",
2691"INSERT INTO `recordingprofiles` VALUES (55,'Live TV',NULL,NULL,14);",
2692"INSERT INTO `recordingprofiles` VALUES (56,'High Quality',NULL,NULL,14);",
2693"INSERT INTO `recordingprofiles` VALUES (57,'Low Quality',NULL,NULL,14);",
2694"INSERT INTO `recordingprofiles` VALUES (58,'Default',NULL,NULL,15);",
2695"INSERT INTO `recordingprofiles` VALUES (59,'Live TV',NULL,NULL,15);",
2696"INSERT INTO `recordingprofiles` VALUES (60,'High Quality',NULL,NULL,15);",
2697"INSERT INTO `recordingprofiles` VALUES (61,'Low Quality',NULL,NULL,15);",
2698"INSERT INTO `recordingprofiles` VALUES (62,'Default',NULL,NULL,16);",
2699"INSERT INTO `recordingprofiles` VALUES (63,'Live TV',NULL,NULL,16);",
2700"INSERT INTO `recordingprofiles` VALUES (64,'High Quality',NULL,NULL,16);",
2701"INSERT INTO `recordingprofiles` VALUES (65,'Low Quality',NULL,NULL,16);",
2702"INSERT INTO `recordingprofiles` VALUES (66,'Default',NULL,NULL,17);",
2703"INSERT INTO `recordingprofiles` VALUES (67,'Live TV',NULL,NULL,17);",
2704"INSERT INTO `recordingprofiles` VALUES (68,'High Quality',NULL,NULL,17);",
2705"INSERT INTO `recordingprofiles` VALUES (69,'Low Quality',NULL,NULL,17);",
2706"INSERT INTO `recordingprofiles` VALUES (70,'Default',NULL,NULL,18);",
2707"INSERT INTO `recordingprofiles` VALUES (71,'Live TV',NULL,NULL,18);",
2708"INSERT INTO `recordingprofiles` VALUES (72,'High Quality',NULL,NULL,18);",
2709"INSERT INTO `recordingprofiles` VALUES (73,'Low Quality',NULL,NULL,18);",
2710"INSERT INTO `recordingprofiles` VALUES (74,'Default',NULL,NULL,19);",
2711"INSERT INTO `recordingprofiles` VALUES (75,'Live TV',NULL,NULL,19);",
2712"INSERT INTO `recordingprofiles` VALUES (76,'High Quality',NULL,NULL,19);",
2713"INSERT INTO `recordingprofiles` VALUES (77,'Low Quality',NULL,NULL,19);",
2714"INSERT INTO `settings` VALUES ('mythfilldatabaseLastRunStart','',NULL);",
2715"INSERT INTO `settings` VALUES ('mythfilldatabaseLastRunEnd','',NULL);",
2716"INSERT INTO `settings` VALUES ('mythfilldatabaseLastRunStatus','',NULL);",
2717"INSERT INTO `settings` VALUES ('DataDirectMessage','',NULL);",
2718"INSERT INTO `settings` VALUES ('HaveRepeats','0',NULL);",
2719"INSERT INTO `settings` VALUES ('DBSchemaVer','1382',NULL);",
2720"INSERT INTO `settings` VALUES ('HardwareProfileEnabled','0',NULL);",
2721"INSERT INTO `settings` VALUES ('ImageStorageGroupName','Images',NULL);",
2722"INSERT INTO `settings` VALUES ('ImageSortOrder','0',NULL);",
2723"INSERT INTO `settings` VALUES ('ImageShowHiddenFiles','0',NULL);",
2724"INSERT INTO `settings` VALUES ('ImageSlideShowTime','3500',NULL);",
2725"INSERT INTO `settings` VALUES ('ImageTransitionType','1',NULL);",
2726"INSERT INTO `settings` VALUES ('ImageTransitionTime','1000',NULL);",
2727"INSERT INTO `sportsapi` VALUES (1,1,'Major League Baseball','baseball','mlb');",
2728"INSERT INTO `sportsapi` VALUES (2,1,'NCAA Men\\'s Baseball','baseball','college-baseball');",
2729"INSERT INTO `sportsapi` VALUES (3,1,'NCAA Women\\'s Softball','baseball','college-softball');",
2730"INSERT INTO `sportsapi` VALUES (4,1,'Olympic Men\\'s Baseball','baseball','olympics-baseball');",
2731"INSERT INTO `sportsapi` VALUES (5,1,'World Baseball Classic','baseball','world-baseball-classic');",
2732"INSERT INTO `sportsapi` VALUES (6,1,'Little League Baseball','baseball','llb');",
2733"INSERT INTO `sportsapi` VALUES (7,1,'Caribbean Series','baseball','caribbean-series');",
2734"INSERT INTO `sportsapi` VALUES (8,1,'Dominican Winter League','baseball','dominican-winter-league');",
2735"INSERT INTO `sportsapi` VALUES (9,1,'Venezuelan Winter League','baseball','venezuelan-winter-league');",
2736"INSERT INTO `sportsapi` VALUES (10,1,'Mexican League','baseball','mexican-winter-league');",
2737"INSERT INTO `sportsapi` VALUES (11,1,'Puerto Rican Winter League','baseball','puerto-rican-winter-league');",
2738"INSERT INTO `sportsapi` VALUES (20,1,'National Football League','football','nfl');",
2739"INSERT INTO `sportsapi` VALUES (21,1,'NCAA - Football','football','college-football');",
2740"INSERT INTO `sportsapi` VALUES (22,1,'XFL','football','xfl');",
2741"INSERT INTO `sportsapi` VALUES (23,1,'Canadian Football League','football','cfl');",
2742"INSERT INTO `sportsapi` VALUES (40,1,'National Basketball Association','basketball','nba');",
2743"INSERT INTO `sportsapi` VALUES (41,1,'Women\\'s National Basketball Association','basketball','wnba');",
2744"INSERT INTO `sportsapi` VALUES (42,1,'NCAA Men\\'s Basketball','basketball','mens-college-basketball');",
2745"INSERT INTO `sportsapi` VALUES (43,1,'NCAA Women\\'s Basketball','basketball','womens-college-basketball');",
2746"INSERT INTO `sportsapi` VALUES (44,1,'Olympics Men\\'s Basketball','basketball','mens-olympic-basketball');",
2747"INSERT INTO `sportsapi` VALUES (45,1,'Olympics Women\\'s Basketball','basketball','womens-olympic-basketball');",
2748"INSERT INTO `sportsapi` VALUES (46,1,'National Basketball Association Summer League Las Vegas','basketball','nba-summer-las-vegas');",
2749"INSERT INTO `sportsapi` VALUES (47,1,'National Basketball Association Summer League Utah','basketball','nba-summer-utah');",
2750"INSERT INTO `sportsapi` VALUES (48,1,'National Basketball Association Summer League Orlando','basketball','nba-summer-orlando');",
2751"INSERT INTO `sportsapi` VALUES (49,1,'National Basketball Association Summer League Sacramento','basketball','nba-summer-sacramento');",
2752"INSERT INTO `sportsapi` VALUES (50,1,'NBA G League','basketball','nba-development');",
2753"INSERT INTO `sportsapi` VALUES (51,1,'International Basketball Federation','basketball','fiba');",
2754"INSERT INTO `sportsapi` VALUES (60,1,'National Hockey League','hockey','nfl');",
2755"INSERT INTO `sportsapi` VALUES (61,1,'NCAA Men\\'s Ice Hockey','hockey','mens-college-hockey');",
2756"INSERT INTO `sportsapi` VALUES (62,1,'NCAA Women\\'s Hockey','hockey','womens-college-hockey');",
2757"INSERT INTO `sportsapi` VALUES (63,1,'World Cup of Hockey','hockey','hockey-world-cup');",
2758"INSERT INTO `sportsapi` VALUES (64,1,'Men\\'s Olympic Ice Hockey','hockey','mens-olympic-hockey');",
2759"INSERT INTO `sportsapi` VALUES (65,1,'Women\\'s Olympic Ice Hockey','hockey','womens-olympic-hockey');",
2760"INSERT INTO `sportsapi` VALUES (66,1,'NCAA Women\\'s Field Hockey','field-hockey','womens-college-field-hockey');",
2761"INSERT INTO `sportsapi` VALUES (80,1,'NCAA Men\\'s Volleyball','volleyball','mens-college-volleyball');",
2762"INSERT INTO `sportsapi` VALUES (81,1,'NCAA Women\\'s Volleyball','volleyball','womens-college-volleyball');",
2763"INSERT INTO `sportsapi` VALUES (100,1,'NCAA Men\\'s Lacrosse','lacrosse','mens-college-lacrosse');",
2764"INSERT INTO `sportsapi` VALUES (101,1,'NCAA Women\\'s Lacrosse','lacrosse','womens-college-lacrosse');",
2765"INSERT INTO `sportsapi` VALUES (120,1,'NCAA Men\\'s Water Polo','water-polo','mens-college-water-polo');",
2766"INSERT INTO `sportsapi` VALUES (121,1,'NCAA Women\\'s Water Polo','water-polo','womens-college-water-polo');",
2767"INSERT INTO `sportsapi` VALUES (200,1,'NCAA Men\\'s Soccer','soccer','usa.ncaa.m.1');",
2768"INSERT INTO `sportsapi` VALUES (201,1,'NCAA Women\\'s Soccer','soccer','usa.ncaa.w.1');",
2769"INSERT INTO `sportsapi` VALUES (202,1,'Major League Soccer','soccer','usa.1');",
2770"INSERT INTO `sportsapi` VALUES (203,1,'English Premier League','soccer','eng.1');",
2771"INSERT INTO `sportsapi` VALUES (204,1,'English League Championship','soccer','eng.2');",
2772"INSERT INTO `sportsapi` VALUES (205,1,'Italian Serie A','soccer','ita.1');",
2773"INSERT INTO `sportsapi` VALUES (206,1,'French Ligue 1','soccer','fra.1');",
2774"INSERT INTO `sportsapi` VALUES (207,1,'French Ligue 2','soccer','fra.2');",
2775"INSERT INTO `sportsapi` VALUES (208,1,'Spanish LaLiga','soccer','esp.1');",
2776"INSERT INTO `sportsapi` VALUES (209,1,'German Bundesliga','soccer','ger.1');",
2777"INSERT INTO `sportsapi` VALUES (210,1,'German 2. Bundesliga','soccer','ger.2');",
2778"INSERT INTO `sportsapi` VALUES (211,1,'Mexican Liga BBVA MX','soccer','mex.1');",
2779"INSERT INTO `sportsapi` VALUES (212,1,'Copa Do Brasil','soccer','bra.copa_do_brazil');",
2780"INSERT INTO `sportsapi` VALUES (213,1,'CONCACAF Leagues Cup','soccer','concacaf.leagues.cup');",
2781"INSERT INTO `sportsapi` VALUES (214,1,'CONCACAF League','soccer','concacaf.league');",
2782"INSERT INTO `sportsapi` VALUES (215,1,'CONCACAF Champions League','soccer','concacaf.champions');",
2783"INSERT INTO `sportsapi` VALUES (216,1,'CONCACAF Nations League','soccer','concacaf.nations.league');",
2784"INSERT INTO `sportsapi` VALUES (217,1,'CONCACAF Gold Cup','soccer','concacaf.gold');",
2785"INSERT INTO `sportsapi` VALUES (218,1,'FIFA World Cup','soccer','fifa.world');",
2786"INSERT INTO `sportsapi` VALUES (219,1,'FIFA World Cup Qualifying - UEFA','soccer','fifa.worldq.uefa');",
2787"INSERT INTO `sportsapi` VALUES (220,1,'FIFA World Cup Qualifying - CONCACAF','soccer','fifa.worldq.concacaf');",
2788"INSERT INTO `sportsapi` VALUES (221,1,'FIFA World Cup Qualifying - CONMEBOL','soccer','fifa.worldq.conmebol');",
2789"INSERT INTO `sportsapi` VALUES (222,1,'FIFA World Cup Qualifying - AFC','soccer','fifa.worldq.afc');",
2790"INSERT INTO `sportsapi` VALUES (223,1,'FIFA World Cup Qualifying - CAF','soccer','fifa.worldq.caf');",
2791"INSERT INTO `sportsapi` VALUES (224,1,'FIFA World Cup Qualifying - OFC','soccer','fifa.worldq.ofc');",
2792"INSERT INTO `sportsapi` VALUES (225,1,'UEFA Champions League','soccer','uefa.champions');",
2793"INSERT INTO `sportsapi` VALUES (226,1,'UEFA Europa League','soccer','uefa.europa');",
2794"INSERT INTO `sportsapi` VALUES (227,1,'UEFA Europa Conference League','soccer','uefa.europa.conf');",
2795"INSERT INTO `sportsapi` VALUES (228,1,'English Carabao Cup','soccer','eng.league_cup');",
2796"INSERT INTO `sportsapi` VALUES (229,1,'USL Championship','soccer','usa.usl.1');",
2797"INSERT INTO `sportsapi` VALUES (230,1,'United States NWSL','soccer','usa.nwsl');",
2798"INSERT INTO `sportsapi` VALUES (231,1,'FA Women\\'s Super League','soccer','eng.w.1');",
2799"INSERT INTO `sportsapi` VALUES (232,1,'English FA Cup','soccer','eng.fa');",
2800"INSERT INTO `sportsapi` VALUES (233,1,'Spanish Copa del Rey','soccer','esp.copa_del_rey');",
2801"INSERT INTO `sportsapi` VALUES (234,1,'German DFB Pokal','soccer','ger.dfb_pokal');",
2802"INSERT INTO `sportsapi` VALUES (235,1,'Italian Coppa Italia','soccer','ita.coppa_italia');",
2803"INSERT INTO `sportsapi` VALUES (236,1,'French Coupe de France','soccer','fra.coupe_de_france');",
2804"INSERT INTO `sportsapi` VALUES (237,1,'AFC Champions League','soccer','afc.champions');",
2805"INSERT INTO `sportsapi` VALUES (238,1,'Dutch KNVB Beker','soccer','ned.cup');",
2806"INSERT INTO `sportsapi` VALUES (239,1,'Dutch Eredivisie','soccer','ned.1');",
2807"INSERT INTO `sportsapi` VALUES (240,1,'Portuguese Liga','soccer','por.1');",
2808"INSERT INTO `sportsapi` VALUES (241,1,'Russian Premier League','soccer','rus.1');",
2809"INSERT INTO `sportsapi` VALUES (242,1,'Mexican Liga de Expansión MX','soccer','mex.2');",
2810"INSERT INTO `sportsapi` VALUES (243,1,'Mexican Copa MX','soccer','mex.copa_mx');",
2811"INSERT INTO `sportsapi` VALUES (244,1,'Campeones Cup','soccer','campeones.cup');",
2812"INSERT INTO `sportsapi` VALUES (245,1,'United States Open Cup','soccer','usa.open');",
2813"INSERT INTO `sportsapi` VALUES (246,1,'USL League One','soccer','usa.usl.l1');",
2814"INSERT INTO `sportsapi` VALUES (247,1,'Scottish Premiership','soccer','sco.1');",
2815"INSERT INTO `sportsapi` VALUES (248,1,'Chinese Super League','soccer','chn.1');",
2816"INSERT INTO `sportsapi` VALUES (249,1,'Australian A-League','soccer','aus.1');",
2817"INSERT INTO `sportsapi` VALUES (250,1,'International Friendly','soccer','fifa.friendly');",
2818"INSERT INTO `sportsapi` VALUES (251,1,'Women\\'s International Friendly','soccer','fifa.friendly.w');",
2819"INSERT INTO `sportsapi` VALUES (252,1,'UEFA European Under-21 Championship Qualifying','soccer','uefa.euro_u21_qual');",
2820"INSERT INTO `sportsapi` VALUES (253,1,'FIFA Women\\'s World Cup','soccer','fifa.wwc');",
2821"INSERT INTO `sportsapi` VALUES (254,1,'FIFA Club World Cup','soccer','fifa.cwc');",
2822"INSERT INTO `sportsapi` VALUES (255,1,'CONCACAF Gold Cup Qualifying','soccer','concacaf.gold_qual');",
2823"INSERT INTO `sportsapi` VALUES (256,1,'CONCACAF Nations League Qualifying','soccer','concacaf.nations.league_qual');",
2824"INSERT INTO `sportsapi` VALUES (257,1,'CONCACAF Cup','soccer','concacaf.confederations_playoff');",
2825"INSERT INTO `sportsapi` VALUES (258,1,'UEFA Nations League','soccer','uefa.nations');",
2826"INSERT INTO `sportsapi` VALUES (259,1,'UEFA European Championship','soccer','uefa.euro');",
2827"INSERT INTO `sportsapi` VALUES (260,1,'UEFA European Championship Qualifying','soccer','uefa.euroq');",
2828"INSERT INTO `sportsapi` VALUES (261,1,'Copa America','soccer','conmebol.america');",
2829"INSERT INTO `sportsapi` VALUES (262,1,'AFC Asian Cup','soccer','afc.asian.cup');",
2830"INSERT INTO `sportsapi` VALUES (263,1,'AFC Asian Cup Qualifiers','soccer','afc.cupq');",
2831"INSERT INTO `sportsapi` VALUES (264,1,'Africa Cup of Nations qualifying','soccer','caf.nations_qual');",
2832"INSERT INTO `sportsapi` VALUES (265,1,'Africa Cup of Nations','soccer','caf.nations');",
2833"INSERT INTO `sportsapi` VALUES (266,1,'Africa Nations Championship','soccer','caf.championship');",
2834"INSERT INTO `sportsapi` VALUES (267,1,'WAFU Cup of Nations','soccer','wafu.nations');",
2835"INSERT INTO `sportsapi` VALUES (268,1,'SheBelieves Cup','soccer','fifa.shebelieves');",
2836"INSERT INTO `sportsapi` VALUES (269,1,'FIFA Confederations Cup','soccer','fifa.confederations');",
2837"INSERT INTO `sportsapi` VALUES (270,1,'Non-FIFA Friendly','soccer','nonfifa');",
2838"INSERT INTO `sportsapi` VALUES (271,1,'Spanish LaLiga 2','soccer','esp.2');",
2839"INSERT INTO `sportsapi` VALUES (272,1,'Spanish Supercopa','soccer','esp.super_cup');",
2840"INSERT INTO `sportsapi` VALUES (273,1,'Portuguese Liga Promotion/Relegation Playoffs','soccer','por.1.promotion.relegation');",
2841"INSERT INTO `sportsapi` VALUES (274,1,'Belgian First Division A - Promotion/Relegation Playoffs','soccer','bel.promotion.relegation');",
2842"INSERT INTO `sportsapi` VALUES (275,1,'Belgian First Division A','soccer','bel.1');",
2843"INSERT INTO `sportsapi` VALUES (276,1,'Austrian Bundesliga','soccer','aut.1');",
2844"INSERT INTO `sportsapi` VALUES (277,1,'Turkish Super Lig','soccer','tur.1');",
2845"INSERT INTO `sportsapi` VALUES (278,1,'Austrian Bundesliga Promotion/Relegation Playoffs','soccer','aut.promotion.relegation');",
2846"INSERT INTO `sportsapi` VALUES (279,1,'Greek Super League','soccer','gre.1');",
2847"INSERT INTO `sportsapi` VALUES (280,1,'Greek Super League Promotion/Relegation Playoffs','soccer','gre.1.promotion.relegation');",
2848"INSERT INTO `sportsapi` VALUES (281,1,'Swiss Super League','soccer','sui.1');",
2849"INSERT INTO `sportsapi` VALUES (282,1,'Swiss Super League Promotion/Relegation Playoffs','soccer','sui.1.promotion.relegation');",
2850"INSERT INTO `sportsapi` VALUES (283,1,'UEFA Women\\'s Champions League','soccer','uefa.wchampions');",
2851"INSERT INTO `sportsapi` VALUES (284,1,'International Champions Cup','soccer','global.champs_cup');",
2852"INSERT INTO `sportsapi` VALUES (285,1,'Women\\'s International Champions Cup','soccer','global.wchamps_cup');",
2853"INSERT INTO `sportsapi` VALUES (286,1,'Club Friendly','soccer','club.friendly');",
2854"INSERT INTO `sportsapi` VALUES (287,1,'UEFA Champions League Qualifying','soccer','uefa.champions_qual');",
2855"INSERT INTO `sportsapi` VALUES (288,1,'UEFA Europa Conference League Qualifying','soccer','uefa.europa.conf_qual');",
2856"INSERT INTO `sportsapi` VALUES (289,1,'UEFA Europa League Qualifying','soccer','uefa.europa_qual');",
2857"INSERT INTO `sportsapi` VALUES (290,1,'UEFA Super Cup','soccer','uefa.super_cup');",
2858"INSERT INTO `sportsapi` VALUES (291,1,'English FA Community Shield','soccer','eng.charity');",
2859"INSERT INTO `sportsapi` VALUES (292,1,'Supercoppa Italiana','soccer','ita.super_cup');",
2860"INSERT INTO `sportsapi` VALUES (293,1,'French Trophee des Champions','soccer','fra.super_cup');",
2861"INSERT INTO `sportsapi` VALUES (294,1,'Dutch Johan Cruyff Shield','soccer','ned.supercup');",
2862"INSERT INTO `sportsapi` VALUES (295,1,'Trofeo Joan Gamper','soccer','esp.joan_gamper');",
2863"INSERT INTO `sportsapi` VALUES (296,1,'German DFL-Supercup','soccer','ger.super_cup');",
2864"INSERT INTO `sportsapi` VALUES (297,1,'Audi Cup','soccer','ger.audi_cup');",
2865"INSERT INTO `sportsapi` VALUES (298,1,'Premier League Asia Trophy','soccer','eng.asia_trophy');",
2866"INSERT INTO `sportsapi` VALUES (299,1,'Emirates Cup','soccer','friendly.emirates_cup');",
2867"INSERT INTO `sportsapi` VALUES (300,1,'Japanese J League World Challenge','soccer','jpn.world_challenge');",
2868"INSERT INTO `sportsapi` VALUES (301,1,'SuperCopa Euroamericana','soccer','euroamericana.supercopa');",
2869"INSERT INTO `sportsapi` VALUES (302,1,'Men\\'s Olympic Tournament','soccer','fifa.olympics');",
2870"INSERT INTO `sportsapi` VALUES (303,1,'Women\\'s Olympic Tournament','soccer','fifa.w.olympics');",
2871"INSERT INTO `sportsapi` VALUES (304,1,'CONMEBOL Pre-Olympic Tournament','soccer','fifa.conmebol.olympicsq');",
2872"INSERT INTO `sportsapi` VALUES (305,1,'CONCACAF Men\\'s Olympic Qualifying','soccer','fifa.concacaf.olympicsq');",
2873"INSERT INTO `sportsapi` VALUES (306,1,'CONCACAF Women\\'s Olympic Qualifying Tournament','soccer','fifa.w.concacaf.olympicsq');",
2874"INSERT INTO `sportsapi` VALUES (307,1,'CONCACAF Women\\'s Championship','soccer','concacaf.womens.championship');",
2875"INSERT INTO `sportsapi` VALUES (308,1,'FIFA Under-20 World Cup','soccer','fifa.world.u20');",
2876"INSERT INTO `sportsapi` VALUES (309,1,'FIFA Under-17 World Cup','soccer','fifa.world.u17');",
2877"INSERT INTO `sportsapi` VALUES (310,1,'Toulon Tournament','soccer','global.toulon');",
2878"INSERT INTO `sportsapi` VALUES (311,1,'UEFA European Under-21 Championship','soccer','uefa.euro_u21');",
2879"INSERT INTO `sportsapi` VALUES (312,1,'UEFA European Under-19 Championship','soccer','uefa.euro.u19');",
2880"INSERT INTO `sportsapi` VALUES (313,1,'Under-21 International Friendly','soccer','fifa.friendly_u21');",
2881"INSERT INTO `sportsapi` VALUES (314,1,'UEFA Women\\'s European Championship','soccer','uefa.weuro');",
2882"INSERT INTO `sportsapi` VALUES (315,1,'German Bundesliga Promotion/Relegation Playoff','soccer','ger.playoff.relegation');",
2883"INSERT INTO `sportsapi` VALUES (316,1,'German 2. Bundesliga Promotion/Relegation Playoffs','soccer','ger.2.promotion.relegation');",
2884"INSERT INTO `sportsapi` VALUES (317,1,'English Women\\'s FA Cup','soccer','eng.w.fa');",
2885"INSERT INTO `sportsapi` VALUES (318,1,'English Women\\'s FA Community Shield','soccer','eng.w.charity');",
2886"INSERT INTO `sportsapi` VALUES (319,1,'English EFL Trophy','soccer','eng.trophy');",
2887"INSERT INTO `sportsapi` VALUES (320,1,'English National League','soccer','eng.5');",
2888"INSERT INTO `sportsapi` VALUES (321,1,'English League One','soccer','eng.3');",
2889"INSERT INTO `sportsapi` VALUES (322,1,'English League Two','soccer','eng.4');",
2890"INSERT INTO `sportsapi` VALUES (323,1,'Scottish Cup','soccer','sco.tennents');",
2891"INSERT INTO `sportsapi` VALUES (324,1,'Scottish League Cup','soccer','sco.cis');",
2892"INSERT INTO `sportsapi` VALUES (325,1,'Scottish Premiership Promotion/Relegation Playoffs','soccer','sco.1.promotion.relegation');",
2893"INSERT INTO `sportsapi` VALUES (326,1,'Scottish League One','soccer','sco.3');",
2894"INSERT INTO `sportsapi` VALUES (327,1,'Scottish Championship','soccer','sco.2');",
2895"INSERT INTO `sportsapi` VALUES (328,1,'Scottish Championship Promotion/Relegation Playoffs','soccer','sco.2.promotion.relegation');",
2896"INSERT INTO `sportsapi` VALUES (329,1,'Scottish League One Promotion/Relegation Playoffs','soccer','sco.3.promotion.relegation');",
2897"INSERT INTO `sportsapi` VALUES (330,1,'Scottish League Two Promotion/Relegation Playoffs','soccer','sco.4.promotion.relegation');",
2898"INSERT INTO `sportsapi` VALUES (331,1,'Scottish League Two','soccer','sco.4');",
2899"INSERT INTO `sportsapi` VALUES (332,1,'Scottish League Challenge Cup','soccer','sco.challenge');",
2900"INSERT INTO `sportsapi` VALUES (333,1,'Dutch Eredivisie Promotion/Relegation Playoffs','soccer','ned.playoff.relegation');",
2901"INSERT INTO `sportsapi` VALUES (334,1,'Dutch Eredivisie Cup','soccer','ned.w.eredivisie_cup');",
2902"INSERT INTO `sportsapi` VALUES (335,1,'Dutch Keuken Kampioen Divisie','soccer','ned.2');",
2903"INSERT INTO `sportsapi` VALUES (336,1,'Dutch Tweede Divisie','soccer','ned.3');",
2904"INSERT INTO `sportsapi` VALUES (337,1,'Dutch KNVB Beker Vrouwen','soccer','ned.w.knvb_cup');",
2905"INSERT INTO `sportsapi` VALUES (338,1,'Dutch Vrouwen Eredivisie','soccer','ned.w.1');",
2906"INSERT INTO `sportsapi` VALUES (339,1,'Italian Serie B','soccer','ita.2');",
2907"INSERT INTO `sportsapi` VALUES (340,1,'French Ligue 1 Promotion/Relegation Playoffs','soccer','fra.1.promotion.relegation');",
2908"INSERT INTO `sportsapi` VALUES (341,1,'French Ligue 2 Promotion/Relegation Playoffs','soccer','fra.2.promotion.relegation');",
2909"INSERT INTO `sportsapi` VALUES (342,1,'Swedish Allsvenskan','soccer','swe.1');",
2910"INSERT INTO `sportsapi` VALUES (343,1,'Swedish Allsvenskanliga Promotion/Relegation Playoffs','soccer','swe.1.promotion.relegation');",
2911"INSERT INTO `sportsapi` VALUES (344,1,'Danish Superliga','soccer','den.1');",
2912"INSERT INTO `sportsapi` VALUES (345,1,'Danish SAS-Ligaen Promotion/Relegation Playoffs','soccer','den.promotion.relegation');",
2913"INSERT INTO `sportsapi` VALUES (346,1,'Romanian Liga 1 Promotion/Relegation Playoffs','soccer','rou.1.promotion.relegation');",
2914"INSERT INTO `sportsapi` VALUES (347,1,'Romanian Liga 1','soccer','rou.1');",
2915"INSERT INTO `sportsapi` VALUES (348,1,'Norwegian Eliteserien Promotion/Relegation Playoffs','soccer','nor.1.promotion.relegation');",
2916"INSERT INTO `sportsapi` VALUES (349,1,'Norwegian Eliteserien','soccer','nor.1');",
2917"INSERT INTO `sportsapi` VALUES (350,1,'Maltese Premier League','soccer','mlt.1');",
2918"INSERT INTO `sportsapi` VALUES (351,1,'Israeli Premier League','soccer','isr.1');",
2919"INSERT INTO `sportsapi` VALUES (352,1,'Irish Premier Division Promotion/Relegation Playoffs','soccer','ir1.1.promotion.relegation');",
2920"INSERT INTO `sportsapi` VALUES (353,1,'Irish Premier Division','soccer','irl.1');",
2921"INSERT INTO `sportsapi` VALUES (354,1,'Welsh Premier League','soccer','wal.1');",
2922"INSERT INTO `sportsapi` VALUES (355,1,'Northern Irish Premiership','soccer','nir.1');",
2923"INSERT INTO `sportsapi` VALUES (356,1,'CONMEBOL Copa Libertadores','soccer','conmebol.libertadores');",
2924"INSERT INTO `sportsapi` VALUES (357,1,'CONMEBOL Copa Sudamericana','soccer','conmebol.sudamericana');",
2925"INSERT INTO `sportsapi` VALUES (358,1,'CONMEBOL Recopa Sudamericana','soccer','conmebol.recopa');",
2926"INSERT INTO `sportsapi` VALUES (359,1,'Argentine Liga Profesional de Fútbol','soccer','arg.1');",
2927"INSERT INTO `sportsapi` VALUES (360,1,'Copa Argentina','soccer','arg.copa');",
2928"INSERT INTO `sportsapi` VALUES (361,1,'Argentine Copa de la Liga Profesional','soccer','arg.copa_lpf');",
2929"INSERT INTO `sportsapi` VALUES (362,1,'Argentine Copa de la Superliga','soccer','arg.copa_de_la_superliga');",
2930"INSERT INTO `sportsapi` VALUES (363,1,'Argentine Trofeo de Campeones de la Superliga','soccer','arg.trofeo_de_la_campeones');",
2931"INSERT INTO `sportsapi` VALUES (364,1,'Argentine Supercopa','soccer','arg.supercopa');",
2932"INSERT INTO `sportsapi` VALUES (365,1,'Argentine Nacional B','soccer','arg.2');",
2933"INSERT INTO `sportsapi` VALUES (366,1,'Argentine Primera B','soccer','arg.3');",
2934"INSERT INTO `sportsapi` VALUES (367,1,'Argentine Primera C','soccer','arg.4');",
2935"INSERT INTO `sportsapi` VALUES (368,1,'Argentine Primera D','soccer','arg.5');",
2936"INSERT INTO `sportsapi` VALUES (369,1,'Supercopa Do Brazil','soccer','bra.supercopa_do_brazil');",
2937"INSERT INTO `sportsapi` VALUES (370,1,'Brazilian Serie A','soccer','bra.1');",
2938"INSERT INTO `sportsapi` VALUES (371,1,'Brazilian Serie B','soccer','bra.2');",
2939"INSERT INTO `sportsapi` VALUES (372,1,'Brazilian Serie C','soccer','bra.3');",
2940"INSERT INTO `sportsapi` VALUES (373,1,'Copa Do Nordeste','soccer','bra.copa_do_nordeste');",
2941"INSERT INTO `sportsapi` VALUES (374,1,'Brazilian Campeonato Carioca','soccer','bra.camp.carioca');",
2942"INSERT INTO `sportsapi` VALUES (375,1,'Brazilian Campeonato Paulista','soccer','bra.camp.paulista');",
2943"INSERT INTO `sportsapi` VALUES (376,1,'Brazilian Campeonato Gaucho','soccer','bra.camp.gaucho');",
2944"INSERT INTO `sportsapi` VALUES (377,1,'Brazilian Campeonato Mineiro','soccer','bra.camp.mineiro');",
2945"INSERT INTO `sportsapi` VALUES (378,1,'Chilean Primera División','soccer','chi.1');",
2946"INSERT INTO `sportsapi` VALUES (379,1,'Copa Chile','soccer','chi.copa_chi');",
2947"INSERT INTO `sportsapi` VALUES (380,1,'International U20 Friendly','soccer','fifa.u20.friendly');",
2948"INSERT INTO `sportsapi` VALUES (381,1,'Segunda División de Chile','soccer','chi.2');",
2949"INSERT INTO `sportsapi` VALUES (382,1,'Chilean Supercopa','soccer','chi.super_cup');",
2950"INSERT INTO `sportsapi` VALUES (383,1,'Uruguayan Primera Division','soccer','uru.1');",
2951"INSERT INTO `sportsapi` VALUES (384,1,'Segunda División de Uruguay','soccer','uru.2');",
2952"INSERT INTO `sportsapi` VALUES (385,1,'Colombian SuperLiga','soccer','col.superliga');",
2953"INSERT INTO `sportsapi` VALUES (386,1,'Colombian Primera A','soccer','col.1');",
2954"INSERT INTO `sportsapi` VALUES (387,1,'Colombian Primera B','soccer','col.2');",
2955"INSERT INTO `sportsapi` VALUES (388,1,'Peruvian Supercopa','soccer','per.supercopa');",
2956"INSERT INTO `sportsapi` VALUES (389,1,'Copa Colombia','soccer','col.copa');",
2957"INSERT INTO `sportsapi` VALUES (390,1,'Peruvian Primera Profesional','soccer','per.1');",
2958"INSERT INTO `sportsapi` VALUES (391,1,'Paraguayan Primera Division','soccer','par.1');",
2959"INSERT INTO `sportsapi` VALUES (392,1,'Ecuadoran Primera A','soccer','ecu.1');",
2960"INSERT INTO `sportsapi` VALUES (393,1,'Ecuadoran Supercopa','soccer','ecu.supercopa');",
2961"INSERT INTO `sportsapi` VALUES (394,1,'Ecuador Serie B','soccer','ecu.2');",
2962"INSERT INTO `sportsapi` VALUES (395,1,'Venezuelan Primera Profesional','soccer','ven.1');",
2963"INSERT INTO `sportsapi` VALUES (396,1,'United States NWSL Challenge Cup','soccer','usa.nwsl.cup');",
2964"INSERT INTO `sportsapi` VALUES (397,1,'Segunda División de Venezuela','soccer','ven.2');",
2965"INSERT INTO `sportsapi` VALUES (398,1,'Bolivian Liga Profesional','soccer','bol.1');",
2966"INSERT INTO `sportsapi` VALUES (399,1,'Mexican Supercopa MX','soccer','mex.supercopa');",
2967"INSERT INTO `sportsapi` VALUES (400,1,'Mexican Campeon de Campeones','soccer','mex.campeon');",
2968"INSERT INTO `sportsapi` VALUES (401,1,'CONCACAF Champions Cup','soccer','concacaf.champions_cup');",
2969"INSERT INTO `sportsapi` VALUES (402,1,'CONCACAF U23 Tournament','soccer','concacaf.u23');",
2970"INSERT INTO `sportsapi` VALUES (403,1,'Honduran Primera Division','soccer','hon.1');",
2971"INSERT INTO `sportsapi` VALUES (404,1,'Costa Rican Primera Division','soccer','crc.1');",
2972"INSERT INTO `sportsapi` VALUES (405,1,'Jamaican Premier League','soccer','jam.1');",
2973"INSERT INTO `sportsapi` VALUES (406,1,'Guatemalan Liga Nacional','soccer','gua.1');",
2974"INSERT INTO `sportsapi` VALUES (407,1,'Australian W-League','soccer','aus.w.1');",
2975"INSERT INTO `sportsapi` VALUES (408,1,'Salvadoran Primera Division','soccer','slv.1');",
2976"INSERT INTO `sportsapi` VALUES (409,1,'AFF Cup','soccer','aff.championship');",
2977"INSERT INTO `sportsapi` VALUES (410,1,'AFC Cup','soccer','afc.cup');",
2978"INSERT INTO `sportsapi` VALUES (411,1,'SAFF Championship','soccer','afc.saff.championship');",
2979"INSERT INTO `sportsapi` VALUES (412,1,'Chinese Super League Promotion/Relegation Playoffs','soccer','chn.1.promotion.relegation');",
2980"INSERT INTO `sportsapi` VALUES (413,1,'Japanese J League','soccer','jpn.1');",
2981"INSERT INTO `sportsapi` VALUES (414,1,'Indonesian Liga 1','soccer','idn.1');",
2982"INSERT INTO `sportsapi` VALUES (415,1,'Indian Super League','soccer','ind.1');",
2983"INSERT INTO `sportsapi` VALUES (416,1,'Indian I-League','soccer','ind.2');",
2984"INSERT INTO `sportsapi` VALUES (417,1,'Malaysian Super League','soccer','mys.1');",
2985"INSERT INTO `sportsapi` VALUES (418,1,'Singaporean Premier League','soccer','sgp.1');",
2986"INSERT INTO `sportsapi` VALUES (419,1,'Thai League 1','soccer','tha.1');",
2987"INSERT INTO `sportsapi` VALUES (420,1,'Bangabandhu Cup','soccer','bangabandhu.cup');",
2988"INSERT INTO `sportsapi` VALUES (421,1,'COSAFA Cup','soccer','caf.cosafa');",
2989"INSERT INTO `sportsapi` VALUES (422,1,'CAF Champions League','soccer','caf.champions');",
2990"INSERT INTO `sportsapi` VALUES (423,1,'South African Premiership Promotion/Relegation Playoffs','soccer','rsa.1.promotion.relegation');",
2991"INSERT INTO `sportsapi` VALUES (424,1,'CAF Confederations Cup','soccer','caf.confed');",
2992"INSERT INTO `sportsapi` VALUES (425,1,'South African Premiership','soccer','rsa.1');",
2993"INSERT INTO `sportsapi` VALUES (426,1,'South African First Division','soccer','rsa.2');",
2994"INSERT INTO `sportsapi` VALUES (427,1,'South African Telkom Knockout','soccer','rsa.telkom_knockout');",
2995"INSERT INTO `sportsapi` VALUES (428,1,'South African Nedbank Cup','soccer','rsa.nedbank');",
2996"INSERT INTO `sportsapi` VALUES (429,1,'MTN 8 Cup','soccer','rsa.mtn8');",
2997"INSERT INTO `sportsapi` VALUES (430,1,'Nigerian Professional League','soccer','nga.1');",
2998"INSERT INTO `sportsapi` VALUES (431,1,'Ghanaian Premier League','soccer','gha.1');",
2999"INSERT INTO `sportsapi` VALUES (432,1,'Zambian Super League','soccer','zam.1');",
3000"INSERT INTO `sportsapi` VALUES (433,1,'Kenyan Premier League','soccer','ken.1');",
3001"INSERT INTO `sportsapi` VALUES (434,1,'Zimbabwean Premier Soccer League','soccer','zim.1');",
3002"INSERT INTO `sportsapi` VALUES (435,1,'Ugandan Premier League','soccer','uga.1');",
3003"INSERT INTO `sportsapi` VALUES (436,1,'Misc. U.S. Soccer Games','soccer','generic.ussf');",
3004"INSERT INTO `sportsapi` VALUES (1000,2,'Major League Baseball','baseball','mlb');",
3005"INSERT INTO `sportscleanup` VALUES (1,1,1000,'soccer','(SE)','\\\\(\\\\w+\\\\)',0,'');",
3006"INSERT INTO `sportscleanup` VALUES (2,1,1000,'soccer','AFC','\\\\AA\\\\.?F\\\\.?C\\\\.?|\\\\bA\\\\.?F\\\\.?C\\\\.?\\\\Z',0,'');",
3007"INSERT INTO `sportscleanup` VALUES (3,1,1000,'soccer','AC etc.','\\\\AA\\\\.?[AC]\\\\.?|\\\\bA\\\\.?[AC]\\\\.?\\\\Z',0,'');",
3008"INSERT INTO `sportscleanup` VALUES (4,1,1000,'soccer','BK','\\\\AB\\\\.?K\\\\.?|\\\\bB\\\\.?K\\\\.?\\\\Z',0,'');",
3009"INSERT INTO `sportscleanup` VALUES (5,1,1000,'soccer','BSC','\\\\AB\\\\.?S\\\\.?C\\\\.?|\\\\bB\\\\.?S\\\\.?C\\\\.?\\\\Z',0,'');",
3010"INSERT INTO `sportscleanup` VALUES (6,1,1000,'soccer','CSyD','\\\\AC\\\\.?S\\\\.?( y )?D\\\\.?|\\\\bC\\\\.?S\\\\.?( y )?D\\\\.?\\\\Z',0,'');",
3011"INSERT INTO `sportscleanup` VALUES (7,1,1000,'soccer','CD etc.','\\\\AC\\\\.?[ADFRS]\\\\.?|\\\\bC\\\\.?[ADFRS]\\\\.?\\\\Z',0,'');",
3012"INSERT INTO `sportscleanup` VALUES (8,1,1000,'soccer','FC','\\\\AF\\\\.?C\\\\.?|\\\\bF\\\\.?C\\\\.?\\\\Z',0,'');",
3013"INSERT INTO `sportscleanup` VALUES (9,1,1000,'soccer','HSC','\\\\AH\\\\.?S\\\\.?C\\\\.?|\\\\bH\\\\.?S\\\\.?C\\\\.?\\\\Z',0,'');",
3014"INSERT INTO `sportscleanup` VALUES (10,1,1000,'soccer','RC etc.','\\\\AR\\\\.?[BC]\\\\.?|\\\\bR\\\\.?[BC]\\\\.?\\\\Z',0,'');",
3015"INSERT INTO `sportscleanup` VALUES (11,1,1000,'soccer','SC etc.','\\\\AS\\\\.?[ACV]\\\\.?|\\\\bS\\\\.?[ACV]\\\\.?\\\\Z',0,'');",
3016"INSERT INTO `sportscleanup` VALUES (12,1,1000,'soccer','TSG','\\\\AT\\\\.?S\\\\.?G\\\\.?|\\\\bT\\\\.?S\\\\.?G\\\\.?\\\\Z',0,'');",
3017"INSERT INTO `sportscleanup` VALUES (13,1,1000,'soccer','VFB etc.','\\\\AV\\\\.?F\\\\.?[BL]\\\\.?|\\\\bV\\\\.?F\\\\.?[BL]\\\\.?\\\\Z',0,'');",
3018"INSERT INTO `sportscleanup` VALUES (14,1,2000,'all','','Inglaterra',0,'England');",
3019"INSERT INTO `sportscleanup` VALUES (15,1,2000,'all','','Munchen',0,'Munich');",
3020"INSERT INTO `sportscleanup` VALUES (16,1,1100,'basketball','Cal State','Cal State',0,'CSU');",
3021"INSERT INTO `sportscleanup` VALUES (17,1,1000,'basketball','Grambling','Grambling State',0,'Grambling');",
3022"INSERT INTO `sportscleanup` VALUES (18,1,1000,'basketball','Hawaii','Hawaii',0,'Hawai\\'i');",
3023"INSERT INTO `sportscleanup` VALUES (19,1,1000,'basketball','LIU','LIU',0,'Long Island University');",
3024"INSERT INTO `sportscleanup` VALUES (20,1,1100,'basketball','Loyola','Loyola-',0,'Loyola ');",
3025"INSERT INTO `sportscleanup` VALUES (21,1,1000,'basketball','Loyola (Md.)','Loyola (Md.)',0,'Loyola (MD)');",
3026"INSERT INTO `sportscleanup` VALUES (22,1,1000,'basketball','McNeese','McNeese State',0,'McNeese');",
3027"INSERT INTO `sportscleanup` VALUES (23,1,1000,'basketball','Miami (OH)','Miami (Ohio)',0,'Miami (OH)');",
3028"INSERT INTO `sportscleanup` VALUES (24,1,1000,'basketball','UAB','Alabama-Birmingham',0,'UAB');",
3029"INSERT INTO `sportscleanup` VALUES (25,1,1000,'basketball','UConn','Connecticut',0,'UConn');",
3030"INSERT INTO `sportscleanup` VALUES (26,1,1000,'basketball','UMass','Massachusetts',0,'UMass');",
3031"INSERT INTO `sportscleanup` VALUES (27,1,1100,'basketball','UNC','UNC-',0,'UNC ');",
3032"INSERT INTO `sportscleanup` VALUES (28,1,1000,'basketball','UTEP','Texas-El Paso',0,'UTEP');",
3033"INSERT INTO `sportscleanup` VALUES (29,1,1100,'basketball','Texas','Texas-',0,'UT ');",
3034"INSERT INTO `sportscleanup` VALUES (30,1,1000,'basketball','Chattanooga','UT-Chattanooga',0,'Chattanooga');",
3035"INSERT INTO `sportscleanup` VALUES (31,1,1100,'basketball','UT','UT-',0,'UT ');",
3036"INSERT INTO `sportslisting` VALUES (1,1,'\\\\A(?:MLB Baseball)\\\\z');",
3037"INSERT INTO `sportslisting` VALUES (2,1,'\\\\A(?:Béisbol MLB)\\\\z');",
3038"INSERT INTO `sportslisting` VALUES (3,1,'\\\\A(?:MLB All-Star Game)\\\\z');",
3039"INSERT INTO `sportslisting` VALUES (4,1,'\\\\A(?:World Series)\\\\z');",
3040"INSERT INTO `sportslisting` VALUES (5,2,'\\\\A(?:College Baseball)\\\\z');",
3041"INSERT INTO `sportslisting` VALUES (6,2,'\\\\A(?:College World Series)\\\\z');",
3042"INSERT INTO `sportslisting` VALUES (7,3,'\\\\A(?:College Softball)\\\\z');",
3043"INSERT INTO `sportslisting` VALUES (8,4,'\\\\A(?:Women\\'s College World Series)\\\\z');",
3044"INSERT INTO `sportslisting` VALUES (9,10,'\\\\A(?:Béisbol Liga Mexicana)\\\\z');",
3045"INSERT INTO `sportslisting` VALUES (10,20,'\\\\A(?:N\\\\w+ Football)\\\\z');",
3046"INSERT INTO `sportslisting` VALUES (11,20,'\\\\A(?:Super Bowl( [CLXVI]+)?)\\\\z');",
3047"INSERT INTO `sportslisting` VALUES (12,20,'\\\\A(?:Fútbol Americano NFL)\\\\z');",
3048"INSERT INTO `sportslisting` VALUES (13,21,'\\\\A(?:College Football)\\\\z');",
3049"INSERT INTO `sportslisting` VALUES (14,21,'\\\\A(?:\\\\w+ Bowl)\\\\z');",
3050"INSERT INTO `sportslisting` VALUES (15,21,'\\\\A(?:Fútbol Americano de Universitario)\\\\z');",
3051"INSERT INTO `sportslisting` VALUES (16,40,'\\\\A(?:NBA Basketball)\\\\z');",
3052"INSERT INTO `sportslisting` VALUES (17,40,'\\\\A(?:NBA Finals)\\\\z');",
3053"INSERT INTO `sportslisting` VALUES (18,41,'\\\\A(?:WNBA Basketball)\\\\z');",
3054"INSERT INTO `sportslisting` VALUES (19,41,'\\\\A(?:WNBA Finals)\\\\z');",
3055"INSERT INTO `sportslisting` VALUES (20,42,'\\\\A(?:College Basketball)\\\\z');",
3056"INSERT INTO `sportslisting` VALUES (21,42,'\\\\A(?:NCAA Basketball Tournament)\\\\z');",
3057"INSERT INTO `sportslisting` VALUES (22,43,'\\\\A(?:Women\\'s College Basketball)\\\\z');",
3058"INSERT INTO `sportslisting` VALUES (23,43,'\\\\A(?:NCAA Women\\'s Basketball Tournament)\\\\z');",
3059"INSERT INTO `sportslisting` VALUES (24,60,'\\\\A(?:NHL Hockey)\\\\z');",
3060"INSERT INTO `sportslisting` VALUES (25,60,'\\\\A(?:NHL Winter Classic)\\\\z');",
3061"INSERT INTO `sportslisting` VALUES (26,60,'\\\\A(?:NHL \\\\w+ Conference Final)\\\\z');",
3062"INSERT INTO `sportslisting` VALUES (27,60,'\\\\A(?:Stanley Cup Finals)\\\\z');",
3063"INSERT INTO `sportslisting` VALUES (28,61,'\\\\A(?:College Hockey)\\\\z');",
3064"INSERT INTO `sportslisting` VALUES (29,61,'\\\\A(?:Frozen Four)\\\\z');",
3065"INSERT INTO `sportslisting` VALUES (30,62,'\\\\A(?:Women\\'s College Hockey)\\\\z');",
3066"INSERT INTO `sportslisting` VALUES (31,66,'\\\\A(?:College Field Hockey)\\\\z');",
3067"INSERT INTO `sportslisting` VALUES (32,80,'\\\\A(?:College Volleyball)\\\\z');",
3068"INSERT INTO `sportslisting` VALUES (33,81,'\\\\A(?:Women\\'s College Volleyball)\\\\z');",
3069"INSERT INTO `sportslisting` VALUES (34,100,'\\\\A(?:College Lacrosse)\\\\z');",
3070"INSERT INTO `sportslisting` VALUES (35,101,'\\\\A(?:Women\\'s College Lacrosse)\\\\z');",
3071"INSERT INTO `sportslisting` VALUES (36,120,'\\\\A(?:College Water Polo)\\\\z');",
3072"INSERT INTO `sportslisting` VALUES (37,121,'\\\\A(?:Women\\'s College Water Polo)\\\\z');",
3073"INSERT INTO `sportslisting` VALUES (38,200,'\\\\A(?:College Soccer)\\\\z');",
3074"INSERT INTO `sportslisting` VALUES (39,201,'\\\\A(?:Women\\'s College Soccer)\\\\z');",
3075"INSERT INTO `sportslisting` VALUES (40,202,'\\\\A(?:MLS Soccer|Fútbol MLS)\\\\z');",
3076"INSERT INTO `sportslisting` VALUES (41,203,'\\\\A(?:(Premier League|EPL) Soccer)\\\\z');",
3077"INSERT INTO `sportslisting` VALUES (42,203,'\\\\A(?:English Premier League)\\\\z');",
3078"INSERT INTO `sportslisting` VALUES (43,203,'\\\\A(?:Fútbol Premier League)\\\\z');",
3079"INSERT INTO `sportslisting` VALUES (44,205,'\\\\A(?:Italian Serie A Soccer)\\\\z');",
3080"INSERT INTO `sportslisting` VALUES (45,339,'\\\\A(?:Italian Serie B Soccer)\\\\z');",
3081"INSERT INTO `sportslisting` VALUES (46,206,'\\\\A(?:French Ligue 1 Soccer|Fútbol Ligue 1|Fútbol Liga 1)\\\\z');",
3082"INSERT INTO `sportslisting` VALUES (47,207,'\\\\A(?:French Ligue 2 Soccer|Fútbol Ligue 2|Fútbol Liga 2)\\\\z');",
3083"INSERT INTO `sportslisting` VALUES (48,208,'\\\\A(?:Fútbol LaLiga)\\\\z');",
3084"INSERT INTO `sportslisting` VALUES (49,208,'\\\\A(?:Fútbol Español Primera Division)\\\\z');",
3085"INSERT INTO `sportslisting` VALUES (50,208,'\\\\A(?:Spanish Primera Division Soccer)\\\\z');",
3086"INSERT INTO `sportslisting` VALUES (51,209,'\\\\A(?:(German )?Bundesliga Soccer)\\\\z');",
3087"INSERT INTO `sportslisting` VALUES (52,209,'\\\\A(?:Fútbol Bundesliga)\\\\z');",
3088"INSERT INTO `sportslisting` VALUES (53,209,'\\\\A(?:Fútbol Copa de Alemania)\\\\z');",
3089"INSERT INTO `sportslisting` VALUES (54,210,'\\\\A(?:German 2. Bundesliga Soccer)\\\\z');",
3090"INSERT INTO `sportslisting` VALUES (55,211,'\\\\A(?:Fútbol Mexicano Primera División|Fútbol Mexicano Liga Premier|Fútbol Mexicano)\\\\z');",
3091"INSERT INTO `sportslisting` VALUES (56,211,'\\\\A(?:Mexico Primera Division Soccer)\\\\z');",
3092"INSERT INTO `sportslisting` VALUES (57,212,'\\\\A(?:Copa do Brazil Soccer)\\\\z');",
3093"INSERT INTO `sportslisting` VALUES (58,214,'\\\\A(?:CONCACAF League Soccer)\\\\z');",
3094"INSERT INTO `sportslisting` VALUES (59,215,'\\\\A(?:CONCACAF Champions League Soccer)\\\\z');",
3095"INSERT INTO `sportslisting` VALUES (60,216,'\\\\A(?:CONCACAF Nations League Soccer)\\\\z');",
3096"INSERT INTO `sportslisting` VALUES (61,217,'\\\\A(?:CONCACAF Gold Cup Soccer)\\\\z');",
3097"INSERT INTO `sportslisting` VALUES (62,218,'\\\\A(?:FIFA World Cup Soccer)\\\\z');",
3098"INSERT INTO `sportslisting` VALUES (63,219,'\\\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\\\z');",
3099"INSERT INTO `sportslisting` VALUES (64,220,'\\\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\\\z');",
3100"INSERT INTO `sportslisting` VALUES (65,221,'\\\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\\\z');",
3101"INSERT INTO `sportslisting` VALUES (66,222,'\\\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\\\z');",
3102"INSERT INTO `sportslisting` VALUES (67,223,'\\\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\\\z');",
3103"INSERT INTO `sportslisting` VALUES (68,224,'\\\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\\\z');",
3104"INSERT INTO `sportslisting` VALUES (69,225,'\\\\A(?:Fútbol UEFA Champions League)\\\\z');",
3105"INSERT INTO `sportslisting` VALUES (70,225,'\\\\A(?:UEFA Champions League Soccer)\\\\z');",
3106"INSERT INTO `sportslisting` VALUES (71,226,'\\\\A(?:Fútbol UEFA Europa League)\\\\z');",
3107"INSERT INTO `sportslisting` VALUES (72,229,'\\\\A(?:Fútbol USL Championship)\\\\z');",
3108"INSERT INTO `sportslisting` VALUES (73,229,'\\\\A(?:USL Championship Soccer)\\\\z');",
3109"INSERT INTO `sportslisting` VALUES (74,230,'\\\\A(?:NWSL Soccer)\\\\z');",
3110"INSERT INTO `sportslisting` VALUES (75,231,'\\\\A(?:FA Women\\'s Super League)\\\\z');",
3111"INSERT INTO `sportslisting` VALUES (76,242,'\\\\A(?:Fútbol Mexicano Liga Expansión)\\\\z');",
3112"INSERT INTO `sportslisting` VALUES (77,258,'\\\\A(?:UEFA Nations League Soccer)\\\\z');",
3113"INSERT INTO `sportslisting` VALUES (78,258,'\\\\A(?:Fútbol UEFA Nations League)\\\\z');",
3114"INSERT INTO `sportslisting` VALUES (79,271,'\\\\A(?:Fútbol Español Segunda Division)\\\\z');",
3115"INSERT INTO `sportslisting` VALUES (80,277,'\\\\A(?:Fútbol Turco Superliga)\\\\z');",
3116"INSERT INTO `sportslisting` VALUES (81,277,'\\\\A(?:Turkish Super Lig Soccer)\\\\z');",
3117"INSERT INTO `sportslisting` VALUES (82,279,'\\\\A(?:Superleague Greek Soccer)\\\\z');",
3118"INSERT INTO `sportslisting` VALUES (83,356,'\\\\A(?:Fútbol CONMEBOL Libertadores)\\\\z');",
3119"INSERT INTO `sportslisting` VALUES (84,357,'\\\\A(?:Fútbol CONMEBOL Sudamericana)\\\\z');",
3120"INSERT INTO `sportslisting` VALUES (85,359,'\\\\A(?:Fútbol Argentino Primera División)\\\\z');",
3121"INSERT INTO `sportslisting` VALUES (86,360,'\\\\A(?:Fútbol Copa Argentina)\\\\z');",
3122"INSERT INTO `sportslisting` VALUES (87,365,'\\\\A(?:Fútbol Argentino Primera Nacional( B)?)\\\\z');",
3123"INSERT INTO `sportslisting` VALUES (88,366,'\\\\A(?:Fútbol Argentino Primera B)\\\\z');",
3124"INSERT INTO `sportslisting` VALUES (89,367,'\\\\A(?:Fútbol Argentino Primera C)\\\\z');",
3125"INSERT INTO `sportslisting` VALUES (90,368,'\\\\A(?:Fútbol Argentino Primera D)\\\\z');",
3126"INSERT INTO `sportslisting` VALUES (91,386,'\\\\A(?:Fútbol Columbiano Primera División)\\\\z');",
3127"INSERT INTO `sportslisting` VALUES (92,403,'\\\\A(?:Fútbol Hondureño Primera División)\\\\z');",
3128"INSERT INTO `sportslisting` VALUES (93,404,'\\\\A(?:Fútbol Costarricense Primera División)\\\\z');",
3129"INSERT INTO `sportslisting` VALUES (94,1000,'\\\\A(?:MLB Baseball)\\\\z');",
3130"INSERT INTO `sportslisting` VALUES (95,1000,'\\\\A(?:Béisbol MLB)\\\\z');",
3131"INSERT INTO `users` VALUES (1,'admin','bcd911b2ecb15ffbd6d8e6e744d60cf6','0000-00-00 00:00:00');",
3132"INSERT INTO `videotypes` VALUES (1,'txt','',1,0);",
3133"INSERT INTO `videotypes` VALUES (2,'log','',1,0);",
3134"INSERT INTO `videotypes` VALUES (3,'mpg','Internal',0,0);",
3135"INSERT INTO `videotypes` VALUES (4,'avi','',0,1);",
3136"INSERT INTO `videotypes` VALUES (5,'vob','Internal',0,0);",
3137"INSERT INTO `videotypes` VALUES (6,'mpeg','Internal',0,0);",
3138"INSERT INTO `videotypes` VALUES (8,'iso','Internal',0,0);",
3139"INSERT INTO `videotypes` VALUES (9,'img','Internal',0,0);",
3140"INSERT INTO `videotypes` VALUES (10,'mkv','Internal',0,0);",
3141"INSERT INTO `videotypes` VALUES (11,'mp4','Internal',0,0);",
3142"INSERT INTO `videotypes` VALUES (12,'m2ts','Internal',0,0);",
3143"INSERT INTO `videotypes` VALUES (13,'evo','Internal',0,0);",
3144"INSERT INTO `videotypes` VALUES (14,'divx','Internal',0,0);",
3145"INSERT INTO `videotypes` VALUES (15,'mov','Internal',0,0);",
3146"INSERT INTO `videotypes` VALUES (16,'qt','Internal',0,0);",
3147"INSERT INTO `videotypes` VALUES (17,'wmv','Internal',0,0);",
3148"INSERT INTO `videotypes` VALUES (18,'3gp','Internal',0,0);",
3149"INSERT INTO `videotypes` VALUES (19,'asf','Internal',0,0);",
3150"INSERT INTO `videotypes` VALUES (20,'ogg','Internal',0,0);",
3151"INSERT INTO `videotypes` VALUES (21,'ogm','Internal',0,0);",
3152"INSERT INTO `videotypes` VALUES (22,'flv','Internal',0,0);",
3153"INSERT INTO `videotypes` VALUES (23,'ogv','Internal',0,0);",
3154"INSERT INTO `videotypes` VALUES (25,'nut','Internal',0,0);",
3155"INSERT INTO `videotypes` VALUES (26,'mxf','Internal',0,0);",
3156"INSERT INTO `videotypes` VALUES (27,'m4v','Internal',0,0);",
3157"INSERT INTO `videotypes` VALUES (28,'rm','Internal',0,0);",
3158"INSERT INTO `videotypes` VALUES (29,'ts','Internal',0,0);",
3159"INSERT INTO `videotypes` VALUES (30,'swf','Internal',0,0);",
3160"INSERT INTO `videotypes` VALUES (31,'f4v','Internal',0,0);",
3161"INSERT INTO `videotypes` VALUES (32,'nuv','Internal',0,0);"
3162
3163// NOLINTEND(modernize-raw-string-literal)
3164
3165};
3166
3167 QString dbver = "";
3168 if (!performActualUpdate("MythTV", "DBSchemaVer",
3169 updates, "1382", dbver))
3170 return false;
3171
3172 GetMythDB()->SetHaveSchema(true);
3173
3174 return true;
3175}
3176
3178{
3179 switch (version)
3180 {
3181 case -1:
3182 return {
3183 R"(DROP TABLE IF EXISTS sportscleanup;)",
3184 R"(DROP TABLE IF EXISTS sportslisting;)",
3185 R"(DROP TABLE IF EXISTS sportsapi;)",
3186 };
3187
3188 case 0:
3189 return {
3190 R"(ALTER TABLE record ADD COLUMN autoextend
3191 TINYINT UNSIGNED DEFAULT 0;)",
3192 };
3193
3194 case 1:
3195 return {
3196 R"(CREATE TABLE sportsapi (
3197 id INT UNSIGNED PRIMARY KEY,
3198 provider TINYINT UNSIGNED DEFAULT 0,
3199 name VARCHAR(128) NOT NULL,
3200 key1 VARCHAR(64) NOT NULL,
3201 key2 VARCHAR(64) NOT NULL,
3202 UNIQUE(provider,key1(25),key2(50))
3203 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;)",
3204 R"(INSERT INTO sportsapi
3205 VALUES
3206 ( 1,1,'Major League Baseball','baseball','mlb'),
3207 ( 2,1,'NCAA Men''s Baseball','baseball','college-baseball'),
3208 ( 3,1,'NCAA Women''s Softball','baseball','college-softball'),
3209 ( 4,1,'Olympic Men''s Baseball','baseball','olympics-baseball'),
3210 ( 5,1,'World Baseball Classic','baseball','world-baseball-classic'),
3211 ( 6,1,'Little League Baseball','baseball','llb'),
3212 ( 7,1,'Caribbean Series','baseball','caribbean-series'),
3213 ( 8,1,'Dominican Winter League','baseball','dominican-winter-league'),
3214 ( 9,1,'Venezuelan Winter League','baseball','venezuelan-winter-league'),
3215 ( 10,1,'Mexican League','baseball','mexican-winter-league'),
3216 ( 11,1,'Puerto Rican Winter League','baseball','puerto-rican-winter-league');)",
3217
3218 R"(INSERT INTO sportsapi
3219 VALUES
3220 ( 20,1,'National Football League','football','nfl'),
3221 ( 21,1,'NCAA - Football','football','college-football'),
3222 ( 22,1,'XFL','football','xfl'),
3223 ( 23,1,'Canadian Football League','football','cfl');)",
3224
3225 R"(INSERT INTO sportsapi
3226 VALUES
3227 ( 40,1,'National Basketball Association','basketball','nba'),
3228 ( 41,1,'Women''s National Basketball Association','basketball','wnba'),
3229 ( 42,1,'NCAA Men''s Basketball','basketball','mens-college-basketball'),
3230 ( 43,1,'NCAA Women''s Basketball','basketball','womens-college-basketball'),
3231 ( 44,1,'Olympics Men''s Basketball','basketball','mens-olympic-basketball'),
3232 ( 45,1,'Olympics Women''s Basketball','basketball','womens-olympic-basketball'),
3233 ( 46,1,'National Basketball Association Summer League Las Vegas','basketball','nba-summer-las-vegas'),
3234 ( 47,1,'National Basketball Association Summer League Utah','basketball','nba-summer-utah'),
3235 ( 48,1,'National Basketball Association Summer League Orlando','basketball','nba-summer-orlando'),
3236 ( 49,1,'National Basketball Association Summer League Sacramento','basketball','nba-summer-sacramento'),
3237 ( 50,1,'NBA G League','basketball','nba-development'),
3238 ( 51,1,'International Basketball Federation','basketball','fiba');)",
3239
3240 R"(INSERT INTO sportsapi
3241 VALUES
3242 ( 60,1,'National Hockey League','hockey','nfl'),
3243 ( 61,1,'NCAA Men''s Ice Hockey','hockey','mens-college-hockey'),
3244 ( 62,1,'NCAA Women''s Hockey','hockey','womens-college-hockey'),
3245 ( 63,1,'World Cup of Hockey','hockey','hockey-world-cup'),
3246 ( 64,1,'Men''s Olympic Ice Hockey','hockey','mens-olympic-hockey'),
3247 ( 65,1,'Women''s Olympic Ice Hockey','hockey','womens-olympic-hockey'),
3248 ( 66,1,'NCAA Women''s Field Hockey','field-hockey','womens-college-field-hockey');)",
3249
3250 R"(INSERT INTO sportsapi
3251 VALUES
3252 ( 80,1,'NCAA Men''s Volleyball','volleyball','mens-college-volleyball'),
3253 ( 81,1,'NCAA Women''s Volleyball','volleyball','womens-college-volleyball');)",
3254
3255 R"(INSERT INTO sportsapi
3256 VALUES
3257 ( 100,1,'NCAA Men''s Lacrosse','lacrosse','mens-college-lacrosse'),
3258 ( 101,1,'NCAA Women''s Lacrosse','lacrosse','womens-college-lacrosse');)",
3259
3260 R"(INSERT INTO sportsapi
3261 VALUES
3262 ( 120,1,'NCAA Men''s Water Polo','water-polo','mens-college-water-polo'),
3263 ( 121,1,'NCAA Women''s Water Polo','water-polo','womens-college-water-polo');)",
3264
3265 R"(INSERT INTO sportsapi
3266 VALUES
3267 ( 200,1,'NCAA Men''s Soccer','soccer','usa.ncaa.m.1'),
3268 ( 201,1,'NCAA Women''s Soccer','soccer','usa.ncaa.w.1'),
3269 ( 202,1,'Major League Soccer','soccer','usa.1'),
3270 ( 203,1,'English Premier League','soccer','eng.1'),
3271 ( 204,1,'English League Championship','soccer','eng.2'),
3272 ( 205,1,'Italian Serie A','soccer','ita.1'),
3273 ( 206,1,'French Ligue 1','soccer','fra.1'),
3274 ( 207,1,'French Ligue 2','soccer','fra.2'),
3275 ( 208,1,'Spanish LaLiga','soccer','esp.1'),
3276 ( 209,1,'German Bundesliga','soccer','ger.1'),
3277 ( 210,1,'German 2. Bundesliga','soccer','ger.2'),
3278 ( 211,1,'Mexican Liga BBVA MX','soccer','mex.1'),
3279 ( 212,1,'Copa Do Brasil','soccer','bra.copa_do_brazil'),
3280 ( 213,1,'CONCACAF Leagues Cup','soccer','concacaf.leagues.cup'),
3281 ( 214,1,'CONCACAF League','soccer','concacaf.league'),
3282 ( 215,1,'CONCACAF Champions League','soccer','concacaf.champions'),
3283 ( 216,1,'CONCACAF Nations League','soccer','concacaf.nations.league'),
3284 ( 217,1,'CONCACAF Gold Cup','soccer','concacaf.gold'),
3285 ( 218,1,'FIFA World Cup','soccer','fifa.world'),
3286 ( 219,1,'FIFA World Cup Qualifying - UEFA','soccer','fifa.worldq.uefa'),
3287 ( 220,1,'FIFA World Cup Qualifying - CONCACAF','soccer','fifa.worldq.concacaf'),
3288 ( 221,1,'FIFA World Cup Qualifying - CONMEBOL','soccer','fifa.worldq.conmebol'),
3289 ( 222,1,'FIFA World Cup Qualifying - AFC','soccer','fifa.worldq.afc'),
3290 ( 223,1,'FIFA World Cup Qualifying - CAF','soccer','fifa.worldq.caf'),
3291 ( 224,1,'FIFA World Cup Qualifying - OFC','soccer','fifa.worldq.ofc'),
3292 ( 225,1,'UEFA Champions League','soccer','uefa.champions'),
3293 ( 226,1,'UEFA Europa League','soccer','uefa.europa'),
3294 ( 227,1,'UEFA Europa Conference League','soccer','uefa.europa.conf'),
3295 ( 228,1,'English Carabao Cup','soccer','eng.league_cup'),
3296 ( 229,1,'USL Championship','soccer','usa.usl.1'),
3297 ( 230,1,'United States NWSL','soccer','usa.nwsl'),
3298 ( 231,1,'FA Women''s Super League','soccer','eng.w.1'),
3299 ( 232,1,'English FA Cup','soccer','eng.fa'),
3300 ( 233,1,'Spanish Copa del Rey','soccer','esp.copa_del_rey'),
3301 ( 234,1,'German DFB Pokal','soccer','ger.dfb_pokal'),
3302 ( 235,1,'Italian Coppa Italia','soccer','ita.coppa_italia'),
3303 ( 236,1,'French Coupe de France','soccer','fra.coupe_de_france'),
3304 ( 237,1,'AFC Champions League','soccer','afc.champions'),
3305 ( 238,1,'Dutch KNVB Beker','soccer','ned.cup'),
3306 ( 239,1,'Dutch Eredivisie','soccer','ned.1'),
3307 ( 240,1,'Portuguese Liga','soccer','por.1'),
3308 ( 241,1,'Russian Premier League','soccer','rus.1'),
3309 ( 242,1,'Mexican Liga de Expansión MX','soccer','mex.2'),
3310 ( 243,1,'Mexican Copa MX','soccer','mex.copa_mx'),
3311 ( 244,1,'Campeones Cup','soccer','campeones.cup'),
3312 ( 245,1,'United States Open Cup','soccer','usa.open'),
3313 ( 246,1,'USL League One','soccer','usa.usl.l1'),
3314 ( 247,1,'Scottish Premiership','soccer','sco.1'),
3315 ( 248,1,'Chinese Super League','soccer','chn.1'),
3316 ( 249,1,'Australian A-League','soccer','aus.1'),
3317 ( 250,1,'International Friendly','soccer','fifa.friendly'),
3318 ( 251,1,'Women''s International Friendly','soccer','fifa.friendly.w'),
3319 ( 252,1,'UEFA European Under-21 Championship Qualifying','soccer','uefa.euro_u21_qual'),
3320 ( 253,1,'FIFA Women''s World Cup','soccer','fifa.wwc'),
3321 ( 254,1,'FIFA Club World Cup','soccer','fifa.cwc'),
3322 ( 255,1,'CONCACAF Gold Cup Qualifying','soccer','concacaf.gold_qual'),
3323 ( 256,1,'CONCACAF Nations League Qualifying','soccer','concacaf.nations.league_qual'),
3324 ( 257,1,'CONCACAF Cup','soccer','concacaf.confederations_playoff'),
3325 ( 258,1,'UEFA Nations League','soccer','uefa.nations'),
3326 ( 259,1,'UEFA European Championship','soccer','uefa.euro'),
3327 ( 260,1,'UEFA European Championship Qualifying','soccer','uefa.euroq'),
3328 ( 261,1,'Copa America','soccer','conmebol.america'),
3329 ( 262,1,'AFC Asian Cup','soccer','afc.asian.cup'),
3330 ( 263,1,'AFC Asian Cup Qualifiers','soccer','afc.cupq'),
3331 ( 264,1,'Africa Cup of Nations qualifying','soccer','caf.nations_qual'),
3332 ( 265,1,'Africa Cup of Nations','soccer','caf.nations'),
3333 ( 266,1,'Africa Nations Championship','soccer','caf.championship'),
3334 ( 267,1,'WAFU Cup of Nations','soccer','wafu.nations'),
3335 ( 268,1,'SheBelieves Cup','soccer','fifa.shebelieves'),
3336 ( 269,1,'FIFA Confederations Cup','soccer','fifa.confederations'),
3337 ( 270,1,'Non-FIFA Friendly','soccer','nonfifa'),
3338 ( 271,1,'Spanish LaLiga 2','soccer','esp.2'),
3339 ( 272,1,'Spanish Supercopa','soccer','esp.super_cup'),
3340 ( 273,1,'Portuguese Liga Promotion/Relegation Playoffs','soccer','por.1.promotion.relegation'),
3341 ( 274,1,'Belgian First Division A - Promotion/Relegation Playoffs','soccer','bel.promotion.relegation'),
3342 ( 275,1,'Belgian First Division A','soccer','bel.1'),
3343 ( 276,1,'Austrian Bundesliga','soccer','aut.1'),
3344 ( 277,1,'Turkish Super Lig','soccer','tur.1'),
3345 ( 278,1,'Austrian Bundesliga Promotion/Relegation Playoffs','soccer','aut.promotion.relegation'),
3346 ( 279,1,'Greek Super League','soccer','gre.1'),
3347 ( 280,1,'Greek Super League Promotion/Relegation Playoffs','soccer','gre.1.promotion.relegation'),
3348 ( 281,1,'Swiss Super League','soccer','sui.1'),
3349 ( 282,1,'Swiss Super League Promotion/Relegation Playoffs','soccer','sui.1.promotion.relegation'),
3350 ( 283,1,'UEFA Women''s Champions League','soccer','uefa.wchampions'),
3351 ( 284,1,'International Champions Cup','soccer','global.champs_cup'),
3352 ( 285,1,'Women''s International Champions Cup','soccer','global.wchamps_cup'),
3353 ( 286,1,'Club Friendly','soccer','club.friendly'),
3354 ( 287,1,'UEFA Champions League Qualifying','soccer','uefa.champions_qual'),
3355 ( 288,1,'UEFA Europa Conference League Qualifying','soccer','uefa.europa.conf_qual'),
3356 ( 289,1,'UEFA Europa League Qualifying','soccer','uefa.europa_qual'),
3357 ( 290,1,'UEFA Super Cup','soccer','uefa.super_cup'),
3358 ( 291,1,'English FA Community Shield','soccer','eng.charity'),
3359 ( 292,1,'Supercoppa Italiana','soccer','ita.super_cup'),
3360 ( 293,1,'French Trophee des Champions','soccer','fra.super_cup'),
3361 ( 294,1,'Dutch Johan Cruyff Shield','soccer','ned.supercup'),
3362 ( 295,1,'Trofeo Joan Gamper','soccer','esp.joan_gamper'),
3363 ( 296,1,'German DFL-Supercup','soccer','ger.super_cup'),
3364 ( 297,1,'Audi Cup','soccer','ger.audi_cup'),
3365 ( 298,1,'Premier League Asia Trophy','soccer','eng.asia_trophy'),
3366 ( 299,1,'Emirates Cup','soccer','friendly.emirates_cup'),
3367 ( 300,1,'Japanese J League World Challenge','soccer','jpn.world_challenge'),
3368 ( 301,1,'SuperCopa Euroamericana','soccer','euroamericana.supercopa'),
3369 ( 302,1,'Men''s Olympic Tournament','soccer','fifa.olympics'),
3370 ( 303,1,'Women''s Olympic Tournament','soccer','fifa.w.olympics'),
3371 ( 304,1,'CONMEBOL Pre-Olympic Tournament','soccer','fifa.conmebol.olympicsq'),
3372 ( 305,1,'CONCACAF Men''s Olympic Qualifying','soccer','fifa.concacaf.olympicsq'),
3373 ( 306,1,'CONCACAF Women''s Olympic Qualifying Tournament','soccer','fifa.w.concacaf.olympicsq'),
3374 ( 307,1,'CONCACAF Women''s Championship','soccer','concacaf.womens.championship'),
3375 ( 308,1,'FIFA Under-20 World Cup','soccer','fifa.world.u20'),
3376 ( 309,1,'FIFA Under-17 World Cup','soccer','fifa.world.u17'),
3377 ( 310,1,'Toulon Tournament','soccer','global.toulon'),
3378 ( 311,1,'UEFA European Under-21 Championship','soccer','uefa.euro_u21'),
3379 ( 312,1,'UEFA European Under-19 Championship','soccer','uefa.euro.u19'),
3380 ( 313,1,'Under-21 International Friendly','soccer','fifa.friendly_u21'),
3381 ( 314,1,'UEFA Women''s European Championship','soccer','uefa.weuro'),
3382 ( 315,1,'German Bundesliga Promotion/Relegation Playoff','soccer','ger.playoff.relegation'),
3383 ( 316,1,'German 2. Bundesliga Promotion/Relegation Playoffs','soccer','ger.2.promotion.relegation'),
3384 ( 317,1,'English Women''s FA Cup','soccer','eng.w.fa'),
3385 ( 318,1,'English Women''s FA Community Shield','soccer','eng.w.charity'),
3386 ( 319,1,'English EFL Trophy','soccer','eng.trophy'),
3387 ( 320,1,'English National League','soccer','eng.5'),
3388 ( 321,1,'English League One','soccer','eng.3'),
3389 ( 322,1,'English League Two','soccer','eng.4'),
3390 ( 323,1,'Scottish Cup','soccer','sco.tennents'),
3391 ( 324,1,'Scottish League Cup','soccer','sco.cis'),
3392 ( 325,1,'Scottish Premiership Promotion/Relegation Playoffs','soccer','sco.1.promotion.relegation'),
3393 ( 326,1,'Scottish League One','soccer','sco.3'),
3394 ( 327,1,'Scottish Championship','soccer','sco.2'),
3395 ( 328,1,'Scottish Championship Promotion/Relegation Playoffs','soccer','sco.2.promotion.relegation'),
3396 ( 329,1,'Scottish League One Promotion/Relegation Playoffs','soccer','sco.3.promotion.relegation'),
3397 ( 330,1,'Scottish League Two Promotion/Relegation Playoffs','soccer','sco.4.promotion.relegation'),
3398 ( 331,1,'Scottish League Two','soccer','sco.4'),
3399 ( 332,1,'Scottish League Challenge Cup','soccer','sco.challenge'),
3400 ( 333,1,'Dutch Eredivisie Promotion/Relegation Playoffs','soccer','ned.playoff.relegation'),
3401 ( 334,1,'Dutch Eredivisie Cup','soccer','ned.w.eredivisie_cup'),
3402 ( 335,1,'Dutch Keuken Kampioen Divisie','soccer','ned.2'),
3403 ( 336,1,'Dutch Tweede Divisie','soccer','ned.3'),
3404 ( 337,1,'Dutch KNVB Beker Vrouwen','soccer','ned.w.knvb_cup'),
3405 ( 338,1,'Dutch Vrouwen Eredivisie','soccer','ned.w.1'),
3406 ( 339,1,'Italian Serie B','soccer','ita.2'),
3407 ( 340,1,'French Ligue 1 Promotion/Relegation Playoffs','soccer','fra.1.promotion.relegation'),
3408 ( 341,1,'French Ligue 2 Promotion/Relegation Playoffs','soccer','fra.2.promotion.relegation'),
3409 ( 342,1,'Swedish Allsvenskan','soccer','swe.1'),
3410 ( 343,1,'Swedish Allsvenskanliga Promotion/Relegation Playoffs','soccer','swe.1.promotion.relegation'),
3411 ( 344,1,'Danish Superliga','soccer','den.1'),
3412 ( 345,1,'Danish SAS-Ligaen Promotion/Relegation Playoffs','soccer','den.promotion.relegation'),
3413 ( 346,1,'Romanian Liga 1 Promotion/Relegation Playoffs','soccer','rou.1.promotion.relegation'),
3414 ( 347,1,'Romanian Liga 1','soccer','rou.1'),
3415 ( 348,1,'Norwegian Eliteserien Promotion/Relegation Playoffs','soccer','nor.1.promotion.relegation'),
3416 ( 349,1,'Norwegian Eliteserien','soccer','nor.1'),
3417 ( 350,1,'Maltese Premier League','soccer','mlt.1'),
3418 ( 351,1,'Israeli Premier League','soccer','isr.1'),
3419 ( 352,1,'Irish Premier Division Promotion/Relegation Playoffs','soccer','ir1.1.promotion.relegation'),
3420 ( 353,1,'Irish Premier Division','soccer','irl.1'),
3421 ( 354,1,'Welsh Premier League','soccer','wal.1'),
3422 ( 355,1,'Northern Irish Premiership','soccer','nir.1'),
3423 ( 356,1,'CONMEBOL Copa Libertadores','soccer','conmebol.libertadores'),
3424 ( 357,1,'CONMEBOL Copa Sudamericana','soccer','conmebol.sudamericana'),
3425 ( 358,1,'CONMEBOL Recopa Sudamericana','soccer','conmebol.recopa'),
3426 ( 359,1,'Argentine Liga Profesional de Fútbol','soccer','arg.1'),
3427 ( 360,1,'Copa Argentina','soccer','arg.copa'),
3428 ( 361,1,'Argentine Copa de la Liga Profesional','soccer','arg.copa_lpf'),
3429 ( 362,1,'Argentine Copa de la Superliga','soccer','arg.copa_de_la_superliga'),
3430 ( 363,1,'Argentine Trofeo de Campeones de la Superliga','soccer','arg.trofeo_de_la_campeones'),
3431 ( 364,1,'Argentine Supercopa','soccer','arg.supercopa'),
3432 ( 365,1,'Argentine Nacional B','soccer','arg.2'),
3433 ( 366,1,'Argentine Primera B','soccer','arg.3'),
3434 ( 367,1,'Argentine Primera C','soccer','arg.4'),
3435 ( 368,1,'Argentine Primera D','soccer','arg.5'),
3436 ( 369,1,'Supercopa Do Brazil','soccer','bra.supercopa_do_brazil'),
3437 ( 370,1,'Brazilian Serie A','soccer','bra.1'),
3438 ( 371,1,'Brazilian Serie B','soccer','bra.2'),
3439 ( 372,1,'Brazilian Serie C','soccer','bra.3'),
3440 ( 373,1,'Copa Do Nordeste','soccer','bra.copa_do_nordeste'),
3441 ( 374,1,'Brazilian Campeonato Carioca','soccer','bra.camp.carioca'),
3442 ( 375,1,'Brazilian Campeonato Paulista','soccer','bra.camp.paulista'),
3443 ( 376,1,'Brazilian Campeonato Gaucho','soccer','bra.camp.gaucho'),
3444 ( 377,1,'Brazilian Campeonato Mineiro','soccer','bra.camp.mineiro'),
3445 ( 378,1,'Chilean Primera División','soccer','chi.1'),
3446 ( 379,1,'Copa Chile','soccer','chi.copa_chi'),
3447 ( 380,1,'International U20 Friendly','soccer','fifa.u20.friendly'),
3448 ( 381,1,'Segunda División de Chile','soccer','chi.2'),
3449 ( 382,1,'Chilean Supercopa','soccer','chi.super_cup'),
3450 ( 383,1,'Uruguayan Primera Division','soccer','uru.1'),
3451 ( 384,1,'Segunda División de Uruguay','soccer','uru.2'),
3452 ( 385,1,'Colombian SuperLiga','soccer','col.superliga'),
3453 ( 386,1,'Colombian Primera A','soccer','col.1'),
3454 ( 387,1,'Colombian Primera B','soccer','col.2'),
3455 ( 388,1,'Peruvian Supercopa','soccer','per.supercopa'),
3456 ( 389,1,'Copa Colombia','soccer','col.copa'),
3457 ( 390,1,'Peruvian Primera Profesional','soccer','per.1'),
3458 ( 391,1,'Paraguayan Primera Division','soccer','par.1'),
3459 ( 392,1,'Ecuadoran Primera A','soccer','ecu.1'),
3460 ( 393,1,'Ecuadoran Supercopa','soccer','ecu.supercopa'),
3461 ( 394,1,'Ecuador Serie B','soccer','ecu.2'),
3462 ( 395,1,'Venezuelan Primera Profesional','soccer','ven.1'),
3463 ( 396,1,'United States NWSL Challenge Cup','soccer','usa.nwsl.cup'),
3464 ( 397,1,'Segunda División de Venezuela','soccer','ven.2'),
3465 ( 398,1,'Bolivian Liga Profesional','soccer','bol.1'),
3466 ( 399,1,'Mexican Supercopa MX','soccer','mex.supercopa'),
3467 ( 400,1,'Mexican Campeon de Campeones','soccer','mex.campeon'),
3468 ( 401,1,'CONCACAF Champions Cup','soccer','concacaf.champions_cup'),
3469 ( 402,1,'CONCACAF U23 Tournament','soccer','concacaf.u23'),
3470 ( 403,1,'Honduran Primera Division','soccer','hon.1'),
3471 ( 404,1,'Costa Rican Primera Division','soccer','crc.1'),
3472 ( 405,1,'Jamaican Premier League','soccer','jam.1'),
3473 ( 406,1,'Guatemalan Liga Nacional','soccer','gua.1'),
3474 ( 407,1,'Australian W-League','soccer','aus.w.1'),
3475 ( 408,1,'Salvadoran Primera Division','soccer','slv.1'),
3476 ( 409,1,'AFF Cup','soccer','aff.championship'),
3477 ( 410,1,'AFC Cup','soccer','afc.cup'),
3478 ( 411,1,'SAFF Championship','soccer','afc.saff.championship'),
3479 ( 412,1,'Chinese Super League Promotion/Relegation Playoffs','soccer','chn.1.promotion.relegation'),
3480 ( 413,1,'Japanese J League','soccer','jpn.1'),
3481 ( 414,1,'Indonesian Liga 1','soccer','idn.1'),
3482 ( 415,1,'Indian Super League','soccer','ind.1'),
3483 ( 416,1,'Indian I-League','soccer','ind.2'),
3484 ( 417,1,'Malaysian Super League','soccer','mys.1'),
3485 ( 418,1,'Singaporean Premier League','soccer','sgp.1'),
3486 ( 419,1,'Thai League 1','soccer','tha.1'),
3487 ( 420,1,'Bangabandhu Cup','soccer','bangabandhu.cup'),
3488 ( 421,1,'COSAFA Cup','soccer','caf.cosafa'),
3489 ( 422,1,'CAF Champions League','soccer','caf.champions'),
3490 ( 423,1,'South African Premiership Promotion/Relegation Playoffs','soccer','rsa.1.promotion.relegation'),
3491 ( 424,1,'CAF Confederations Cup','soccer','caf.confed'),
3492 ( 425,1,'South African Premiership','soccer','rsa.1'),
3493 ( 426,1,'South African First Division','soccer','rsa.2'),
3494 ( 427,1,'South African Telkom Knockout','soccer','rsa.telkom_knockout'),
3495 ( 428,1,'South African Nedbank Cup','soccer','rsa.nedbank'),
3496 ( 429,1,'MTN 8 Cup','soccer','rsa.mtn8'),
3497 ( 430,1,'Nigerian Professional League','soccer','nga.1'),
3498 ( 431,1,'Ghanaian Premier League','soccer','gha.1'),
3499 ( 432,1,'Zambian Super League','soccer','zam.1'),
3500 ( 433,1,'Kenyan Premier League','soccer','ken.1'),
3501 ( 434,1,'Zimbabwean Premier Soccer League','soccer','zim.1'),
3502 ( 435,1,'Ugandan Premier League','soccer','uga.1'),
3503 ( 436,1,'Misc. U.S. Soccer Games','soccer','generic.ussf');)",
3504
3505 R"(INSERT INTO sportsapi
3506 VALUES
3507 (1000,2,'Major League Baseball','baseball','mlb');)",
3508
3509 R"(CREATE TABLE sportslisting (
3510 id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
3511 api INT UNSIGNED NOT NULL,
3512 title VARCHAR(128) NOT NULL
3513 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;)",
3514
3515 R"(INSERT INTO sportslisting (api,title)
3516 VALUES
3517 ( 1, '\\A(?:MLB Baseball)\\z'),
3518 ( 1, '\\A(?:Béisbol MLB)\\z'),
3519 ( 1, '\\A(?:MLB All-Star Game)\\z'),
3520 ( 1, '\\A(?:World Series)\\z'),
3521 ( 2, '\\A(?:College Baseball)\\z'),
3522 ( 2, '\\A(?:College World Series)\\z'),
3523 ( 3, '\\A(?:College Softball)\\z'),
3524 ( 4, '\\A(?:Women''s College World Series)\\z'),
3525 ( 10, '\\A(?:Béisbol Liga Mexicana)\\z'),
3526
3527 ( 20, '\\A(?:N\\w+ Football)\\z'),
3528 ( 20, '\\A(?:Super Bowl( [CLXVI]+)?)\\z'),
3529 ( 20, '\\A(?:Fútbol Americano NFL)\\z'),
3530 ( 21, '\\A(?:College Football)\\z'),
3531 ( 21, '\\A(?:\\w+ Bowl)\\z'),
3532 ( 21, '\\A(?:Fútbol Americano de Universitario)\\z'),
3533
3534 ( 40, '\\A(?:NBA Basketball)\\z'),
3535 ( 40, '\\A(?:NBA Finals)\\z'),
3536 ( 41, '\\A(?:WNBA Basketball)\\z'),
3537 ( 41, '\\A(?:WNBA Finals)\\z'),
3538 ( 42, '\\A(?:College Basketball)\\z'),
3539 ( 42, '\\A(?:NCAA Basketball Tournament)\\z'),
3540 ( 43, '\\A(?:Women''s College Basketball)\\z'),
3541 ( 43, '\\A(?:NCAA Women''s Basketball Tournament)\\z'),
3542
3543 ( 60, '\\A(?:NHL Hockey)\\z'),
3544 ( 60, '\\A(?:NHL Winter Classic)\\z'),
3545 ( 60, '\\A(?:NHL \\w+ Conference Final)\\z'),
3546 ( 60, '\\A(?:Stanley Cup Finals)\\z'),
3547 ( 61, '\\A(?:College Hockey)\\z'),
3548 ( 61, '\\A(?:Frozen Four)\\z'),
3549 ( 62, '\\A(?:Women''s College Hockey)\\z'),
3550 ( 66, '\\A(?:College Field Hockey)\\z'),
3551
3552 ( 80, '\\A(?:College Volleyball)\\z'),
3553 ( 81, '\\A(?:Women''s College Volleyball)\\z'),
3554
3555 ( 100, '\\A(?:College Lacrosse)\\z'),
3556 ( 101, '\\A(?:Women''s College Lacrosse)\\z'),
3557
3558 ( 120, '\\A(?:College Water Polo)\\z'),
3559 ( 121, '\\A(?:Women''s College Water Polo)\\z'),
3560
3561 ( 200, '\\A(?:College Soccer)\\z'),
3562 ( 201, '\\A(?:Women''s College Soccer)\\z'),
3563 ( 202, '\\A(?:MLS Soccer|Fútbol MLS)\\z'),
3564 ( 203, '\\A(?:(Premier League|EPL) Soccer)\\z'),
3565 ( 203, '\\A(?:English Premier League)\\z'),
3566 ( 203, '\\A(?:Fútbol Premier League)\\z'),
3567 ( 205, '\\A(?:Italian Serie A Soccer)\\z'),
3568 ( 339, '\\A(?:Italian Serie B Soccer)\\z'),
3569 ( 206, '\\A(?:French Ligue 1 Soccer|Fútbol Ligue 1|Fútbol Liga 1)\\z'),
3570 ( 207, '\\A(?:French Ligue 2 Soccer|Fútbol Ligue 2|Fútbol Liga 2)\\z'),
3571 ( 208, '\\A(?:Fútbol LaLiga)\\z'),
3572 ( 208, '\\A(?:Fútbol Español Primera Division)\\z'),
3573 ( 208, '\\A(?:Spanish Primera Division Soccer)\\z'),
3574 ( 209, '\\A(?:(German )?Bundesliga Soccer)\\z'),
3575 ( 209, '\\A(?:Fútbol Bundesliga)\\z'),
3576 ( 209, '\\A(?:Fútbol Copa de Alemania)\\z'),
3577 ( 210, '\\A(?:German 2. Bundesliga Soccer)\\z'),
3578 ( 211, '\\A(?:Fútbol Mexicano Primera División|Fútbol Mexicano Liga Premier|Fútbol Mexicano)\\z'),
3579 ( 211, '\\A(?:Mexico Primera Division Soccer)\\z'),
3580 ( 212, '\\A(?:Copa do Brazil Soccer)\\z'),
3581 ( 214, '\\A(?:CONCACAF League Soccer)\\z'),
3582 ( 215, '\\A(?:CONCACAF Champions League Soccer)\\z'),
3583 ( 216, '\\A(?:CONCACAF Nations League Soccer)\\z'),
3584 ( 217, '\\A(?:CONCACAF Gold Cup Soccer)\\z'),
3585 ( 218, '\\A(?:FIFA World Cup Soccer)\\z'),
3586 ( 219, '\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\z'),
3587 ( 220, '\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\z'),
3588 ( 221, '\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\z'),
3589 ( 222, '\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\z'),
3590 ( 223, '\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\z'),
3591 ( 224, '\\A(?:FIFA World Cup Qualifying( Soccer)?|FIFA Eliminatorias Copa Mundial)\\z'),
3592 ( 225, '\\A(?:Fútbol UEFA Champions League)\\z'),
3593 ( 225, '\\A(?:UEFA Champions League Soccer)\\z'),
3594 ( 226, '\\A(?:Fútbol UEFA Europa League)\\z'),
3595 ( 229, '\\A(?:Fútbol USL Championship)\\z'),
3596 ( 229, '\\A(?:USL Championship Soccer)\\z'),
3597 ( 230, '\\A(?:NWSL Soccer)\\z'),
3598 ( 231, '\\A(?:FA Women''s Super League)\\z'),
3599 ( 242, '\\A(?:Fútbol Mexicano Liga Expansión)\\z'),
3600 ( 258, '\\A(?:UEFA Nations League Soccer)\\z'),
3601 ( 258, '\\A(?:Fútbol UEFA Nations League)\\z'),
3602 ( 271, '\\A(?:Fútbol Español Segunda Division)\\z'),
3603 ( 277, '\\A(?:Fútbol Turco Superliga)\\z'),
3604 ( 277, '\\A(?:Turkish Super Lig Soccer)\\z'),
3605 ( 279, '\\A(?:Superleague Greek Soccer)\\z'),
3606 ( 356, '\\A(?:Fútbol CONMEBOL Libertadores)\\z'),
3607 ( 357, '\\A(?:Fútbol CONMEBOL Sudamericana)\\z'),
3608 ( 359, '\\A(?:Fútbol Argentino Primera División)\\z'),
3609 ( 360, '\\A(?:Fútbol Copa Argentina)\\z'),
3610 ( 365, '\\A(?:Fútbol Argentino Primera Nacional( B)?)\\z'),
3611 ( 366, '\\A(?:Fútbol Argentino Primera B)\\z'),
3612 ( 367, '\\A(?:Fútbol Argentino Primera C)\\z'),
3613 ( 368, '\\A(?:Fútbol Argentino Primera D)\\z'),
3614 ( 386, '\\A(?:Fútbol Columbiano Primera División)\\z'),
3615 ( 403, '\\A(?:Fútbol Hondureño Primera División)\\z'),
3616 ( 404, '\\A(?:Fútbol Costarricense Primera División)\\z'),
3617
3618 (1000, '\\A(?:MLB Baseball)\\z'),
3619 (1000, '\\A(?:Béisbol MLB)\\z');
3620 )",
3621
3622 R"(CREATE TABLE sportscleanup (
3623 id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
3624 provider TINYINT UNSIGNED DEFAULT 0,
3625 weight INT UNSIGNED NOT NULL,
3626 key1 VARCHAR(256) NOT NULL,
3627 name VARCHAR(256) NOT NULL,
3628 pattern VARCHAR(256) NOT NULL,
3629 nth TINYINT UNSIGNED NOT NULL,
3630 replacement VARCHAR(128) NOT NULL
3631 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;)",
3632
3633 // Sigh. It would be nice if these patterns could use the
3634 // '\b' boundary matching sequence in the first part of
3635 // the match, but the period is not part of the set of
3636 // characters that make up a word, so trying to optionally
3637 // match the final period in the string 'F.C. Foo' with
3638 // the pattern '\.?\b' always fails because period and
3639 // space are both non-word characters and therefore there
3640 // is no word boundary between them. This will always
3641 // match on 'F.C' and never on 'F.C.'.
3642 //
3643 // I have also seen a TV listing where the team name was
3644 // 'F.C.Something' without a space, so the first part of
3645 // these patterns doesn't require a following space in
3646 // order to match. These patterns are case sensitive, so
3647 // the first part shouldn't match part of an ordinary team
3648 // name unless the team name is in all caps.
3649 R"A(INSERT INTO sportscleanup (provider,weight,key1,name,pattern,nth,replacement)
3650 VALUES
3651 (1,1000,'soccer', '(SE)', '\\‍(\\w+\\)', 0, ''),
3652 (1,1000,'soccer', 'AFC', '\\AA\\.?F\\.?C\\.?|\\bA\\.?F\\.?C\\.?\\Z', 0, ''),
3653 (1,1000,'soccer', 'AC etc.', '\\AA\\.?[AC]\\.?|\\bA\\.?[AC]\\.?\\Z', 0, ''),
3654 (1,1000,'soccer', 'BK', '\\AB\\.?K\\.?|\\bB\\.?K\\.?\\Z', 0, ''),
3655 (1,1000,'soccer', 'BSC', '\\AB\\.?S\\.?C\\.?|\\bB\\.?S\\.?C\\.?\\Z', 0, ''),
3656 (1,1000,'soccer', 'CSyD', '\\AC\\.?S\\.?( y )?D\\.?|\\bC\\.?S\\.?( y )?D\\.?\\Z', 0, ''),
3657 (1,1000,'soccer', 'CD etc.', '\\AC\\.?[ADFRS]\\.?|\\bC\\.?[ADFRS]\\.?\\Z', 0, ''),
3658 (1,1000,'soccer', 'FC', '\\AF\\.?C\\.?|\\bF\\.?C\\.?\\Z', 0, ''),
3659 (1,1000,'soccer', 'HSC', '\\AH\\.?S\\.?C\\.?|\\bH\\.?S\\.?C\\.?\\Z', 0, ''),
3660 (1,1000,'soccer', 'RC etc.', '\\AR\\.?[BC]\\.?|\\bR\\.?[BC]\\.?\\Z', 0, ''),
3661 (1,1000,'soccer', 'SC etc.', '\\AS\\.?[ACV]\\.?|\\bS\\.?[ACV]\\.?\\Z', 0, ''),
3662 (1,1000,'soccer', 'TSG', '\\AT\\.?S\\.?G\\.?|\\bT\\.?S\\.?G\\.?\\Z', 0, ''),
3663 (1,1000,'soccer', 'VFB etc.', '\\AV\\.?F\\.?[BL]\\.?|\\bV\\.?F\\.?[BL]\\.?\\Z', 0, ''),
3664 (1,2000,'all', '', 'Inglaterra', 0, 'England'),
3665 (1,2000,'all', '', 'Munchen', 0, 'Munich');
3666 )A",
3667 };
3668 case 2:
3669 return {
3670 // More TV listing name to API name mappings for college
3671 // basketball. Using a weight of 1000 for specific
3672 // changes and 1100 for general changes.
3673 R"A(INSERT INTO sportscleanup (provider,weight,key1,name,pattern,nth,replacement)
3674 VALUES
3675 (1,1100,'basketball', 'Cal State', 'Cal State', 0, 'CSU'),
3676 (1,1000,'basketball', 'Grambling', 'Grambling State', 0, 'Grambling'),
3677 (1,1000,'basketball', 'Hawaii', 'Hawaii', 0, 'Hawai''i'),
3678 (1,1000,'basketball', 'LIU', 'LIU', 0, 'Long Island University'),
3679 (1,1100,'basketball', 'Loyola', 'Loyola-', 0, 'Loyola '),
3680 (1,1000,'basketball', 'Loyola (Md.)', 'Loyola \‍(Md.\)', 0, 'Loyola (MD)'),
3681 (1,1000,'basketball', 'McNeese', 'McNeese State', 0, 'McNeese'),
3682 (1,1000,'basketball', 'Miami (OH)', 'Miami \‍(Ohio\)', 0, 'Miami (OH)'),
3683 (1,1000,'basketball', 'UAB', 'Alabama-Birmingham', 0, 'UAB'),
3684 (1,1000,'basketball', 'UConn', 'Connecticut', 0, 'UConn'),
3685 (1,1000,'basketball', 'UMass', 'Massachusetts', 0, 'UMass'),
3686 (1,1100,'basketball', 'UNC', 'UNC-', 0, 'UNC '),
3687 (1,1000,'basketball', 'UTEP', 'Texas-El Paso', 0, 'UTEP'),
3688 (1,1100,'basketball', 'Texas', 'Texas-', 0, 'UT '),
3689 (1,1000,'basketball', 'Chattanooga', 'UT-Chattanooga', 0, 'Chattanooga'),
3690 (1,1100,'basketball', 'UT', 'UT-', 0, 'UT ');
3691 )A",
3692 };
3693
3694 case 3:
3695 return {
3696 // Missed post-season baseball listing titles for the MLB provider.
3697
3698 R"(INSERT INTO sportslisting (api,title)
3699 VALUES
3700 (1000, '\\A(?:MLB All-Star Game)\\z'),
3701 (1000, '\\A(?:World Series)\\z');
3702 )",
3703 };
3704 case -3:
3705 return {
3706 // Remove data not cleaned up when 1385 reverted to 1384.
3707 R"(DELETE FROM sportslisting WHERE api=1000 AND title LIKE '%All-Star Game%')",
3708 R"(DELETE FROM sportslisting WHERE api=1000 AND title LIKE '%World Series%')",
3709 };
3710
3711 default:
3712 return {};
3713 }
3714}
3715
3716/* vim: set expandtab tabstop=4 shiftwidth=4: */
static void UnlockSchema(MSqlQuery &query)
Definition: dbutil.cpp:857
static bool TryLockSchema(MSqlQuery &query, uint timeout_secs)
Try to get a lock on the table schemalock.
Definition: dbutil.cpp:850
static bool CheckTableColumnExists(const QString &tableName, const QString &columnName)
Checks for the presence of a column in a table in the current database.
Definition: dbutil.cpp:893
static bool IsNewDatabase(void)
Returns true for a new (empty) database.
Definition: dbutil.cpp:78
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:129
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:839
QVariant value(int i) const
Definition: mythdbcon.h:205
int size(void) const
Definition: mythdbcon.h:215
bool isActive(void) const
Definition: mythdbcon.h:216
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:620
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:890
QVariant lastInsertId()
Return the id of the last inserted row.
Definition: mythdbcon.cpp:937
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:814
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:552
void ActivateSettingsCache(bool activate=true)
QString GetSetting(const QString &key, const QString &defaultval="")
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:225
void Set(const QString &Value, const QString &Data)
void SetProfileID(uint Id)
Provides UI and helper functions for DB Schema updates.
Definition: schemawizard.h:26
enum MythSchemaUpgrade PromptForUpgrade(const char *name, bool upgradeAllowed, bool upgradeIfNoUI, int minDBMSmajor=0, int minDBMSminor=0, int minDBMSpoint=0)
Query user, to prevent silent, automatic database upgrades.
static SchemaUpgradeWizard * Get(const QString &DBSchemaSetting, const QString &appName, const QString &upgradeSchemaVal)
Instead of creating a new wizard, use the existing one for its DB backup file & results and expert se...
int Compare(void)
How many schema versions old is the DB?
unsigned int uint
Definition: compat.h:60
bool InitializeMythSchema(void)
command to get the the initial database layout from an empty database:
Definition: dbcheck.cpp:1269
const QString currentDatabaseVersion
Definition: dbcheck.cpp:29
static bool tryUpgradeTVDatabaseSchema(bool upgradeAllowed, bool upgradeIfNoUI, bool informSystemd)
Definition: dbcheck.cpp:415
DBUpdates getRecordingExtenderDbInfo(int version)
Definition: dbcheck.cpp:3177
static bool doUpgradeTVDatabaseSchema(void)
This is called by UpgradeTVDatabaseSchema() to actually upgrade the schema to what MythTV expects.
Definition: dbcheck.cpp:468
bool UpgradeTVDatabaseSchema(const bool upgradeAllowed, const bool upgradeIfNoUI, const bool informSystemd)
Called from outside dbcheck.cpp to update the schema.
Definition: dbcheck.cpp:362
#define MINIMUM_DBMS_VERSION
Definition: dbcheck.cpp:27
static void db_sd_notify(const char *)
Definition: dbcheck.cpp:41
bool performActualUpdate(const QString &component, const QString &versionkey, const DBUpdates &updates, const QString &version, QString &dbver)
bool UpdateDBVersionNumber(const QString &component, const QString &versionkey, const QString &newnumber, QString &dbver)
Updates the schema version stored in the database.
bool performUpdateSeries(const QString &component, const DBUpdates &updates)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythDB * GetMythDB(void)
Definition: mythdb.cpp:50
std::vector< std::string > DBUpdates
Definition: mythdbcheck.h:9
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
static constexpr const char * DEINT_QUALITY_MEDIUM
static constexpr const char * DEINT_QUALITY_HIGH
static constexpr const char * DEINT_QUALITY_SHADER
static constexpr const char * DEINT_QUALITY_LOW
static constexpr const char * DEINT_QUALITY_DRIVER
string version
Definition: giantbomb.py:185
@ MYTH_SCHEMA_ERROR
Definition: schemawizard.h:17
@ MYTH_SCHEMA_UPGRADE
Definition: schemawizard.h:18
@ MYTH_SCHEMA_EXIT
Definition: schemawizard.h:16
@ MYTH_SCHEMA_USE_EXISTING
Definition: schemawizard.h:19