File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ public function initialize(array $config): void {
6666 throw new RuntimeException ('Fields and Map need to be of the same length if map is specified. ' );
6767 }
6868 foreach ($ this ->_config ['fields ' ] as $ field ) {
69- $ this ->_table ->getSchema ()->setColumnType ($ field , 'array ' );
69+ if ($ this ->_table ->getSchema ()->getColumnType ($ field ) !== 'json ' ) {
70+ $ this ->_table ->getSchema ()->setColumnType ($ field , 'json ' );
71+ }
7072 }
7173 if ($ this ->_config ['encodeParams ' ]['options ' ] === null ) {
7274 $ options = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_ERROR_INF_OR_NAN | JSON_PARTIAL_OUTPUT_ON_ERROR ;
Original file line number Diff line number Diff line change @@ -125,16 +125,8 @@ public function initialize(array $config): void {
125125 'WorkerProcesses.workerkey = QueuedJobs.workerkey ' ,
126126 ],
127127 ]);
128- }
129-
130- /**
131- * @return \Cake\Database\Schema\TableSchemaInterface
132- */
133- public function getSchema (): TableSchemaInterface {
134- $ schema = parent ::getSchema ();
135- $ schema ->setColumnType ('data ' , 'json ' );
136128
137- return $ schema ;
129+ $ this -> getSchema ()-> setColumnType ( ' data ' , ' json ' ) ;
138130 }
139131
140132 /**
You can’t perform that action at this time.
0 commit comments