summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2011-06-26 17:50:08 -0400
committerChristian Fowler <spider@viovio.com>2011-06-26 17:50:08 -0400
commit3be78da8929abf0c7bfbc8e1c92d9c3a0ae3345f (patch)
treeb42bb436ea0b522f1f6bfa2cbfbe949b684ebb6e /admin
parente5215cb3edfb0197b269ee060f821ec1aee23b63 (diff)
downloadliberty-3be78da8929abf0c7bfbc8e1c92d9c3a0ae3345f.tar.gz
liberty-3be78da8929abf0c7bfbc8e1c92d9c3a0ae3345f.tar.bz2
liberty-3be78da8929abf0c7bfbc8e1c92d9c3a0ae3345f.zip
convert liberty_files.storage_path to liberty_files.file_name to remove all hardcoded pathing information. legacy path is supported via basename
Diffstat (limited to 'admin')
-rw-r--r--admin/schema_inc.php2
-rw-r--r--admin/upgrades/3.0.0.php25
2 files changed, 26 insertions, 1 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 71dc93e..b413794 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -155,7 +155,7 @@ $tables = array(
'liberty_files' => "
file_id I4 PRIMARY,
user_id I4 NOTNULL,
- storage_path C(250),
+ file_name C(250),
file_size I4,
mime_type C(64)
",
diff --git a/admin/upgrades/3.0.0.php b/admin/upgrades/3.0.0.php
new file mode 100644
index 0000000..076da8c
--- /dev/null
+++ b/admin/upgrades/3.0.0.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * @version $Header$
+ */
+global $gBitInstaller;
+
+$infoHash = array(
+ 'package' => LIBERTY_PKG_NAME,
+ 'version' => str_replace( '.php', '', basename( __FILE__ )),
+ 'description' => "Update content type guid table to have singular and plural names, deprecate content_description",
+ 'post_upgrade' => NULL,
+);
+
+$gBitInstaller->registerPackageUpgrade( $infoHash, array(
+
+array( 'DATADICT' => array(
+ // rename original column
+ array( 'RENAMECOLUMN' => array(
+ 'liberty_files' => array(
+ '`storage_path`' => "`file_name` VARCHAR(250)",
+ ),
+ )),
+)),
+
+));