diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-05-04 09:46:27 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-05-04 09:46:27 +0200 |
commit | be4c9a9598350fb4333480f0c7b302acebcddfd4 (patch) | |
tree | fb0c2606ad4ca0bc1a710d6fdf82f55c326b3427 /install | |
parent | f15c12376adad6534c8c0ea547a7548697eb8379 (diff) | |
parent | be852ba857f4cb8e75574a762945b50c8bddcff9 (diff) | |
download | volse-hubzilla-3.4.tar.gz volse-hubzilla-3.4.tar.bz2 volse-hubzilla-3.4.zip |
Merge branch '3.4RC'3.4
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 60 | ||||
-rw-r--r-- | install/schema_postgres.sql | 70 |
2 files changed, 124 insertions, 6 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 1195d5845..1e91619e3 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -259,6 +259,7 @@ CREATE TABLE IF NOT EXISTS `channel` ( `channel_dirdate` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `channel_lastpost` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `channel_deleted` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', + `channel_active` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `channel_max_anon_mail` int(10) unsigned NOT NULL DEFAULT 10, `channel_max_friend_req` int(10) unsigned NOT NULL DEFAULT 10, `channel_expire_days` int(11) NOT NULL DEFAULT 0 , @@ -308,6 +309,7 @@ CREATE TABLE IF NOT EXISTS `channel` ( KEY `channel_hash` (`channel_hash`), KEY `channel_expire_days` (`channel_expire_days`), KEY `channel_deleted` (`channel_deleted`), + KEY `channel_active` (`channel_active`), KEY `channel_dirdate` (`channel_dirdate`), KEY `channel_removed` (`channel_removed`), KEY `channel_system` (`channel_system`), @@ -966,12 +968,14 @@ CREATE TABLE IF NOT EXISTS `poll` ( `poll_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `poll_guid` varchar(191) NOT NULL, `poll_channel` int(10) unsigned NOT NULL DEFAULT 0 , + `poll_author` varchar(191) NOT NULL, `poll_desc` text NOT NULL, `poll_flags` int(11) NOT NULL DEFAULT 0 , `poll_votes` int(11) NOT NULL DEFAULT 0 , PRIMARY KEY (`poll_id`), KEY `poll_guid` (`poll_guid`), KEY `poll_channel` (`poll_channel`), + KEY `poll_author` (`poll_author`), KEY `poll_flags` (`poll_flags`), KEY `poll_votes` (`poll_votes`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; @@ -983,10 +987,12 @@ CREATE TABLE IF NOT EXISTS `poll_elm` ( `pelm_desc` text NOT NULL, `pelm_flags` int(11) NOT NULL DEFAULT 0 , `pelm_result` float NOT NULL DEFAULT 0 , + `pelm_order` int(11) NOT NULL DEFAULT 0 , PRIMARY KEY (`pelm_id`), KEY `pelm_guid` (`pelm_guid`), KEY `pelm_poll` (`pelm_poll`), - KEY `pelm_result` (`pelm_result`) + KEY `pelm_result` (`pelm_result`), + KEY `pelm_order` (`pelm_order`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `profdef` ( @@ -1593,3 +1599,55 @@ CREATE TABLE if not exists calendarinstances ( UNIQUE(calendarid, principaluri), UNIQUE(calendarid, share_href) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE if not exists oauth_clients ( + client_id VARCHAR(80) NOT NULL, + client_secret VARCHAR(80), + redirect_uri VARCHAR(2000), + grant_types VARCHAR(80), + scope VARCHAR(4000), + user_id VARCHAR(80), + PRIMARY KEY (client_id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists oauth_access_tokens ( + access_token VARCHAR(40) NOT NULL, + client_id VARCHAR(80) NOT NULL, + user_id VARCHAR(255), + expires TIMESTAMP NOT NULL, + scope VARCHAR(4000), + PRIMARY KEY (access_token) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists oauth_authorization_codes ( + authorization_code VARCHAR(40) NOT NULL, + client_id VARCHAR(80) NOT NULL, + user_id VARCHAR(255), + redirect_uri VARCHAR(2000), + expires TIMESTAMP NOT NULL, + scope VARCHAR(4000), + id_token VARCHAR(1000), + PRIMARY KEY (authorization_code) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists oauth_refresh_tokens ( + refresh_token VARCHAR(40) NOT NULL, + client_id VARCHAR(80) NOT NULL, + user_id VARCHAR(255), + expires TIMESTAMP NOT NULL, + scope VARCHAR(4000), + PRIMARY KEY (refresh_token) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists oauth_scopes ( + scope VARCHAR(191) NOT NULL, + is_default TINYINT(1), + PRIMARY KEY (scope) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists oauth_jwt ( + client_id VARCHAR(80) NOT NULL, + subject VARCHAR(80), + public_key VARCHAR(2000) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 2a0f08bde..3fba5b546 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -252,9 +252,10 @@ CREATE TABLE "channel" ( "channel_dirdate" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "channel_lastpost" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "channel_deleted" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', - "channel_max_anon_mail" bigint NOT NULL DEFAULT 10, - "channel_max_friend_req" bigint NOT NULL DEFAULT 10, - "channel_expire_days" bigint NOT NULL DEFAULT 0 , + "channel_active" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', + "channel_max_anon_mail" bigint NOT NULL DEFAULT '10', + "channel_max_friend_req" bigint NOT NULL DEFAULT '10', + "channel_expire_days" bigint NOT NULL DEFAULT '0', "channel_passwd_reset" text NOT NULL DEFAULT '', "channel_default_group" text NOT NULL DEFAULT '', "channel_allow_cid" text , @@ -284,6 +285,7 @@ create index "channel_guid" on channel ("channel_guid"); create index "channel_hash" on channel ("channel_hash"); create index "channel_expire_days" on channel ("channel_expire_days"); create index "channel_deleted" on channel ("channel_deleted"); +create index "channel_active" on channel ("channel_active"); create index "channel_dirdate" on channel ("channel_dirdate"); create index "channel_lastpost" on channel ("channel_lastpost"); create index "channel_removed" on channel ("channel_removed"); @@ -944,6 +946,7 @@ CREATE TABLE "poll" ( "poll_id" serial NOT NULL, "poll_guid" text NOT NULL, "poll_channel" bigint NOT NULL DEFAULT '0', + "poll_author" text NOT NULL, "poll_desc" text NOT NULL, "poll_flags" bigint NOT NULL DEFAULT 0 , "poll_votes" bigint NOT NULL DEFAULT 0 , @@ -952,6 +955,7 @@ CREATE TABLE "poll" ( ); create index "poll_guid" on poll ("poll_guid"); create index "poll_channel" on poll ("poll_channel"); +create index "poll_author" on poll ("poll_author"); create index "poll_flags" on poll ("poll_flags"); create index "poll_votes" on poll ("poll_votes"); CREATE TABLE "poll_elm" ( @@ -959,13 +963,15 @@ CREATE TABLE "poll_elm" ( "pelm_guid" text NOT NULL, "pelm_poll" bigint NOT NULL DEFAULT '0', "pelm_desc" text NOT NULL, - "pelm_flags" bigint NOT NULL DEFAULT 0 , - "pelm_result" float NOT NULL DEFAULT 0 , + "pelm_flags" bigint NOT NULL DEFAULT '0', + "pelm_result" float NOT NULL DEFAULT '0', + "pelm_order" numeric(6) NOT NULL DEFAULT '0', PRIMARY KEY ("pelm_id") ); create index "pelm_guid" on poll_elm ("pelm_guid"); create index "pelm_poll" on poll_elm ("pelm_poll"); create index "pelm_result" on poll_elm ("pelm_result"); +create index "pelm_order" on poll_elm ("pelm_order"); CREATE TABLE "profdef" ( "id" serial NOT NULL, @@ -1606,3 +1612,57 @@ ALTER TABLE ONLY users CREATE UNIQUE INDEX users_ukey ON users USING btree (username); + + +CREATE TABLE oauth_clients ( + client_id VARCHAR(80) NOT NULL, + client_secret VARCHAR(80), + redirect_uri VARCHAR(2000), + grant_types VARCHAR(80), + scope VARCHAR(4000), + user_id VARCHAR(80), + PRIMARY KEY (client_id) +); + +CREATE TABLE oauth_access_tokens ( + access_token VARCHAR(40) NOT NULL, + client_id VARCHAR(80) NOT NULL, + user_id VARCHAR(255), + expires TIMESTAMP NOT NULL, + scope VARCHAR(4000), + PRIMARY KEY (access_token) +); + +CREATE TABLE oauth_authorization_codes ( + authorization_code VARCHAR(40) NOT NULL, + client_id VARCHAR(80) NOT NULL, + user_id VARCHAR(255), + redirect_uri VARCHAR(2000), + expires TIMESTAMP NOT NULL, + scope VARCHAR(4000), + id_token VARCHAR(1000), + PRIMARY KEY (authorization_code) +); + +CREATE TABLE oauth_refresh_tokens ( + refresh_token VARCHAR(40) NOT NULL, + client_id VARCHAR(80) NOT NULL, + user_id VARCHAR(255), + expires TIMESTAMP NOT NULL, + scope VARCHAR(4000), + PRIMARY KEY (refresh_token) +); + +CREATE TABLE oauth_scopes ( + scope VARCHAR(191) NOT NULL, + is_default SMALLINT, + PRIMARY KEY (scope) +); + +CREATE TABLE oauth_jwt ( + client_id VARCHAR(80) NOT NULL, + subject VARCHAR(80), + public_key VARCHAR(2000) NOT NULL +); + + |