summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorDaniel Sutcliffe <dansut@users.sourceforge.net>2010-01-25 20:36:38 +0000
committerDaniel Sutcliffe <dansut@users.sourceforge.net>2010-01-25 20:36:38 +0000
commitb738fc3012fedefa52158a6d04c8b19921ae85ea (patch)
tree238c8954b69cdeb729e12d6689323179b4b29916 /admin
parentb3449466c1b6ddd2b7bcf4113999a468c5e8d8f9 (diff)
downloadarticles-b738fc3012fedefa52158a6d04c8b19921ae85ea.tar.gz
articles-b738fc3012fedefa52158a6d04c8b19921ae85ea.tar.bz2
articles-b738fc3012fedefa52158a6d04c8b19921ae85ea.zip
Fixes to the naming of Articles sequence tables
Diffstat (limited to 'admin')
-rw-r--r--admin/index.php2
-rw-r--r--admin/schema_inc.php2
-rw-r--r--admin/upgrades/1.0.0.php23
3 files changed, 25 insertions, 2 deletions
diff --git a/admin/index.php b/admin/index.php
index 3e305fe..ec0e04e 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -3,4 +3,4 @@
// This is not a package.
header ("location: ../index.php");
-?> \ No newline at end of file
+?>
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 3b902de..5c88cea 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -71,7 +71,7 @@ $gBitInstaller->registerPackageInfo( ARTICLES_PKG_NAME, array(
// Starting the numbering off at 5 for types to allow room for the INSERTs later.
$sequences = array (
'articles_topics_id_seq' => array( 'start' => 1 ),
- 'article_types_a_t_id_seq' => array( 'start' => 5 ),
+ 'article_types_id_seq' => array( 'start' => 5 ),
'articles_article_id_seq' => array( 'start' => 1 ),
);
$gBitInstaller->registerSchemaSequences( ARTICLES_PKG_NAME, $sequences );
diff --git a/admin/upgrades/1.0.0.php b/admin/upgrades/1.0.0.php
new file mode 100644
index 0000000..2ee6861
--- /dev/null
+++ b/admin/upgrades/1.0.0.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/admin/upgrades/1.0.0.php,v 1.1 2010/01/25 20:36:38 dansut Exp $
+ */
+global $gBitInstaller;
+
+$infoHash = array(
+ 'package' => ARTICLES_PKG_NAME,
+ 'version' => str_replace( '.php', '', basename( __FILE__ )),
+ 'description' => "Fix the names of sequence tables to be standardized.",
+ 'post_upgrade' => NULL,
+);
+
+$gBitInstaller->registerPackageUpgrade( $infoHash, array(
+ array( 'DATADICT' => array(
+ array( 'RENAMESEQUENCE' => array(
+ "article_types_a_t_id_seq" => "article_types_id_seq",
+ "articles_topics_id_seq" => "article_topics_id_seq",
+ )),
+ array( 'DROPTABLE' => array( 'article_topics_t_id_seq' ) ),
+ )),
+));
+?>