aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-14 00:45:30 -0800
committerfriendica <info@friendica.com>2012-12-14 00:45:30 -0800
commitd39fb9b1d5208b18da364873d10f51e23b94bd7e (patch)
tree9c487ba79579c281a688a1a676ae9ace2c938689 /install
parentecce0f0e211f069f4e0daf661755e89f7f32f020 (diff)
downloadvolse-hubzilla-d39fb9b1d5208b18da364873d10f51e23b94bd7e.tar.gz
volse-hubzilla-d39fb9b1d5208b18da364873d10f51e23b94bd7e.tar.bz2
volse-hubzilla-d39fb9b1d5208b18da364873d10f51e23b94bd7e.zip
converging on a workable crypto auth handshake
Diffstat (limited to 'install')
-rw-r--r--install/database.sql15
-rw-r--r--install/update.php20
2 files changed, 34 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql
index 182d02432..574aaa38e 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -894,6 +894,21 @@ CREATE TABLE IF NOT EXISTS `tokens` (
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `verify` (
+ `id` int(10) unsigned NOT NULL,
+ `channel` int(10) unsigned NOT NULL DEFAULT '0',
+ `type` char(32) NOT NULL DEFAULT '',
+ `token` char(255) NOT NULL DEFAULT '',
+ `meta` char(255) NOT NULL DEFAULT '',
+ `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`id`),
+ KEY `channel` (`channel`),
+ KEY `type` (`type`),
+ KEY `token` (`token`),
+ KEY `meta` (`meta`),
+ KEY `created` (`created`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
CREATE TABLE IF NOT EXISTS `xchan` (
`xchan_hash` char(255) NOT NULL,
`xchan_guid` char(255) NOT NULL DEFAULT '',
diff --git a/install/update.php b/install/update.php
index edd4701a1..f767c2f22 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1001 );
+define( 'UPDATE_VERSION' , 1002 );
/**
*
@@ -43,3 +43,21 @@ function update_r1000() {
}
+function update_r1001() {
+ $r = q("CREATE TABLE if not exists `verify` (
+ `id` INT(10) UNSIGNED NOT NULL ,
+ `channel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+ `type` CHAR( 32 ) NOT NULL DEFAULT '',
+ `token` CHAR( 255 ) NOT NULL DEFAULT '',
+ `meta` CHAR( 255 ) NOT NULL DEFAULT '',
+ `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY ( `id` )
+ ) ENGINE = MYISAM ");
+
+ $r2 = q("alter table `verify` add index (`channel`), add index (`type`), add index (`token`),
+ add index (`meta`), add index (`created`)");
+
+ if($r && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}