summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-06-13 09:32:11 +0000
committerNick Palmer <nick@sluggardy.net>2007-06-13 09:32:11 +0000
commit89319b9b95df5551374b331f66ea9ea4f9352f91 (patch)
tree58ce4a63fd92c91118b4a7110b82b4f101df0cdc
parentd7345a6b21218e35e33d733bef81c1486986763a (diff)
downloadliberty-89319b9b95df5551374b331f66ea9ea4f9352f91.tar.gz
liberty-89319b9b95df5551374b331f66ea9ea4f9352f91.tar.bz2
liberty-89319b9b95df5551374b331f66ea9ea4f9352f91.zip
Drop constraint that the installer can't install properly.
-rw-r--r--admin/schema_inc.php5
-rw-r--r--admin/upgrade_inc.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index cd21ac4..bebc728 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -35,7 +35,6 @@ $tables = array(
data X
CONSTRAINT '
, CONSTRAINT `liberty_content_status_ref` FOREIGN KEY (`content_status_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content_status`( `content_status_id` )
- , CONSTRAINT `liberty_content_attachment_ref` FOREIGN KEY (`primary_attachment_id`) REFERENCES `".BIT_DB_PREFIX."liberty_attachments`( `attachment_id` )
, CONSTRAINT `liberty_content_type_ref` FOREIGN KEY (`content_type_guid`) REFERENCES `".BIT_DB_PREFIX."liberty_content_types`( `content_type_guid` )'
",
@@ -230,6 +229,10 @@ $indices = array (
);
$gBitInstaller->registerSchemaIndexes( LIBERTY_PKG_NAME, $indices );
+// Need to figure out how to add this constraint on liberty_content after the tables are created or the circular reference causes issues.
+// , CONSTRAINT `liberty_content_attachment_ref` FOREIGN KEY (`primary_attachment_id`) REFERENCES `".BIT_DB_PREFIX."liberty_attachments`( `attachment_id` )
+
+
// ### Sequences
$sequences = array (
'liberty_content_id_seq' => array( 'start' => 1 ),
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php
index 2571404..a43271c 100644
--- a/admin/upgrade_inc.php
+++ b/admin/upgrade_inc.php
@@ -72,9 +72,11 @@ array( 'DATADICT' => array(
'object_id' => array( '`content_id`', 'I4' ),
),
)),
+ /* The installer can't add constraints after table creation yet so drop this constraint.
array( 'SQL' => array(
'ALTER TABLE `'.BIT_DB_PREFIX.'liberty_content` ADD CONSTRAINT liberty_content_attachment_ref FOREIGN KEY (primary_attachment_id) REFERENCES `'.BIT_DB_PREFIX.'liberty_attachments` (attachment_id)'
)),
+ */
)),