@@ -35,9 +35,10 @@ |
);
|
{CODE}
|
|
-some explanations of what is available:
|
-! DATADICT
|
+some examples of what is available: |
+! datadict |
{code source=PHP}
|
+// create new tables |
// 'CREATE':
|
array( 'CREATE' => array (
|
'tiki_article_status' => "
|
|
|
@@ -45,6 +46,7 @@ |
status_name C(64)
|
",
|
)),
|
+// add columns to tables |
// 'ALTER':
|
array( 'ALTER' => array(
|
'tiki_articles' => array(
|
|
|
@@ -61,6 +63,7 @@ |
'has_topic_image' => array( '`has_topic_image`', 'VARCHAR(1)' ),
|
),
|
)),
|
+// rename existing tables |
// 'RENAMETABLE':
|
array( 'RENAMETABLE' => array(
|
'tiki_articles' => 'articles',
|
|
|
@@ -68,26 +71,31 @@ |
'tiki_article_types' => 'article_types',
|
'tiki_article_topics' => 'article_topics',
|
)),
|
+// rename columns in tables |
// 'RENAMECOLUMN':
|
array( 'RENAMECOLUMN' => array(
|
'article_topics' => array(
|
'`active`' => 'active_topic'
|
),
|
)),
|
+// rename a sequence |
// 'RENAMESEQUENCE':
|
array( 'RENAMESEQUENCE' => array(
|
"tiki_article_topics_topic_id_seq" => "article_topics_t_id_seq",
|
"tiki_article_types_topic_id_seq" => "article_types_t_id_seq",
|
"tiki_article_article_id_seq" => "article_article_id_seq",
|
)),
|
+// drop a column from an existing table |
// 'DROPCOLUMN':
|
array( 'DROPCOLUMN' => array(
|
'tiki_submissions' => array( '`bibliographical_references`' ),
|
)),
|
+// drop an existing table |
// 'DROPTABLE':
|
array( 'DROPTABLE' => array(
|
'tiki_content'
|
)),
|
+// create an index |
// 'CREATEINDEX':
|
array( 'CREATEINDEX' => array(
|
'tiki_content_title_idx' => array( 'tiki_content', '`title`', array() ),
|
|
|
@@ -101,21 +109,21 @@ |
)),
|
{/code}
|
|
-! QUERY
|
+! query |
{code source=PHP}
|
- //allows you to execute SQL direclty, like updates and the like. if your
|
- //SQL is different for different DBs, you can restrict it using the following:
|
+// allows you to execute SQL direclty, like updates and the like. if your |
+// SQL is different for different DBs, you can restrict it using the following: |
// 'MYSQL' :
|
// 'PGSQL' :
|
// 'SQL92' :
|
"UPDATE `".BIT_DB_PREFIX."tiki_comments` SET `objectType`='".BITARTICLE_CONTENT_TYPE_GUID."' WHERE `objectType`='articles'",
|
{/code}
|
|
-! PHP
|
+! php |
{code source=PHP}
|
- // allows you to simply pass PHP strings to the upgrader. this gives you
|
- // unlimited control over what can be done in the upgrader. you can copy
|
- // files and do all sorts of cool stuff this way
|
+// allows you to simply pass PHP strings to the upgrader. this gives you |
+// unlimited control over what can be done in the upgrader. you can copy |
+// files and do all sorts of cool stuff this way |
' global $gBitSystem;
|
require_once( ARTICLES_PKG_PATH."BitArticle.php" );
|
|
|
|