summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-03-29 07:07:34 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-03-29 07:07:34 +0000
commit9ee0c8e1b7bf7835238641e65dbc09f561093414 (patch)
treefee29cdbb6b29e26a576e84fec7825beb282649c /admin
parente27c9a62df9424f8544b25653fc1e83a35a91886 (diff)
downloadblogs-9ee0c8e1b7bf7835238641e65dbc09f561093414.tar.gz
blogs-9ee0c8e1b7bf7835238641e65dbc09f561093414.tar.bz2
blogs-9ee0c8e1b7bf7835238641e65dbc09f561093414.zip
fix indexes and add comments to AUTO column
Diffstat (limited to 'admin')
-rw-r--r--admin/schema_inc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 118f70a..f3c4bb2 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -13,6 +13,7 @@ $tables = array(
, CONSTRAINT `blog_posts_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`)'
",
+// TODO: why are we using AUTO here? - xing
'blogs' => "
blog_id I4 AUTO PRIMARY,
content_id I4 NOTNULL,
@@ -51,8 +52,8 @@ $gBitInstaller->registerPackageInfo( BLOGS_PKG_NAME, array(
// ### Indexes
$indices = array (
- 'blog_posts_blog_id_idx' => array( 'table' => 'blog_posts', 'cols' => 'blog_id', 'opts' => NULL ),
- 'blogs_content_id_idx' => array( 'table' => 'blogs', 'cols' => 'content_id', 'opts' => array( 'UNIQUE' ) ),
+ 'blog_posts_post_id_idx' => array( 'table' => 'blog_posts', 'cols' => 'post_id', 'opts' => NULL ),
+ 'blogs_content_id_idx' => array( 'table' => 'blogs', 'cols' => 'content_id', 'opts' => array( 'UNIQUE' ) ),
'blog_posts_content_id_idx' => array( 'table' => 'blog_posts', 'cols' => 'content_id', 'opts' => array( 'UNIQUE' ) ),
);
// TODO - SPIDERR - following seems to cause time _decrease_ cause bigint on postgres. need more investigation
@@ -61,6 +62,8 @@ $gBitInstaller->registerSchemaIndexes( BLOGS_PKG_NAME, $indices );
// ### Sequences
$sequences = array (
+ // TODO: we need this sequence if we remove the AUTO on blogs.blog_id - xing
+ //'blogs_blog_id_seq' => array( 'start' => 1 ),
'blog_posts_post_id_seq' => array( 'start' => 1 )
);
$gBitInstaller->registerSchemaSequences( BLOGS_PKG_NAME, $sequences );