e2a167028b 
					 
					
						
						
							
							Upgrade to PSR12 coding standard ( #20121 )  
						
						
						
						
					 
					
						2024-03-19 17:21:27 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						161526cd41 
					 
					
						
						
							
							HTTPS everywhere ( #19503 )  
						
						
						
						
					 
					
						2022-08-03 12:32:18 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4628b91e73 
					 
					
						
						
							
							Fix types ( #19332 )  
						
						... 
						
						
						
						* Migration::upsert() returns void
* Unneeded `@property` tags
* Add missing `null` param/return types
* Null types for db\Query + db\ActiveQuery
* Fixed testSelect 
						
						
					 
					
						2022-03-30 18:40:10 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						540a9011af 
					 
					
						
						
							
							release version 2.0.43  
						
						
						
						
					 
					
						2021-08-09 20:38:43 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						17742cb146 
					 
					
						
						
							
							don't convert int to string if db type of column is numeric ( #18741 )  
						
						... 
						
						
						
						* write adequate test for issue #14663 
* don't convert int to string if db type of column is numeric (#14663 )
* fix bigint schema test for MySql >8.0.17 (#14663 )
* Update CHANGELOG.md
* Update CHANGELOG.md
* update phpdoc [ci skip] (#14663 )
* refactoring test case to make it clearer [ci skip] (#14663 )
* check `int unsigned` in `QueryBuilderTest::testInsertInteger()` (#14663 )
* Update Upgrade.md (#14663 )
* fix `int unsigned` schema test for MySql >8.0.17 (#14663 )
* fix `int unsigned` schema test for MySql <5.7 (#14663 )
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Bizley <pawel@positive.codes> 
						
						
					 
					
						2021-07-06 20:49:01 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4fba562cd0 
					 
					
						
						
							
							New attemp  
						
						
						
						
					 
					
						2021-04-26 19:24:14 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						df91a9608f 
					 
					
						
						
							
							Fixes   #14638 : Added yii\db\SchemaBuilderTrait::tinyInteger()  
						
						
						
						
					 
					
						2018-02-12 12:01:21 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						93bbf5b39d 
					 
					
						
						
							
							Fixes   #15015 : Added StringHelper::floatToString() to savely cast float values independent of the locale, also fixes some places in the framework that use it now  
						
						
						
						
					 
					
						2017-10-27 11:41:45 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						5a8c3d537b 
					 
					
						
						
							
							Enable phpdoc_summary rule in php-cs-fixer config ( #14675 )  
						
						... 
						
						
						
						* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc". 
						
						
					 
					
						2017-08-21 11:19:35 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						1501c659ac 
					 
					
						
						
							
							Add empty lines before return statements. ( #14682 ) [skip ci]  
						
						
						
						
					 
					
						2017-08-21 01:58:49 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						69673c0c94 
					 
					
						
						
							
							Rename Object -> BaseObject for PHP 7.2 compatibility  
						
						... 
						
						
						
						issue #7936  
						
						
					 
					
						2017-07-19 10:51:46 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						fe8a0a6a2e 
					 
					
						
						
							
							Enable no_useless_else rule in php-cs-fixer ( #14420 )  
						
						
						
						
					 
					
						2017-07-10 11:26:21 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						ae83dd0524 
					 
					
						
						
							
							Fixes   #13128 : Fixed incorrect position of {pos} string in ColumnSchemaBuilder __toString  
						
						
						
						
					 
					
						2016-12-11 23:36:35 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4aa935e69e 
					 
					
						
						
							
							Fixes   #12055 : Changed boolean to bool and integer to int in phpdoc  
						
						
						
						
					 
					
						2016-11-07 02:51:39 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						876ef142c1 
					 
					
						
						
							
							Remove explicit property initialization with null  
						
						
						
						
					 
					
						2016-07-30 00:18:05 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						ee92cfa7ba 
					 
					
						
						
							
							release version 2.0.9  
						
						
						
						
					 
					
						2016-07-11 15:36:42 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						099b364b14 
					 
					
						
						
							
							Fixed   #9574 : Implicit run ColumnSchemaBuilder::null() when default value is set to null. ( #11813 )  
						
						
						
						
					 
					
						2016-06-25 15:52:11 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						bafc8b3325 
					 
					
						
						
							
							Fixes   #10422 ,  #9574 : New proposal fix for ColumnSchemaBuilder not null column  
						
						... 
						
						
						
						* Added ability to explicitly set column nullability #10422 
* Removed isNull property.
* add since tag. 
						
						
					 
					
						2016-06-18 15:03:55 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						bde00be202 
					 
					
						
						
							
							ColumnSchemaBuilder can not work with custom types  
						
						... 
						
						
						
						In our project we use trait with custom types, example:
```php
trait MigrationToolTrait
{
    protected function dateTimeWithTZ ($precision = null)
    {
        if ('pgsql' === $this->db->driverName) {
            return $this->getDb()->getSchema()->createColumnSchemaBuilder(sprintf('timestamp(%d) with time zone', $precision));
        }
        return $this->dateTime($precision);
    }
}
```
usage:
```php
class m160516_161900_init
{
    use MigrationToolTrait;
    public function safeUp ()
    {
        $this->createTable('testing', [
            'id' => $this->primaryKey(),
            'startDate' => $this->dateTimeWithTZ()->notNull()->defaultExpression('now()'),
        ]);
    }
    public function safeDown ()
    {
        $this->dropTable('testing');
    }
}
```
In version 2.0.8 MigrateController generate notice:
PHP Notice 'yii\base\ErrorException' with message 'Undefined index: timestamp(0) with time zone' in vendor/yiisoft/yii2/db/ColumnSchemaBuilder.php:366
We offer our change to fix it. 
						
						
					 
					
						2016-05-22 12:03:44 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4d809af0ff 
					 
					
						
						
							
							Fixed @since tag  
						
						
						
						
					 
					
						2016-05-13 17:29:25 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						94d0bd9ae7 
					 
					
						
						
							
							Fixed method name  
						
						
						
						
					 
					
						2016-05-13 16:05:38 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						27866bf9d6 
					 
					
						
						
							
							Changed name to append(), fixed phpdoc, added changelog  
						
						
						
						
					 
					
						2016-05-13 15:58:06 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						66eabda770 
					 
					
						
						
							
							Fixes   #11195 : Added ability to append custom string to schema builder column definition  
						
						
						
						
					 
					
						2016-05-13 15:57:54 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						731769241b 
					 
					
						
						
							
							release version 2.0.8  
						
						
						
						
					 
					
						2016-04-28 16:50:20 +02:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						15432971d6 
					 
					
						
						
							
							db/ColumnSchemaBuilder::buildCommentString() returns empty string by default  
						
						
						
						
					 
					
						2016-04-20 09:26:07 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						0fe27b9d3b 
					 
					
						
						
							
							Refactored code in PR  #9441  
						
						
						
						
					 
					
						2016-04-19 17:48:25 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c9dfc90be0 
					 
					
						
						
							
							Merge branch 'methods_for_schema_builder' of  https://github.com/vaseninm/yii2  into vaseninm-methods_for_schema_builder  
						
						
						
						
					 
					
						2016-04-19 12:21:33 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						5c4001d84b 
					 
					
						
						
							
							Schema Builder Patterns Excel document in /docs folder (temp storage).  
						
						... 
						
						
						
						Fixed some schema builder patterns.
Added more information to upgrade docs. 
						
						
					 
					
						2016-03-14 05:29:42 -07:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						98ac811858 
					 
					
						
						
							
							Unsigned switch is now set when calling unsigned() on pks.  
						
						
						
						
					 
					
						2016-02-26 19:58:35 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						2f91889b70 
					 
					
						
						
							
							Removed unsignedPrimaryKey() schema builder type; now, the unsigned() modifier works with primary key types e.g. pk()->unsigned() or bigpk()->unsigned().  
						
						
						
						
					 
					
						2016-02-26 17:48:03 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b697e173fc 
					 
					
						
						
							
							Fixed unsigned() modifier to enable use with PKs.  
						
						
						
						
					 
					
						2016-02-26 14:14:52 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						553cca642c 
					 
					
						
						
							
							Reverted unsigned() pk modifier  
						
						
						
						
					 
					
						2016-02-26 06:09:22 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						030ee68b01 
					 
					
						
						
							
							Testing unsigned() modifier on PKs (now $this->primaryKey()->unsigned() works)  
						
						
						
						
					 
					
						2016-02-26 04:39:05 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						3761682edf 
					 
					
						
						
							
							Upgraded some tests. Fixed MySQL test fixtures to create all tables with InnoDB.  
						
						
						
						
					 
					
						2016-02-22 04:53:14 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						81ff4752d9 
					 
					
						
						
							
							Added CHECK modifier to PK schema pattern. Modified UNSIGNED tests to not include modifier by default (i.e. only present when testing DBMSes that support it).  
						
						
						
						
					 
					
						2016-02-22 04:06:17 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						96fa375b16 
					 
					
						
						
							
							Refactored to a more functional way of accessing database connection  
						
						
						
						
					 
					
						2016-02-21 05:05:54 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						f52f60db0f 
					 
					
						
						
							
							Renamed category constants  
						
						
						
						
					 
					
						2016-02-21 02:06:41 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c50ba2e800 
					 
					
						
						
							
							Fixed comment [skip ci]  
						
						
						
						
					 
					
						2016-02-20 16:06:17 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						d18563bd38 
					 
					
						
						
							
							Fixed comment formatting. Renamed ColumnSchemaBuilder::CAT_TEXT to ColumnSchemaBuilder::CAT_STRING. [skip ci]  
						
						
						
						
					 
					
						2016-02-20 15:55:59 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						51b99320bd 
					 
					
						
						
							
							Sqlite specific schema builder class actually gets loaded now  
						
						
						
						
					 
					
						2016-02-20 06:53:31 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						0400eb9cee 
					 
					
						
						
							
							Resolved merge conflict in changelog  
						
						
						
						
					 
					
						2016-02-18 02:34:02 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						386aacae5c 
					 
					
						
						
							
							Fixes   #10422 : yii\db\ColumnSchemaBuilder::buildNotNullString now returns NULL instead of empty string to properly work with MSSQL (reverted from commit 2498a9b3bb8b1b535b0dfc451218217a63610eb7)  
						
						
						
						
					 
					
						2016-02-16 01:39:42 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						2498a9b3bb 
					 
					
						
						
							
							Fixes   #10422 : yii\db\ColumnSchemaBuilder::buildNotNullString now returns NULL instead of empty string to properly work with MSSQL  
						
						
						
						
					 
					
						2016-02-15 23:55:34 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						e43c41c9ea 
					 
					
						
						
							
							db layer phpdoc fixes  
						
						
						
						
					 
					
						2016-02-07 16:33:26 +01:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						85fdc143d6 
					 
					
						
						
							
							Documentation fix  
						
						
						
						
					 
					
						2015-12-28 06:45:01 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						bce61bd474 
					 
					
						
						
							
							Add after() option to migrations schema builder  
						
						
						
						
					 
					
						2015-12-28 06:34:46 -08:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						5cecb09c1b 
					 
					
						
						
							
							Fixes   #9443 : Added unsigned() to ColumnSchemaBuilder  
						
						
						
						
					 
					
						2015-12-26 15:20:21 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						7641d2d83b 
					 
					
						
						
							
							Enhanced  #9337  as @klimov-paul suggested in  e94810551c (commitcomment-14335135) 
						
						
						
						
					 
					
						2015-11-11 21:14:23 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						e94810551c 
					 
					
						
						
							
							Fixes   #9337 : Added yii\db\ColumnSchemaBuilder::defaultExpression() to support DB Expression as default value  
						
						
						
						
					 
					
						2015-11-11 20:42:07 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						afda00d434 
					 
					
						
						
							
							add sqllite dummy  
						
						
						
						
					 
					
						2015-08-17 14:44:53 +03:00