aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql1
-rw-r--r--install/update.php11
2 files changed, 11 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql
index 2a31ce0cf..acafabde8 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -182,6 +182,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_r_pages` int(10) unsigned NOT NULL DEFAULT '128',
`channel_w_pages` int(10) unsigned NOT NULL DEFAULT '128',
PRIMARY KEY (`channel_id`),
+ UNIQUE KEY `channel_address_unique` (`channel_address`),
KEY `channel_account_id` (`channel_account_id`),
KEY `channel_primary` (`channel_primary`),
KEY `channel_name` (`channel_name`),
diff --git a/install/update.php b/install/update.php
index 160d94a4d..8bc629f71 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1052 );
+define( 'UPDATE_VERSION' , 1053 );
/**
*
@@ -626,3 +626,12 @@ function update_r1051() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+
+function update_r1052() {
+ $r = q("ALTER TABLE `channel` ADD UNIQUE (`channel_address`) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+