diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-12 17:32:28 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-04-12 18:46:15 -0700 |
commit | 1c32564536cbfa12bd21a1c8161921b13d7dcc66 (patch) | |
tree | dd861e977bdf5883f952699e84e2b74b9d79f7cb /install | |
parent | 63dd6ad01a173d640e5c49dede1246dba840aa74 (diff) | |
download | volse-hubzilla-1c32564536cbfa12bd21a1c8161921b13d7dcc66.tar.gz volse-hubzilla-1c32564536cbfa12bd21a1c8161921b13d7dcc66.tar.bz2 volse-hubzilla-1c32564536cbfa12bd21a1c8161921b13d7dcc66.zip |
backend infrastructure for 'channel protection password'; which will be used to optionally encrypt export files and resolve channel/identity ownership/hijacking disputes
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 2 | ||||
-rw-r--r-- | install/schema_postgres.sql | 4 | ||||
-rw-r--r-- | install/update.php | 13 |
3 files changed, 17 insertions, 2 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index f3d46fa73..5b554583c 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -265,6 +265,8 @@ CREATE TABLE IF NOT EXISTS `channel` ( `channel_removed` tinyint(1) NOT NULL DEFAULT '0', `channel_system` tinyint(1) NOT NULL DEFAULT '0', `channel_moved` char(255) NOT NULL DEFAULT '', + `channel_password` varchar(255) NOT NULL, + `channel_salt` varchar(255) NOT NULL, PRIMARY KEY (`channel_id`), UNIQUE KEY `channel_address_unique` (`channel_address`), KEY `channel_account_id` (`channel_account_id`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 4488d8271..f505801bd 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -166,7 +166,7 @@ CREATE TABLE "attach" ( "is_photo" smallint NOT NULL DEFAULT '0', "os_storage" smallint NOT NULL DEFAULT '0', "os_path" text NOT NULL, - "display_path" text NOT NULL, +4 "display_path" text NOT NULL, "content" bytea NOT NULL, "created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "edited" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', @@ -258,6 +258,8 @@ CREATE TABLE "channel" ( "channel_removed" smallint NOT NULL DEFAULT '0', "channel_system" smallint NOT NULL DEFAULT '0', "channel_moved" text NOT NULL DEFAULT '', + "channel_password" varchar(255) NOT NULL, + "channel_salt" varchar(255) NOT NULL, PRIMARY KEY ("channel_id"), UNIQUE ("channel_address") ); diff --git a/install/update.php b/install/update.php index dd3a42c78..b37af9cef 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1188 ); +define( 'UPDATE_VERSION' , 1189 ); /** * @@ -2510,3 +2510,14 @@ function update_r1187() { } +function update_r1188() { + + $r1 = q("alter table channel add channel_password varchar(255) not null "); + $r2 = q("alter table channel add channel_salt varchar(255) not null "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +} + |