From e1b13174005e0aed66267a2f938df9747d17dc38 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 15 Feb 2015 10:25:37 +0100 Subject: Bugfix for table prefixes --- install/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'install') diff --git a/install/index.php b/install/index.php index afa7b9b..2f5b9e2 100644 --- a/install/index.php +++ b/install/index.php @@ -81,14 +81,14 @@ if (isset($_GET['create_tables'])) { ) ENGINE=InnoDB DEFAULT CHARSET=latin1"); $_pdo->query("ALTER TABLE `".constants::db_prefix."assignment` - ADD CONSTRAINT `assignment_ibfk_1` FOREIGN KEY (`offerId`) REFERENCES `offer` (`id`)"); + ADD CONSTRAINT `assignment_ibfk_1` FOREIGN KEY (`offerId`) REFERENCES `".constants::db_prefix."offer` (`id`)"); $_pdo->query("ALTER TABLE `".constants::db_prefix."contact` - ADD CONSTRAINT `contact_ibfk_1` FOREIGN KEY (`clientId`) REFERENCES `client` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION"); + ADD CONSTRAINT `contact_ibfk_1` FOREIGN KEY (`clientId`) REFERENCES `".constants::db_prefix."client` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION"); $_pdo->query("ALTER TABLE `".constants::db_prefix."offer` - ADD CONSTRAINT `offer_ibfk_1` FOREIGN KEY (`invoice_fileId`) REFERENCES `file` (`id`), - ADD CONSTRAINT `offer_ibfk_2` FOREIGN KEY (`contactId`) REFERENCES `contact` (`id`)"); + ADD CONSTRAINT `offer_ibfk_1` FOREIGN KEY (`invoice_fileId`) REFERENCES `".constants::db_prefix."file` (`id`), + ADD CONSTRAINT `offer_ibfk_2` FOREIGN KEY (`contactId`) REFERENCES `".constants::db_prefix."contact` (`id`)"); echo "Succeeded creating the database tables."; -- cgit v1.2.3