|
|
@ -144,7 +144,7 @@ void AlbumDB::initDB()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!execSql( TQString("CREATE TABLE Albums\n"
|
|
|
|
if (!execSql( TQString("CREATE TABLE Albums\n"
|
|
|
|
" (id INTEGER PRIMARY KEY,\n"
|
|
|
|
" (id INTEGER PRIMARY KEY,\n"
|
|
|
|
" url TEXT NOT NULL UNITQUE,\n"
|
|
|
|
" url TEXT NOT NULL UNIQUE,\n"
|
|
|
|
" date DATE NOT NULL,\n"
|
|
|
|
" date DATE NOT NULL,\n"
|
|
|
|
" caption TEXT,\n"
|
|
|
|
" caption TEXT,\n"
|
|
|
|
" collection TEXT,\n"
|
|
|
|
" collection TEXT,\n"
|
|
|
@ -159,7 +159,7 @@ void AlbumDB::initDB()
|
|
|
|
" name TEXT NOT NULL,\n"
|
|
|
|
" name TEXT NOT NULL,\n"
|
|
|
|
" icon INTEGER,\n"
|
|
|
|
" icon INTEGER,\n"
|
|
|
|
" iconkde TEXT,\n"
|
|
|
|
" iconkde TEXT,\n"
|
|
|
|
" UNITQUE (name, pid));") ))
|
|
|
|
" UNIQUE (name, pid));") ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -167,7 +167,7 @@ void AlbumDB::initDB()
|
|
|
|
if (!execSql( TQString("CREATE TABLE TagsTree\n"
|
|
|
|
if (!execSql( TQString("CREATE TABLE TagsTree\n"
|
|
|
|
" (id INTEGER NOT NULL,\n"
|
|
|
|
" (id INTEGER NOT NULL,\n"
|
|
|
|
" pid INTEGER NOT NULL,\n"
|
|
|
|
" pid INTEGER NOT NULL,\n"
|
|
|
|
" UNITQUE (id, pid));") ))
|
|
|
|
" UNIQUE (id, pid));") ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -178,7 +178,7 @@ void AlbumDB::initDB()
|
|
|
|
" dirid INTEGER NOT NULL,\n"
|
|
|
|
" dirid INTEGER NOT NULL,\n"
|
|
|
|
" caption TEXT,\n"
|
|
|
|
" caption TEXT,\n"
|
|
|
|
" datetime DATETIME,\n"
|
|
|
|
" datetime DATETIME,\n"
|
|
|
|
" UNITQUE (name, dirid));") ))
|
|
|
|
" UNIQUE (name, dirid));") ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -187,7 +187,7 @@ void AlbumDB::initDB()
|
|
|
|
if (!execSql( TQString("CREATE TABLE ImageTags\n"
|
|
|
|
if (!execSql( TQString("CREATE TABLE ImageTags\n"
|
|
|
|
" (imageid INTEGER NOT NULL,\n"
|
|
|
|
" (imageid INTEGER NOT NULL,\n"
|
|
|
|
" tagid INTEGER NOT NULL,\n"
|
|
|
|
" tagid INTEGER NOT NULL,\n"
|
|
|
|
" UNITQUE (imageid, tagid));") ))
|
|
|
|
" UNIQUE (imageid, tagid));") ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -196,21 +196,21 @@ void AlbumDB::initDB()
|
|
|
|
" (imageid INTEGER NOT NULL,\n"
|
|
|
|
" (imageid INTEGER NOT NULL,\n"
|
|
|
|
" property TEXT NOT NULL,\n"
|
|
|
|
" property TEXT NOT NULL,\n"
|
|
|
|
" value TEXT NOT NULL,\n"
|
|
|
|
" value TEXT NOT NULL,\n"
|
|
|
|
" UNITQUE (imageid, property));") ))
|
|
|
|
" UNIQUE (imageid, property));") ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( !execSql( TQString( "CREATE TABLE Searches \n"
|
|
|
|
if ( !execSql( TQString( "CREATE TABLE Searches \n"
|
|
|
|
" (id INTEGER PRIMARY KEY, \n"
|
|
|
|
" (id INTEGER PRIMARY KEY, \n"
|
|
|
|
" name TEXT NOT NULL UNITQUE, \n"
|
|
|
|
" name TEXT NOT NULL UNIQUE, \n"
|
|
|
|
" url TEXT NOT NULL);" ) ) )
|
|
|
|
" url TEXT NOT NULL);" ) ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!execSql( TQString("CREATE TABLE Settings \n"
|
|
|
|
if (!execSql( TQString("CREATE TABLE Settings \n"
|
|
|
|
"(keyword TEXT NOT NULL UNITQUE,\n"
|
|
|
|
"(keyword TEXT NOT NULL UNIQUE,\n"
|
|
|
|
" value TEXT);") ))
|
|
|
|
" value TEXT);") ))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
else
|
|
|
|
else
|
|
|
|