File tree Expand file tree Collapse file tree
src/Schema/Tables/Contracts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file. This project adhere to the [ Semantic Versioning] ( http://semver.org/ ) standard.
44
5+ ## [ 3.1.3] 2025-10-08
6+
7+ * Fix - Fix the ` get_current_schema ` method to cache the schema of each implementation.
8+
9+ [ 3.1.3 ] : https://github.com/stellarwp/schema/releases/tag/3.1.3
10+
511## [ 3.1.2] 2025-10-02
612
713* Fix - Fix the ` update_many ` method to properly check if the transaction was successful.
Original file line number Diff line number Diff line change @@ -157,10 +157,10 @@ public static function get_searchable_columns(): Column_Collection {
157157 * @throws RuntimeException If the current schema version is not found in the schema history.
158158 */
159159 public static function get_current_schema (): Table_Schema_Interface {
160- static $ current_schema = null ;
160+ static $ current_schema = [] ;
161161
162- if ( null !== $ current_schema ) {
163- return $ current_schema ;
162+ if ( ! empty ( $ current_schema[ static ::class ] ) ) {
163+ return $ current_schema[ static ::class ] ;
164164 }
165165
166166 $ history = static ::get_schema_history ();
@@ -169,9 +169,9 @@ public static function get_current_schema(): Table_Schema_Interface {
169169 throw new RuntimeException ( 'The current schema version is not found in the schema history. ' );
170170 }
171171
172- $ current_schema = $ history [ static ::SCHEMA_VERSION ]();
172+ $ current_schema[ static ::class ] = $ history [ static ::SCHEMA_VERSION ]();
173173
174- return $ current_schema ;
174+ return $ current_schema[ static ::class ] ;
175175 }
176176
177177 /**
You can’t perform that action at this time.
0 commit comments