Changeset 47786
- Timestamp:
- 05/12/2020 06:38:02 PM (5 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r47785 r47786 2185 2185 delete_expired_transients( true ); 2186 2186 2187 // 2.8 2187 // 2.8.0 2188 2188 if ( $wp_current_db_version < 11549 ) { 2189 2189 $wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' ); … … 2216 2216 } 2217 2217 2218 // 3.0 2218 // 3.0.0 2219 2219 if ( $wp_current_db_version < 13576 ) { 2220 2220 update_site_option( 'global_terms_enabled', '1' ); 2221 2221 } 2222 2222 2223 // 3.3 2223 // 3.3.0 2224 2224 if ( $wp_current_db_version < 19390 ) { 2225 2225 update_site_option( 'initial_db_version', $wp_current_db_version ); … … 2232 2232 } 2233 2233 2234 // 3.4 2234 // 3.4.0 2235 2235 if ( $wp_current_db_version < 20148 ) { 2236 2236 // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name. … … 2250 2250 } 2251 2251 2252 // 3.5 2252 // 3.5.0 2253 2253 if ( $wp_current_db_version < 21823 ) { 2254 2254 update_site_option( 'ms_files_rewriting', '1' ); … … 2265 2265 } 2266 2266 2267 // 4.2 2267 // 4.2.0 2268 2268 if ( $wp_current_db_version < 31351 && 'utf8mb4' === $wpdb->charset ) { 2269 2269 if ( wp_should_upgrade_global_tables() ) { … … 2286 2286 } 2287 2287 2288 // 4.3 2288 // 4.3.0 2289 2289 if ( $wp_current_db_version < 33055 && 'utf8mb4' === $wpdb->charset ) { 2290 2290 if ( wp_should_upgrade_global_tables() ) { … … 2315 2315 } 2316 2316 2317 // 5.1 2317 // 5.1.0 2318 2318 if ( $wp_current_db_version < 44467 ) { 2319 2319 $network_id = get_main_network_id(); … … 2328 2328 2329 2329 /** 2330 * Creates a table in the database if it doesn't already exist.2330 * Creates a table in the database, if it doesn't already exist. 2331 2331 * 2332 2332 * This method checks for an existing database and creates a new one if it's not … … 2338 2338 * @global wpdb $wpdb WordPress database abstraction object. 2339 2339 * 2340 * @param string $table_name Database table name to create.2340 * @param string $table_name Database table name. 2341 2341 * @param string $create_ddl SQL statement to create table. 2342 * @return bool If table already exists or was created by function.2342 * @return bool True on success or if the table already exists. False on failure. 2343 2343 */ 2344 2344 function maybe_create_table( $table_name, $create_ddl ) { … … 2411 2411 2412 2412 /** 2413 * Adds column to a database table if it doesn't already exist.2413 * Adds column to a database table, if it doesn't already exist. 2414 2414 * 2415 2415 * @since 1.3.0 … … 2417 2417 * @global wpdb $wpdb WordPress database abstraction object. 2418 2418 * 2419 * @param string $table_name The table name to modify.2420 * @param string $column_name T he column name to add to the table.2421 * @param string $create_ddl The SQL statement used to add thecolumn.2422 * @return bool True if already exists or on successful completion, false on error.2419 * @param string $table_name Database table name. 2420 * @param string $column_name Table column name. 2421 * @param string $create_ddl SQL statement to add column. 2422 * @return bool True on success or if the column already exists. False on failure. 2423 2423 */ 2424 2424 function maybe_add_column( $table_name, $column_name, $create_ddl ) { … … 2452 2452 * 2453 2453 * @param string $table The table to convert. 2454 * @return bool true if the table was converted, false if it wasn't.2454 * @return bool True if the table was converted, false if it wasn't. 2455 2455 */ 2456 2456 function maybe_convert_table_to_utf8mb4( $table ) { -
trunk/src/wp-admin/install-helper.php
r47785 r47786 40 40 if ( ! function_exists( 'maybe_create_table' ) ) : 41 41 /** 42 * Create database table,if it doesn't already exist.42 * Creates a table in the database if it doesn't already exist. 43 43 * 44 44 * @since 1.0.0 … … 47 47 * 48 48 * @param string $table_name Database table name. 49 * @param string $create_ddl Create database table SQL.50 * @return bool False on error, true if already exists or success.49 * @param string $create_ddl SQL statement to create table. 50 * @return bool True on success or if the table already exists. False on failure. 51 51 */ 52 52 function maybe_create_table( $table_name, $create_ddl ) { … … 75 75 if ( ! function_exists( 'maybe_add_column' ) ) : 76 76 /** 77 * Add column to database table, if column doesn't already exist in table.77 * Adds column to database table, if it doesn't already exist. 78 78 * 79 79 * @since 1.0.0 … … 81 81 * @global wpdb $wpdb WordPress database abstraction object. 82 82 * 83 * @param string $table_name Database table name84 * @param string $column_name Table column name 85 * @param string $create_ddl SQL to add column to table.86 * @return bool False on failure. True, if already exists or was successful.83 * @param string $table_name Database table name. 84 * @param string $column_name Table column name. 85 * @param string $create_ddl SQL statement to add column. 86 * @return bool True on success or if the column already exists. False on failure. 87 87 */ 88 88 function maybe_add_column( $table_name, $column_name, $create_ddl ) { … … 110 110 111 111 /** 112 * Drop column from database table, if it exists.112 * Drops column from database table, if it exists. 113 113 * 114 114 * @since 1.0.0 … … 116 116 * @global wpdb $wpdb WordPress database abstraction object. 117 117 * 118 * @param string $table_name Table name119 * @param string $column_name Column name120 * @param string $drop_ddl SQL statement to drop column.121 * @return bool True on success or if the column doesn't exist , false on failure.118 * @param string $table_name Database table name. 119 * @param string $column_name Table column name. 120 * @param string $drop_ddl SQL statement to drop column. 121 * @return bool True on success or if the column doesn't exist. False on failure. 122 122 */ 123 123 function maybe_drop_column( $table_name, $column_name, $drop_ddl ) { … … 144 144 145 145 /** 146 * Check column matchescriteria.146 * Checks that database table column matches the criteria. 147 147 * 148 148 * Uses the SQL DESC for retrieving the table info for the column. It will help … … 163 163 * @global wpdb $wpdb WordPress database abstraction object. 164 164 * 165 * @param string $table_name Table name166 * @param string $col_name Column name167 * @param string $col_type Column type165 * @param string $table_name Database table name. 166 * @param string $col_name Table column name. 167 * @param string $col_type Table column type. 168 168 * @param bool $is_null Optional. Check is null. 169 169 * @param mixed $key Optional. Key info.
Note: See TracChangeset
for help on using the changeset viewer.