[buddypress-trac] [BuddyPress Trac] #9261: MySQL: error when creating invitations API tables

buddypress-trac noreply at wordpress.org
Mon Dec 9 13:27:09 UTC 2024


#9261: MySQL: error when creating invitations API tables
--------------------------+-------------------------
 Reporter:  espellcaste   |      Owner:  espellcaste
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  15.0.0
Component:  Friends       |    Version:  5.0.0
 Severity:  normal        |   Keywords:
--------------------------+-------------------------
 It seems there is an issue when trying to install the Invitations API
 tables and the project uses mysql 8+ (I confirmed
 [https://github.com/buddypress/wp-cli-buddypress/pull/113 here] with MySQL
 8.4).

 Here is the following error:

 {{{
 WordPress database error BLOB, TEXT, GEOMETRY or JSON column 'content'
 can't have a default value for query ALTER TABLE wp_bp_invitations ALTER
 COLUMN `content` SET DEFAULT '' made by
 }}}

 Specifically, this function `bp_core_install_invitations`. See code
 [https://github.com/buddypress/buddypress/blob/f1bffedb2c7835744169a4623c3955bea6d2796f/src
 /bp-core/admin/bp-core-admin-schema.php#L578 here].

 After a bit of research, it seems that MySQL 8.0+ doesn't accept a string
 as the default value anymore.

 See https://stackoverflow.com/questions/3466872/why-cant-a-text-column-
 have-a-default-value-in-mysql

 See https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html#data-
 type-defaults-explicit

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9261>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list