aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql23
-rw-r--r--install/update.php9
2 files changed, 20 insertions, 12 deletions
diff --git a/install/database.sql b/install/database.sql
index cbfca822c..329db698e 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -470,31 +470,32 @@ CREATE TABLE IF NOT EXISTS `item` (
`author_xchan` char(255) NOT NULL DEFAULT '',
`source_xchan` char(255) NOT NULL DEFAULT '',
`mimetype` char(255) NOT NULL DEFAULT '',
- `title` text NOT NULL,
- `body` mediumtext NOT NULL,
+ `title` text NOT NULL DEFAULT '',
+ `body` mediumtext NOT NULL DEFAULT '',
`app` char(255) NOT NULL DEFAULT '',
`lang` char(64) NOT NULL DEFAULT '',
`revision` int(10) unsigned NOT NULL DEFAULT '0',
`verb` char(255) NOT NULL DEFAULT '',
`obj_type` char(255) NOT NULL DEFAULT '',
- `object` text NOT NULL,
+ `object` text NOT NULL DEFAULT '',
`tgt_type` char(255) NOT NULL DEFAULT '',
- `target` text NOT NULL,
+ `target` text NOT NULL DEFAULT '',
`layout_mid` char(255) NOT NULL DEFAULT '',
- `postopts` text NOT NULL,
+ `postopts` text NOT NULL DEFAULT '',
+ `route` text NOT NULL DEFAULT '',
`llink` char(255) NOT NULL DEFAULT '',
`plink` char(255) NOT NULL DEFAULT '',
`resource_id` char(255) NOT NULL DEFAULT '',
`resource_type` char(16) NOT NULL DEFAULT '',
- `attach` mediumtext NOT NULL,
- `sig` text NOT NULL,
+ `attach` mediumtext NOT NULL DEFAULT '',
+ `sig` text NOT NULL DEFAULT '',
`location` char(255) NOT NULL DEFAULT '',
`coord` char(255) NOT NULL DEFAULT '',
`comment_policy` char(255) NOT NULL DEFAULT '',
- `allow_cid` mediumtext NOT NULL,
- `allow_gid` mediumtext NOT NULL,
- `deny_cid` mediumtext NOT NULL,
- `deny_gid` mediumtext NOT NULL,
+ `allow_cid` mediumtext NOT NULL DEFAULT '',
+ `allow_gid` mediumtext NOT NULL DEFAULT '',
+ `deny_cid` mediumtext NOT NULL DEFAULT '',
+ `deny_gid` mediumtext NOT NULL DEFAULT '',
`item_restrict` int(11) NOT NULL DEFAULT '0',
`item_flags` int(11) NOT NULL DEFAULT '0',
`item_private` tinyint(4) NOT NULL DEFAULT '0',
diff --git a/install/update.php b/install/update.php
index 06a60db79..55e404e4e 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1104 );
+define( 'UPDATE_VERSION' , 1105 );
/**
*
@@ -1166,3 +1166,10 @@ function update_r1103() {
set_config('system','curl_ssl_ciphers','ALL:!eNULL');
return UPDATE_SUCCESS;
}
+
+function update_r1104() {
+ $r = q("ALTER TABLE `item` ADD `route` TEXT NOT NULL DEFAULT '' AFTER `postopts` ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}