diff options
author | Camil Staps | 2015-02-15 10:25:37 +0100 |
---|---|---|
committer | Camil Staps | 2015-02-15 10:25:37 +0100 |
commit | e1b13174005e0aed66267a2f938df9747d17dc38 (patch) | |
tree | 06db477b680a8f708b8b0755169cfa32de6bbf92 | |
parent | Workaround for the Euro sign (diff) |
Bugfix for table prefixes
-rw-r--r-- | install/index.php | 8 |
1 files changed, 4 insertions, 4 deletions
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."; |