bp_core_install_activity_streams ()
为Activity组件安装数据库表。
描述
源
文件:bp-core / admin / bp-core-admin-schema.php
函数bp_core_install_activity_streams() {$sql = array();charset_collate =全局美元[' wpdb '] - > get_charset_collate ();$ bp_prefix = bp_core_get_table_prefix ();sql [] = " $ {$ bp_prefix} bp_activity创建表(id bigint (20) NOT NULL AUTO_INCREMENT主键,user_id bigint (20) NOT NULL,组件varchar (75) NOT NULL,类型为varchar (75) NOT NULL,行动文本而不是NULL,内容量变不是NULL, primary_link文本NOT NULL, item_id bigint (20) NOT NULL, secondary_item_id bigint(20)默认为空,date_recorded datetime NOT NULL, hide_sitewide bool DEFAULT 0, mptt_left int(11) NOT NULL DEFAULT 0, mptt_right int(11) NOT NULL DEFAULT 0, is_spam tinyint(1) NOT NULL DEFAULT 0, privacy varchar(75) NOT NULL DEFAULT 'public', KEY date_recorded (date_recorded), KEY user_id (user_id), KEY item_id (item_id), KEY secondary_item_id (secondary_item_id),$charset_collate ($charset_collate), $charset_collate ($charset_collate), $charset_collate ($charset_collate), $charset_collate ($charset_collate), $charset_collate ($charset_collate));$sql[] = "CREATE TABLE {$bp_prefix}bp_activity_meta (id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, activity_id bigint(20) NOT NULL, meta_key varchar(255) DEFAULT NULL, meta_value longtext DEFAULT NULL, KEY activity_id (activity_id), KEY meta_key(meta_key(191)) {$charset_collate};";dbDelta ($ sql);}
更新日志
版本 | 描述 |
---|---|
BuddyPress 1.0.0 | 介绍了。 |