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