Commit c3c014c9 authored by Daniele Cocca's avatar Daniele Cocca
Browse files

Tweaking the database schema so that sqlite3 won't complaing anymore. Stupid piece of software.

parent c846e79e
......@@ -28,9 +28,7 @@ CREATE TABLE IF NOT EXISTS `files` (
`prefix` TEXT NOT NULL ,
CONSTRAINT `fk_files_packages`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
REFERENCES `packages` (`id` ) );
CREATE TABLE IF NOT EXISTS `scriptlets` (
`id` INTEGER PRIMARY KEY ASC ,
......@@ -38,9 +36,7 @@ CREATE TABLE IF NOT EXISTS `scriptlets` (
`scriptlet` TEXT NOT NULL ,
CONSTRAINT `fk_scriptlets_packages`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
REFERENCES `packages` (`id` ) );
CREATE TABLE IF NOT EXISTS `hooks` (
`name` TEXT PRIMARY KEY ,
......@@ -62,11 +58,7 @@ CREATE TABLE IF NOT EXISTS `deltas` (
`md5sum` VARCHAR(32) NOT NULL ,
CONSTRAINT `fk_deltas_packages`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
CREATE INDEX `fk_deltas_packages` ON `deltas` (`package` ASC) ;
REFERENCES `packages` (`id` ) );
CREATE TABLE IF NOT EXISTS `depends` (
`id` INTEGER PRIMARY KEY ASC ,
......@@ -75,7 +67,6 @@ CREATE TABLE IF NOT EXISTS `depends` (
CONSTRAINT `fk_requires_package`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE CASCADE);
CREATE TABLE IF NOT EXISTS `conflicts` (
......@@ -85,7 +76,6 @@ CREATE TABLE IF NOT EXISTS `conflicts` (
CONSTRAINT `fk_conflicts_package`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE CASCADE);
CREATE TABLE IF NOT EXISTS `provides` (
......@@ -94,9 +84,7 @@ CREATE TABLE IF NOT EXISTS `provides` (
`provides` TEXT NOT NULL ,
CONSTRAINT `fk_provides_package`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
REFERENCES `packages` (`id` ) );
CREATE TABLE IF NOT EXISTS `optional` (
`id` INTEGER PRIMARY KEY ASC ,
......@@ -104,9 +92,7 @@ CREATE TABLE IF NOT EXISTS `optional` (
`dependency` TEXT NOT NULL ,
CONSTRAINT `fk_optional_package`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
REFERENCES `packages` (`id` ) );
CREATE TABLE IF NOT EXISTS `replaces` (
`id` INTEGER PRIMARY KEY ASC ,
......@@ -114,9 +100,7 @@ CREATE TABLE IF NOT EXISTS `replaces` (
`replaces` TEXT NOT NULL ,
CONSTRAINT `fk_replaces_package`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
REFERENCES `packages` (`id` ) );
CREATE TABLE IF NOT EXISTS `belongs` (
`id` INTEGER PRIMARY KEY ASC ,
......@@ -124,6 +108,4 @@ CREATE TABLE IF NOT EXISTS `belongs` (
`group` TEXT NOT NULL ,
CONSTRAINT `fk_belongs_packages`
FOREIGN KEY (`package` )
REFERENCES `packages` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);
REFERENCES `packages` (`id` ) );
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