26 lines
		
	
	
		
			601 B
		
	
	
	
		
			PHP
		
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			601 B
		
	
	
	
		
			PHP
		
	
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								declare(strict_types=1);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use Migrations\BaseMigration;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class AddDefaultSkuToProductSkus extends BaseMigration
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    /**
							 | 
						||
| 
								 | 
							
								     * Change Method.
							 | 
						||
| 
								 | 
							
								     *
							 | 
						||
| 
								 | 
							
								     * More information on this method is available here:
							 | 
						||
| 
								 | 
							
								     * https://book.cakephp.org/migrations/4/en/migrations.html#the-change-method
							 | 
						||
| 
								 | 
							
								     * @return void
							 | 
						||
| 
								 | 
							
								     */
							 | 
						||
| 
								 | 
							
								    public function change(): void
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $table = $this->table('product_skus');
							 | 
						||
| 
								 | 
							
								        $table->addColumn('default_sku', 'boolean', [
							 | 
						||
| 
								 | 
							
								            'default' => false,
							 | 
						||
| 
								 | 
							
								            'limit' => 11,
							 | 
						||
| 
								 | 
							
								            'null' => false,
							 | 
						||
| 
								 | 
							
								        ]);
							 | 
						||
| 
								 | 
							
								        $table->update();
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |