Ticket #3419: mytharchive_filesize_patch.diff

File mytharchive_filesize_patch.diff, 1.3 KB (added by rd.mora@…, 17 years ago)

Patch to increase the capacity of the size field in the archiveitems table.

  • mytharchive/mytharchive/dbcheck.cpp

     
    1212#include "dbcheck.h"
    1313
    1414
    15 const QString currentDatabaseVersion = "1000";
     15const QString currentDatabaseVersion = "1001";
    1616
    1717static bool UpdateDBVersionNumber(const QString &newnumber)
    1818{
     
    7777    if (dbver == "")
    7878    {
    7979        VERBOSE(VB_IMPORTANT, "Inserting MythArchive initial database information.");
     80    }
    8081
    81         const QString updates[] = {
     82    const QString updates[] = {
    8283"DROP TABLE IF EXISTS archiveitems;",
    8384
    8485"CREATE TABLE IF NOT EXISTS archiveitems ("
     
    8990"    description TEXT,"
    9091"    startdate VARCHAR(30),"
    9192"    starttime VARCHAR(30),"
    92 "    size INT UNSIGNED NOT NULL,"
     93"    size BIGINT UNSIGNED NOT NULL,"
    9394"    filename TEXT NOT NULL,"
    9495"    hascutlist BOOL NOT NULL DEFAULT 0,"
    9596"    cutlist TEXT DEFAULT '',"
     
    9798");",
    9899""
    99100};
    100         if (!performActualUpdate(updates, "1000", dbver))
    101             return false;
    102     }
     101    if (!performActualUpdate(updates, currentDatabaseVersion, dbver))
     102        return false;
    103103
    104104    return true;
    105105}