db/ColumnSchemaBuilder::buildCommentString() returns empty string by default

This commit is contained in:
SilverFire - Dmitry Naumenko
2016-04-20 09:26:07 +03:00
parent 8999e66e71
commit 15432971d6
9 changed files with 19 additions and 90 deletions

View File

@ -372,7 +372,7 @@ class ColumnSchemaBuilder extends Object
*/
protected function buildCommentString()
{
return $this->comment !== null ? " COMMENT " . $this->db->quoteValue($this->comment) : '';
return '';
}
/**

View File

@ -43,6 +43,14 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
return $this->isFirst ? ' FIRST' : '';
}
/**
* @inheritdoc
*/
protected function buildCommentString()
{
return $this->comment !== null ? " COMMENT " . $this->db->quoteValue($this->comment) : '';
}
/**
* @inheritdoc
*/

View File

@ -1,27 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\db\mssql;
use yii\db\ColumnSchemaBuilder as AbstractColumnSchemaBuilder;
/**
* ColumnSchemaBuilder is the schema builder for Oracle databases.
*
* @author Vasenin Matvey <vaseninm@gmail.com>
* @since 2.0.6
*/
class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
{
/**
* @inheritdoc
*/
protected function buildCommentString()
{
return '';
}
}

View File

@ -124,15 +124,6 @@ class Schema extends \yii\db\Schema
return new QueryBuilder($this->db);
}
/**
* @inheritdoc
* @return ColumnSchemaBuilder column schema builder instance
*/
public function createColumnSchemaBuilder($type, $length = null)
{
return new ColumnSchemaBuilder($type, $length);
}
/**
* Loads the metadata for the specified table.
* @param string $name table name

View File

@ -43,6 +43,14 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
return $this->isFirst ? ' FIRST' : '';
}
/**
* @inheritdoc
*/
protected function buildCommentString()
{
return $this->comment !== null ? " COMMENT " . $this->db->quoteValue($this->comment) : '';
}
/**
* @inheritdoc
*/

View File

@ -13,7 +13,8 @@ use yii\db\ColumnSchemaBuilder as AbstractColumnSchemaBuilder;
* ColumnSchemaBuilder is the schema builder for Oracle databases.
*
* @author Vasenin Matvey <vaseninm@gmail.com>
* @since 2.0.6
* @author Chris Harris <chris@buckshotsoftware.com>
* @since 2.0.8
*/
class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
{
@ -60,12 +61,4 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
}
return $this->buildCompleteString($format);
}
/**
* @inheritdoc
*/
protected function buildCommentString()
{
return '';
}
}

View File

@ -1,27 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\db\pgsql;
use yii\db\ColumnSchemaBuilder as AbstractColumnSchemaBuilder;
/**
* ColumnSchemaBuilder is the schema builder for Postgres databases.
*
* @author Vasenin Matvey <vaseninm@gmail.com>
* @since 2.0.6
*/
class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
{
/**
* @inheritdoc
*/
protected function buildCommentString()
{
return '';
}
}

View File

@ -118,15 +118,6 @@ class Schema extends \yii\db\Schema
return new QueryBuilder($this->db);
}
/**
* @inheritdoc
* @return ColumnSchemaBuilder column schema builder instance
*/
public function createColumnSchemaBuilder($type, $length = null)
{
return new ColumnSchemaBuilder($type, $length);
}
/**
* Resolves the table name and schema name (if any).
* @param TableSchema $table the table metadata object

View File

@ -44,12 +44,4 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
return $this->buildCompleteString($format);
}
/**
* @inheritdoc
*/
protected function buildCommentString()
{
return '';
}
}