|
|
|
@ -21,21 +21,20 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
|
|
|
|
* @var array mapping from abstract column types (keys) to physical column types (values). |
|
|
|
|
*/ |
|
|
|
|
public $typeMap = array( |
|
|
|
|
Schema::TYPE_PK => 'serial not null primary key', |
|
|
|
|
Schema::TYPE_STRING => 'varchar(255)', |
|
|
|
|
Schema::TYPE_TEXT => 'text', |
|
|
|
|
Schema::TYPE_SMALLINT => 'smallint', |
|
|
|
|
Schema::TYPE_INTEGER => 'integer', |
|
|
|
|
Schema::TYPE_BIGINT => 'bigint', |
|
|
|
|
Schema::TYPE_FLOAT => 'double precision', |
|
|
|
|
Schema::TYPE_DECIMAL => 'numeric(10,0)', |
|
|
|
|
Schema::TYPE_DATETIME => 'timestamp', |
|
|
|
|
Schema::TYPE_TIMESTAMP => 'timestamp', |
|
|
|
|
Schema::TYPE_TIME => 'time', |
|
|
|
|
Schema::TYPE_DATE => 'date', |
|
|
|
|
Schema::TYPE_BINARY => 'bytea', |
|
|
|
|
Schema::TYPE_BOOLEAN => 'boolean', |
|
|
|
|
Schema::TYPE_MONEY => 'numeric(19,4)', |
|
|
|
|
Schema::TYPE_PK => 'serial not null primary key', |
|
|
|
|
Schema::TYPE_STRING => 'varchar(255)', |
|
|
|
|
Schema::TYPE_TEXT => 'text', |
|
|
|
|
Schema::TYPE_SMALLINT => 'smallint', |
|
|
|
|
Schema::TYPE_INTEGER => 'integer', |
|
|
|
|
Schema::TYPE_BIGINT => 'bigint', |
|
|
|
|
Schema::TYPE_FLOAT => 'double precision', |
|
|
|
|
Schema::TYPE_DECIMAL => 'numeric(10,0)', |
|
|
|
|
Schema::TYPE_DATETIME => 'timestamp', |
|
|
|
|
Schema::TYPE_TIMESTAMP => 'timestamp', |
|
|
|
|
Schema::TYPE_TIME => 'time', |
|
|
|
|
Schema::TYPE_DATE => 'date', |
|
|
|
|
Schema::TYPE_BINARY => 'bytea', |
|
|
|
|
Schema::TYPE_BOOLEAN => 'boolean', |
|
|
|
|
Schema::TYPE_MONEY => 'numeric(19,4)', |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|