aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/schema_mysql.sql173
-rw-r--r--install/schema_postgres.sql41
2 files changed, 63 insertions, 151 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index e075006e1..7964c2a6a 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -11,15 +11,13 @@ CREATE TABLE IF NOT EXISTS `abconfig` (
KEY `xchan` (`xchan`),
KEY `cat` (`cat`),
KEY `k` (`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `abook` (
`abook_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`abook_account` int(10) unsigned NOT NULL DEFAULT '0',
`abook_channel` int(10) unsigned NOT NULL DEFAULT '0',
`abook_xchan` char(255) NOT NULL DEFAULT '',
- `abook_my_perms` int(11) NOT NULL DEFAULT '0',
- `abook_their_perms` int(11) NOT NULL DEFAULT '0',
`abook_closeness` tinyint(3) unsigned NOT NULL DEFAULT '99',
`abook_created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`abook_updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
@@ -42,8 +40,6 @@ CREATE TABLE IF NOT EXISTS `abook` (
KEY `abook_account` (`abook_account`),
KEY `abook_channel` (`abook_channel`),
KEY `abook_xchan` (`abook_xchan`),
- KEY `abook_my_perms` (`abook_my_perms`),
- KEY `abook_their_perms` (`abook_their_perms`),
KEY `abook_closeness` (`abook_closeness`),
KEY `abook_created` (`abook_created`),
KEY `abook_updated` (`abook_updated`),
@@ -59,7 +55,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
KEY `abook_unconnected` (`abook_unconnected`),
KEY `abook_self` (`abook_self`),
KEY `abook_feed` (`abook_feed`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `account` (
`account_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -92,7 +88,7 @@ CREATE TABLE IF NOT EXISTS `account` (
KEY `account_external` (`account_external`),
KEY `account_level` (`account_level`),
KEY `account_password_changed` (`account_password_changed`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `addon` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -106,7 +102,7 @@ CREATE TABLE IF NOT EXISTS `addon` (
KEY `hidden` (`hidden`),
KEY `aname` (`aname`),
KEY `installed` (`installed`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `app` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -140,7 +136,7 @@ CREATE TABLE IF NOT EXISTS `app` (
KEY `app_deleted` (`app_deleted`),
KEY `app_system` (`app_system`),
KEY `app_edited` (`app_edited`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `atoken` (
@@ -157,7 +153,7 @@ CREATE TABLE IF NOT EXISTS `atoken` (
KEY `atoken_name` (`atoken_name`),
KEY `atoken_token` (`atoken_token`),
KEY `atoken_expires` (`atoken_expires`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `attach` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -199,7 +195,7 @@ CREATE TABLE IF NOT EXISTS `attach` (
KEY `is_dir` (`is_dir`),
KEY `is_photo` (`is_photo`),
KEY `os_storage` (`os_storage`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `auth_codes` (
`id` varchar(40) NOT NULL DEFAULT '',
@@ -208,14 +204,14 @@ CREATE TABLE IF NOT EXISTS `auth_codes` (
`expires` int(11) NOT NULL DEFAULT '0',
`auth_scope` varchar(512) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `cache` (
`k` char(255) NOT NULL DEFAULT '',
`v` text NOT NULL,
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `cal` (
`cal_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -235,7 +231,7 @@ CREATE TABLE IF NOT EXISTS `cal` (
KEY `cal_hash` (`cal_hash`),
KEY `cal_name` (`cal_name`),
KEY `cal_types` (`cal_types`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `channel` (
`channel_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -266,24 +262,6 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_allow_gid` mediumtext NOT NULL,
`channel_deny_cid` mediumtext NOT NULL,
`channel_deny_gid` mediumtext NOT NULL,
- `channel_r_stream` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_r_profile` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_r_photos` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_r_abook` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_stream` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_wall` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_tagwall` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_comment` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_mail` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_photos` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_chat` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_a_delegate` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_r_storage` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_storage` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_r_pages` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_pages` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_a_republish` int(10) unsigned NOT NULL DEFAULT '0',
- `channel_w_like` int(10) unsigned NOT NULL DEFAULT '0',
`channel_removed` tinyint(1) NOT NULL DEFAULT '0',
`channel_system` tinyint(1) NOT NULL DEFAULT '0',
`channel_moved` char(255) NOT NULL DEFAULT '',
@@ -302,34 +280,16 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_max_anon_mail` (`channel_max_anon_mail`),
KEY `channel_max_friend_req` (`channel_max_friend_req`),
KEY `channel_default_gid` (`channel_default_group`),
- KEY `channel_r_stream` (`channel_r_stream`),
- KEY `channel_r_profile` (`channel_r_profile`),
- KEY `channel_r_photos` (`channel_r_photos`),
- KEY `channel_r_abook` (`channel_r_abook`),
- KEY `channel_w_stream` (`channel_w_stream`),
- KEY `channel_w_wall` (`channel_w_wall`),
- KEY `channel_w_tagwall` (`channel_w_tagwall`),
- KEY `channel_w_comment` (`channel_w_comment`),
- KEY `channel_w_mail` (`channel_w_mail`),
- KEY `channel_w_photos` (`channel_w_photos`),
- KEY `channel_w_chat` (`channel_w_chat`),
KEY `channel_guid` (`channel_guid`),
KEY `channel_hash` (`channel_hash`),
KEY `channel_expire_days` (`channel_expire_days`),
- KEY `channel_a_delegate` (`channel_a_delegate`),
- KEY `channel_r_storage` (`channel_r_storage`),
- KEY `channel_w_storage` (`channel_w_storage`),
- KEY `channel_r_pages` (`channel_r_pages`),
- KEY `channel_w_pages` (`channel_w_pages`),
KEY `channel_deleted` (`channel_deleted`),
- KEY `channel_a_republish` (`channel_a_republish`),
KEY `channel_dirdate` (`channel_dirdate`),
- KEY `channel_w_like` (`channel_w_like`),
KEY `channel_removed` (`channel_removed`),
KEY `channel_system` (`channel_system`),
KEY `channel_lastpost` (`channel_lastpost`),
KEY `channel_moved` (`channel_moved`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `chat` (
`chat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -341,7 +301,7 @@ CREATE TABLE IF NOT EXISTS `chat` (
KEY `chat_room` (`chat_room`),
KEY `chat_xchan` (`chat_xchan`),
KEY `created` (`created`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `chatpresence` (
`cp_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -355,7 +315,7 @@ CREATE TABLE IF NOT EXISTS `chatpresence` (
KEY `cp_xchan` (`cp_xchan`),
KEY `cp_last` (`cp_last`),
KEY `cp_status` (`cp_status`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `chatroom` (
`cr_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -376,7 +336,7 @@ CREATE TABLE IF NOT EXISTS `chatroom` (
KEY `cr_created` (`cr_created`),
KEY `cr_edited` (`cr_edited`),
KEY `cr_expire` (`cr_expire`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `clients` (
`client_id` varchar(20) NOT NULL DEFAULT '',
@@ -386,7 +346,7 @@ CREATE TABLE IF NOT EXISTS `clients` (
`icon` text,
`uid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`client_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -395,7 +355,7 @@ CREATE TABLE IF NOT EXISTS `config` (
`v` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `access` (`cat`,`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `conv` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -409,7 +369,7 @@ CREATE TABLE IF NOT EXISTS `conv` (
PRIMARY KEY (`id`),
KEY `created` (`created`),
KEY `updated` (`updated`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `dreport` (
`dreport_id` int(11) NOT NULL AUTO_INCREMENT,
@@ -428,7 +388,7 @@ CREATE TABLE IF NOT EXISTS `dreport` (
KEY `dreport_xchan` (`dreport_xchan`),
KEY `dreport_queue` (`dreport_queue`),
KEY `dreport_channel` (`dreport_channel`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -474,7 +434,7 @@ CREATE TABLE IF NOT EXISTS `event` (
KEY `event_status` (`event_status`),
KEY `event_sequence` (`event_sequence`),
KEY `event_priority` (`event_priority`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -489,7 +449,7 @@ CREATE TABLE IF NOT EXISTS `groups` (
KEY `deleted` (`deleted`),
KEY `hash` (`hash`),
KEY `gname` (`gname`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `group_member` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -500,7 +460,7 @@ CREATE TABLE IF NOT EXISTS `group_member` (
KEY `uid` (`uid`),
KEY `gid` (`gid`),
KEY `xchan` (`xchan`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `hook` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -513,7 +473,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
KEY `hook` (`hook`),
KEY `priority` (`priority`),
KEY `hook_version` (`hook_version`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `hubloc` (
`hubloc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -551,7 +511,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
KEY `hubloc_orphancheck` (`hubloc_orphancheck`),
KEY `hubloc_deleted` (`hubloc_deleted`),
KEY `hubloc_error` (`hubloc_error`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `iconfig` (
@@ -566,7 +526,7 @@ CREATE TABLE IF NOT EXISTS `iconfig` (
KEY `cat` (`cat`),
KEY `k` (`k`),
KEY `sharing` (`sharing`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `issue` (
`issue_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -583,7 +543,7 @@ CREATE TABLE IF NOT EXISTS `issue` (
KEY `issue_priority` (`issue_priority`),
KEY `issue_status` (`issue_status`),
KEY `issue_component` (`issue_component`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `item` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -624,7 +584,6 @@ CREATE TABLE IF NOT EXISTS `item` (
`resource_type` char(16) NOT NULL DEFAULT '',
`attach` mediumtext NOT NULL,
`sig` text NOT NULL,
- `diaspora_meta` mediumtext NOT NULL,
`location` char(255) NOT NULL DEFAULT '',
`coord` char(255) NOT NULL DEFAULT '',
`public_policy` char(255) NOT NULL DEFAULT '',
@@ -710,14 +669,8 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `item_unpublished` (`item_unpublished`),
KEY `item_delayed` (`item_delayed`),
KEY `item_pending_remove` (`item_pending_remove`),
- KEY `item_blocked` (`item_blocked`),
- FULLTEXT KEY `title` (`title`),
- FULLTEXT KEY `body` (`body`),
- FULLTEXT KEY `allow_cid` (`allow_cid`),
- FULLTEXT KEY `allow_gid` (`allow_gid`),
- FULLTEXT KEY `deny_cid` (`deny_cid`),
- FULLTEXT KEY `deny_gid` (`deny_gid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+ KEY `item_blocked` (`item_blocked`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `item_id` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -730,7 +683,7 @@ CREATE TABLE IF NOT EXISTS `item_id` (
KEY `sid` (`sid`),
KEY `service` (`service`),
KEY `iid` (`iid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `likes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -752,7 +705,7 @@ CREATE TABLE IF NOT EXISTS `likes` (
KEY `target_type` (`target_type`),
KEY `channel_id` (`channel_id`),
KEY `target_id` (`target_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -795,7 +748,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
KEY `mail_seen` (`mail_seen`),
KEY `mail_recalled` (`mail_recalled`),
KEY `mail_obscured` (`mail_obscured`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `menu` (
`menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -811,7 +764,7 @@ CREATE TABLE IF NOT EXISTS `menu` (
KEY `menu_flags` (`menu_flags`),
KEY `menu_created` (`menu_created`),
KEY `menu_edited` (`menu_edited`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `menu_item` (
`mitem_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -829,7 +782,7 @@ CREATE TABLE IF NOT EXISTS `menu_item` (
KEY `mitem_channel_id` (`mitem_channel_id`),
KEY `mitem_menu_id` (`mitem_menu_id`),
KEY `mitem_flags` (`mitem_flags`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `notify` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -857,7 +810,7 @@ CREATE TABLE IF NOT EXISTS `notify` (
KEY `link` (`link`),
KEY `otype` (`otype`),
KEY `aid` (`aid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `obj` (
`obj_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -888,7 +841,7 @@ CREATE TABLE IF NOT EXISTS `obj` (
KEY `obj_edited` (`obj_edited`),
KEY `obj_quantity` (`obj_quantity`),
KEY `obj_obj` (`obj_obj`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `outq` (
`outq_hash` char(255) NOT NULL,
@@ -914,7 +867,7 @@ CREATE TABLE IF NOT EXISTS `outq` (
KEY `outq_async` (`outq_async`),
KEY `outq_delivered` (`outq_delivered`),
KEY `outq_priority` (`outq_priority`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `pconfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -924,7 +877,7 @@ CREATE TABLE IF NOT EXISTS `pconfig` (
`v` mediumtext NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `access` (`uid`,`cat`,`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `photo` (
@@ -970,7 +923,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
KEY `is_nsfw` (`is_nsfw`),
KEY `os_storage` (`os_storage`),
KEY `photo_usage` (`photo_usage`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `poll` (
`poll_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -982,7 +935,7 @@ CREATE TABLE IF NOT EXISTS `poll` (
KEY `poll_channel` (`poll_channel`),
KEY `poll_flags` (`poll_flags`),
KEY `poll_votes` (`poll_votes`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `poll_elm` (
`pelm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -993,7 +946,7 @@ CREATE TABLE IF NOT EXISTS `poll_elm` (
PRIMARY KEY (`pelm_id`),
KEY `pelm_poll` (`pelm_poll`),
KEY `pelm_result` (`pelm_result`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `profdef` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1004,7 +957,7 @@ CREATE TABLE IF NOT EXISTS `profdef` (
`field_inputs` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `field_name` (`field_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `profext` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1016,7 +969,7 @@ CREATE TABLE IF NOT EXISTS `profext` (
KEY `channel_id` (`channel_id`),
KEY `hash` (`hash`),
KEY `k` (`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `profile` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -1079,7 +1032,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
KEY `postal_code` (`postal_code`),
KEY `country_name` (`country_name`),
KEY `profile_guid` (`profile_guid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `profile_check` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1094,7 +1047,7 @@ CREATE TABLE IF NOT EXISTS `profile_check` (
KEY `dfrn_id` (`dfrn_id`),
KEY `sec` (`sec`),
KEY `expire` (`expire`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `register` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1107,7 +1060,7 @@ CREATE TABLE IF NOT EXISTS `register` (
KEY `hash` (`hash`),
KEY `created` (`created`),
KEY `uid` (`uid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `session` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
@@ -1117,7 +1070,7 @@ CREATE TABLE IF NOT EXISTS `session` (
PRIMARY KEY (`id`),
KEY `sid` (`sid`),
KEY `expire` (`expire`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `shares` (
`share_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1128,7 +1081,7 @@ CREATE TABLE IF NOT EXISTS `shares` (
KEY `share_type` (`share_type`),
KEY `share_target` (`share_target`),
KEY `share_xchan` (`share_xchan`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `sign` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1140,7 +1093,7 @@ CREATE TABLE IF NOT EXISTS `sign` (
PRIMARY KEY (`id`),
KEY `iid` (`iid`),
KEY `retract_iid` (`retract_iid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `site` (
`site_url` char(255) NOT NULL,
@@ -1173,7 +1126,7 @@ CREATE TABLE IF NOT EXISTS `site` (
KEY `site_dead` (`site_dead`),
KEY `site_type` (`site_type`),
KEY `site_project` (`site_project`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `source` (
`src_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1186,7 +1139,7 @@ CREATE TABLE IF NOT EXISTS `source` (
KEY `src_channel_id` (`src_channel_id`),
KEY `src_channel_xchan` (`src_channel_xchan`),
KEY `src_xchan` (`src_xchan`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `sys_perms` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1195,7 +1148,7 @@ CREATE TABLE IF NOT EXISTS `sys_perms` (
`v` mediumtext NOT NULL,
`public_perm` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `term` (
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1219,7 +1172,7 @@ CREATE TABLE IF NOT EXISTS `term` (
KEY `imgurl` (`imgurl`),
KEY `term_hash` (`term_hash`),
KEY `parent_hash` (`parent_hash`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `tokens` (
`id` varchar(40) NOT NULL DEFAULT '',
@@ -1232,7 +1185,7 @@ CREATE TABLE IF NOT EXISTS `tokens` (
KEY `client_id` (`client_id`),
KEY `expires` (`expires`),
KEY `uid` (`uid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `updates` (
`ud_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1249,7 +1202,7 @@ CREATE TABLE IF NOT EXISTS `updates` (
KEY `ud_flags` (`ud_flags`),
KEY `ud_addr` (`ud_addr`),
KEY `ud_last` (`ud_last`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `verify` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1264,7 +1217,7 @@ CREATE TABLE IF NOT EXISTS `verify` (
KEY `token` (`token`),
KEY `meta` (`meta`),
KEY `created` (`created`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `vote` (
`vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1276,7 +1229,7 @@ CREATE TABLE IF NOT EXISTS `vote` (
UNIQUE KEY `vote_vote` (`vote_poll`,`vote_element`,`vote_xchan`),
KEY `vote_poll` (`vote_poll`),
KEY `vote_element` (`vote_element`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xchan` (
`xchan_hash` char(255) NOT NULL,
@@ -1322,7 +1275,7 @@ CREATE TABLE IF NOT EXISTS `xchan` (
KEY `xchan_system` (`xchan_system`),
KEY `xchan_pubforum` (`xchan_pubforum`),
KEY `xchan_deleted` (`xchan_deleted`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xchat` (
`xchat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1335,7 +1288,7 @@ CREATE TABLE IF NOT EXISTS `xchat` (
KEY `xchat_desc` (`xchat_desc`),
KEY `xchat_xchan` (`xchat_xchan`),
KEY `xchat_edited` (`xchat_edited`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xconfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1347,7 +1300,7 @@ CREATE TABLE IF NOT EXISTS `xconfig` (
KEY `xchan` (`xchan`),
KEY `cat` (`cat`),
KEY `k` (`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xign` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1356,7 +1309,7 @@ CREATE TABLE IF NOT EXISTS `xign` (
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `xchan` (`xchan`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xlink` (
`xlink_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1373,7 +1326,7 @@ CREATE TABLE IF NOT EXISTS `xlink` (
KEY `xlink_updated` (`xlink_updated`),
KEY `xlink_rating` (`xlink_rating`),
KEY `xlink_static` (`xlink_static`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xperm` (
`xp_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1384,7 +1337,7 @@ CREATE TABLE IF NOT EXISTS `xperm` (
KEY `xp_client` (`xp_client`),
KEY `xp_channel` (`xp_channel`),
KEY `xp_perm` (`xp_perm`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xprof` (
`xprof_hash` char(255) NOT NULL,
@@ -1414,7 +1367,7 @@ CREATE TABLE IF NOT EXISTS `xprof` (
KEY `xprof_country` (`xprof_country`),
KEY `xprof_age` (`xprof_age`),
KEY `xprof_hometown` (`xprof_hometown`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `xtag` (
`xtag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1425,4 +1378,4 @@ CREATE TABLE IF NOT EXISTS `xtag` (
KEY `xtag_term` (`xtag_term`),
KEY `xtag_hash` (`xtag_hash`),
KEY `xtag_flags` (`xtag_flags`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index be72a85e1..40e320eb7 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -16,8 +16,6 @@ CREATE TABLE "abook" (
"abook_account" bigint NOT NULL,
"abook_channel" bigint NOT NULL,
"abook_xchan" text NOT NULL DEFAULT '',
- "abook_my_perms" bigint NOT NULL DEFAULT '0',
- "abook_their_perms" bigint NOT NULL DEFAULT '0',
"abook_closeness" numeric(3) NOT NULL DEFAULT '99',
"abook_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
"abook_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
@@ -41,8 +39,6 @@ CREATE TABLE "abook" (
create index "abook_account" on abook ("abook_account");
create index "abook_channel" on abook ("abook_channel");
create index "abook_xchan" on abook ("abook_xchan");
- create index "abook_my_perms" on abook ("abook_my_perms");
- create index "abook_their_perms" on abook ("abook_their_perms");
create index "abook_closeness" on abook ("abook_closeness");
create index "abook_created" on abook ("abook_created");
create index "abook_updated" on abook ("abook_updated");
@@ -259,24 +255,6 @@ CREATE TABLE "channel" (
"channel_allow_gid" text ,
"channel_deny_cid" text ,
"channel_deny_gid" text ,
- "channel_r_stream" bigint NOT NULL DEFAULT '128',
- "channel_r_profile" bigint NOT NULL DEFAULT '128',
- "channel_r_photos" bigint NOT NULL DEFAULT '128',
- "channel_r_abook" bigint NOT NULL DEFAULT '128',
- "channel_w_stream" bigint NOT NULL DEFAULT '128',
- "channel_w_wall" bigint NOT NULL DEFAULT '128',
- "channel_w_tagwall" bigint NOT NULL DEFAULT '128',
- "channel_w_comment" bigint NOT NULL DEFAULT '128',
- "channel_w_mail" bigint NOT NULL DEFAULT '128',
- "channel_w_photos" bigint NOT NULL DEFAULT '128',
- "channel_w_chat" bigint NOT NULL DEFAULT '128',
- "channel_a_delegate" bigint NOT NULL DEFAULT '0',
- "channel_r_storage" bigint NOT NULL DEFAULT '128',
- "channel_w_storage" bigint NOT NULL DEFAULT '128',
- "channel_r_pages" bigint NOT NULL DEFAULT '128',
- "channel_w_pages" bigint NOT NULL DEFAULT '128',
- "channel_a_republish" bigint NOT NULL DEFAULT '128',
- "channel_w_like" bigint NOT NULL DEFAULT '128',
"channel_removed" smallint NOT NULL DEFAULT '0',
"channel_system" smallint NOT NULL DEFAULT '0',
"channel_moved" text NOT NULL DEFAULT '',
@@ -296,28 +274,10 @@ create index "channel_pageflags" on channel ("channel_pageflags");
create index "channel_max_anon_mail" on channel ("channel_max_anon_mail");
create index "channel_max_friend_req" on channel ("channel_max_friend_req");
create index "channel_default_gid" on channel ("channel_default_group");
-create index "channel_r_stream" on channel ("channel_r_stream");
-create index "channel_r_profile" on channel ("channel_r_profile");
-create index "channel_r_photos" on channel ("channel_r_photos");
-create index "channel_r_abook" on channel ("channel_r_abook");
-create index "channel_w_stream" on channel ("channel_w_stream");
-create index "channel_w_wall" on channel ("channel_w_wall");
-create index "channel_w_tagwall" on channel ("channel_w_tagwall");
-create index "channel_w_comment" on channel ("channel_w_comment");
-create index "channel_w_mail" on channel ("channel_w_mail");
-create index "channel_w_photos" on channel ("channel_w_photos");
-create index "channel_w_chat" on channel ("channel_w_chat");
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_a_delegate" on channel ("channel_a_delegate");
-create index "channel_r_storage" on channel ("channel_r_storage");
-create index "channel_w_storage" on channel ("channel_w_storage");
-create index "channel_r_pages" on channel ("channel_r_pages");
-create index "channel_w_pages" on channel ("channel_w_pages");
create index "channel_deleted" on channel ("channel_deleted");
-create index "channel_a_republish" on channel ("channel_a_republish");
-create index "channel_w_like" on channel ("channel_w_like");
create index "channel_dirdate" on channel ("channel_dirdate");
create index "channel_lastpost" on channel ("channel_lastpost");
create index "channel_removed" on channel ("channel_removed");
@@ -611,7 +571,6 @@ CREATE TABLE "item" (
"resource_type" varchar(16) NOT NULL DEFAULT '',
"attach" text NOT NULL,
"sig" text NOT NULL DEFAULT '',
- "diaspora_meta" text NOT NULL DEFAULT '',
"location" text NOT NULL DEFAULT '',
"coord" text NOT NULL DEFAULT '',
"public_policy" text NOT NULL DEFAULT '',