Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index on chanid in iptv_channel and channelgroup #991

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mythtv/bindings/perl/MythTV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ package MythTV;
# schema version supported in the main code. We need to check that the schema
# version in the database is as expected by the bindings, which are expected
# to be kept in sync with the main code.
our $SCHEMA_VERSION = "1381";
our $SCHEMA_VERSION = "1382";

# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/MythTV/_versions.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The file MythTV/_versions.py is usually generated by ./configure.
"""

OWN_VERSION = @MYTHTV_PYTHON_OWN_VERSION@
SCHEMA_VERSION = 1381
SCHEMA_VERSION = 1382
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1025
PROTO_VERSION = '91'
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static constexpr const char* MYTH_PROTO_TOKEN { "BuzzOff" };
* mythtv/bindings/php/MythBackend.php
*/

static constexpr const char* MYTH_DATABASE_VERSION { "1381" };
static constexpr const char* MYTH_DATABASE_VERSION { "1382" };

MBASE_PUBLIC const char *GetMythSourceVersion();
MBASE_PUBLIC const char *GetMythSourcePath();
Expand Down
11 changes: 11 additions & 0 deletions mythtv/libs/libmythtv/dbcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4074,6 +4074,17 @@ static bool doUpgradeTVDatabaseSchema(void)
return false;
}

if (dbver == "1381")
{
DBUpdates updates {
"ALTER TABLE iptv_channel ADD INDEX (chanid);"
"ALTER TABLE channelgroup ADD INDEX (chanid);"
} ;
if (!performActualUpdate("MythTV", "DBSchemaVer",
updates, "1382", dbver))
return false;
}

return true;
}

Expand Down
Loading