Skip to content

Commit c08b703

Browse files
committed
Collaboration: Bump db_version to 61840 so upgrade_700() re-runs
The previous gate (< 61699) was below trunk's existing db_version of 61833, which meant sites that had already run upgrade_700() would not re-run it and the new collaboration table would never be created via the upgrade path. Aligns the gate, version check, and feature guard to 61840 with headroom for additional schema changes this cycle.
1 parent d5f00f6 commit c08b703

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/wp-admin/includes/upgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ function upgrade_all() {
886886
upgrade_682();
887887
}
888888

889-
if ( $wp_current_db_version < 61699 ) {
889+
if ( $wp_current_db_version < 61840 ) {
890890
upgrade_700();
891891
}
892892

src/wp-includes/collaboration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
* Checks whether real-time collaboration is enabled.
1111
*
1212
* The feature requires both the site option and the database schema
13-
* introduced in db_version 61699.
13+
* introduced in db_version 61840.
1414
*
1515
* @since 7.0.0
1616
*
1717
* @return bool True if collaboration is enabled, false otherwise.
1818
*/
1919
function wp_is_collaboration_enabled() {
2020
return get_option( 'wp_enable_real_time_collaboration' )
21-
&& get_option( 'db_version' ) >= 61699;
21+
&& get_option( 'db_version' ) >= 61840;
2222
}
2323

2424
/**

src/wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @global int $wp_db_version
2525
*/
26-
$wp_db_version = 61834;
26+
$wp_db_version = 61840;
2727

2828
/**
2929
* Holds the TinyMCE version.

tests/phpunit/tests/rest-api/rest-collaboration-server.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,15 +1281,15 @@ public function test_cron_cleanup_hook_is_registered(): void {
12811281
* @ticket 64696
12821282
*/
12831283
public function test_collaboration_routes_not_registered_when_db_version_is_old(): void {
1284-
update_option( 'db_version', 61698 );
1284+
update_option( 'db_version', 61839 );
12851285

12861286
// Reset the global REST server so rest_get_server() builds a fresh instance.
12871287
$GLOBALS['wp_rest_server'] = null;
12881288

12891289
$server = rest_get_server();
12901290
$routes = $server->get_routes();
12911291

1292-
$this->assertArrayNotHasKey( '/wp-collaboration/v1/updates', $routes, 'Collaboration routes should not be registered when db_version is below 61699.' );
1292+
$this->assertArrayNotHasKey( '/wp-collaboration/v1/updates', $routes, 'Collaboration routes should not be registered when db_version is below 61840.' );
12931293

12941294
// Reset again so subsequent tests get a server with the correct db_version.
12951295
$GLOBALS['wp_rest_server'] = null;

0 commit comments

Comments
 (0)