Commit 68f1ffa4 authored by Lukas Appelhans's avatar Lukas Appelhans
Browse files

Merge branch 'rebase' of gitorious.org:chakra/akabeicore into rebase

parents 4c7c5d71 80562310
......@@ -22,7 +22,8 @@ CREATE TABLE IF NOT EXISTS packages (
CREATE INDEX `packages_name` ON `packages` (`name` ASC) ;
CREATE TABLE IF NOT EXISTS `files` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`files` TEXT NOT NULL ,
`prefix` TEXT NOT NULL ,
CONSTRAINT `fk_files_packages`
......@@ -32,7 +33,8 @@ CREATE TABLE IF NOT EXISTS `files` (
ON UPDATE NO ACTION);
CREATE TABLE IF NOT EXISTS `scriptlets` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`scriptlet` TEXT NOT NULL ,
CONSTRAINT `fk_scriptlets_packages`
FOREIGN KEY (`package` )
......@@ -67,7 +69,8 @@ CREATE TABLE IF NOT EXISTS `deltas` (
CREATE INDEX `fk_deltas_packages` ON `deltas` (`package` ASC) ;
CREATE TABLE IF NOT EXISTS `depends` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`dependency` TEXT NOT NULL ,
CONSTRAINT `fk_requires_package`
FOREIGN KEY (`package` )
......@@ -76,7 +79,8 @@ CREATE TABLE IF NOT EXISTS `depends` (
ON UPDATE CASCADE);
CREATE TABLE IF NOT EXISTS `conflicts` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`conflict` TEXT NOT NULL ,
CONSTRAINT `fk_conflicts_package`
FOREIGN KEY (`package` )
......@@ -85,7 +89,8 @@ CREATE TABLE IF NOT EXISTS `conflicts` (
ON UPDATE CASCADE);
CREATE TABLE IF NOT EXISTS `provides` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`provides` TEXT NOT NULL ,
CONSTRAINT `fk_provides_package`
FOREIGN KEY (`package` )
......@@ -94,7 +99,8 @@ CREATE TABLE IF NOT EXISTS `provides` (
ON UPDATE NO ACTION);
CREATE TABLE IF NOT EXISTS `optional` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`dependency` TEXT NOT NULL ,
CONSTRAINT `fk_optional_package`
FOREIGN KEY (`package` )
......@@ -103,7 +109,8 @@ CREATE TABLE IF NOT EXISTS `optional` (
ON UPDATE NO ACTION);
CREATE TABLE IF NOT EXISTS `replaces` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`replaces` TEXT NOT NULL ,
CONSTRAINT `fk_replaces_package`
FOREIGN KEY (`package` )
......@@ -112,7 +119,8 @@ CREATE TABLE IF NOT EXISTS `replaces` (
ON UPDATE NO ACTION);
CREATE TABLE IF NOT EXISTS `belongs` (
`package` INTEGER PRIMARY KEY ASC ,
`id` INTEGER PRIMARY KEY ASC ,
`package` INTEGER NOT NULL ,
`group` TEXT NOT NULL ,
CONSTRAINT `fk_belongs_packages`
FOREIGN KEY (`package` )
......
......@@ -441,7 +441,7 @@ bool DatabaseWorker::add(const QStringList& targets)
// Prepare the insert query
int ret = Akabei::Helpers::QueryPerformer::insertPackage((*db), i.value());
if (ret != SQLITE_OK) {
out << "Failed! Could not perform the query. SQLite error code: " << ret << ". Skipping target." << endl;
out << "Failed! Could not insert package. SQLite error code: " << ret << ". Skipping target." << endl;
++skipped;
continue;
}
......@@ -449,7 +449,7 @@ bool DatabaseWorker::add(const QStringList& targets)
if (i.value()->hasScriptlet()) {
int ret = Akabei::Helpers::QueryPerformer::insertScriptlet((*db), i.value());
if (ret != SQLITE_OK) {
out << "Failed! Could not perform the query. SQLite error code: " << ret << ". Skipping target." << endl;
out << "Failed! Could not insert scriptlet. SQLite error code: " << ret << ". Skipping target." << endl;
++skipped;
continue;
}
......@@ -458,7 +458,7 @@ bool DatabaseWorker::add(const QStringList& targets)
// Prepare the insert query
ret = Akabei::Helpers::QueryPerformer::insertFiles((*db), i.value(), QString());
if (ret != SQLITE_OK) {
out << "Failed! Could not perform the query. SQLite error code: " << ret << ". Skipping target." << endl;
out << "Failed! Could not insert file. SQLite error code: " << ret << ". Skipping target." << endl;
++skipped;
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment