Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
523a63f5
Commit
523a63f5
authored
Sep 15, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added TYPE_BIGPK to Schema
parent
a2b4ef0f
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
0 deletions
+8
-0
QueryBuilder.php
framework/yii/db/QueryBuilder.php
+1
-0
Schema.php
framework/yii/db/Schema.php
+1
-0
QueryBuilder.php
framework/yii/db/cubrid/QueryBuilder.php
+1
-0
QueryBuilder.php
framework/yii/db/mssql/QueryBuilder.php
+1
-0
QueryBuilder.php
framework/yii/db/mysql/QueryBuilder.php
+2
-0
QueryBuilder.php
framework/yii/db/pgsql/QueryBuilder.php
+1
-0
Schema.php
framework/yii/db/pgsql/Schema.php
+0
-0
QueryBuilder.php
framework/yii/db/sqlite/QueryBuilder.php
+1
-0
No files found.
framework/yii/db/QueryBuilder.php
View file @
523a63f5
...
@@ -491,6 +491,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -491,6 +491,7 @@ class QueryBuilder extends \yii\base\Object
* physical types):
* physical types):
*
*
* - `pk`: an auto-incremental primary key type, will be converted into "int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY"
* - `pk`: an auto-incremental primary key type, will be converted into "int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY"
* - `bigpk`: an auto-incremental primary key type, will be converted into "bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY"
* - `string`: string type, will be converted into "varchar(255)"
* - `string`: string type, will be converted into "varchar(255)"
* - `text`: a long string type, will be converted into "text"
* - `text`: a long string type, will be converted into "text"
* - `smallint`: a small integer type, will be converted into "smallint(6)"
* - `smallint`: a small integer type, will be converted into "smallint(6)"
...
...
framework/yii/db/Schema.php
View file @
523a63f5
...
@@ -35,6 +35,7 @@ abstract class Schema extends Object
...
@@ -35,6 +35,7 @@ abstract class Schema extends Object
* The followings are the supported abstract column data types.
* The followings are the supported abstract column data types.
*/
*/
const
TYPE_PK
=
'pk'
;
const
TYPE_PK
=
'pk'
;
const
TYPE_BIGPK
=
'bigpk'
;
const
TYPE_STRING
=
'string'
;
const
TYPE_STRING
=
'string'
;
const
TYPE_TEXT
=
'text'
;
const
TYPE_TEXT
=
'text'
;
const
TYPE_SMALLINT
=
'smallint'
;
const
TYPE_SMALLINT
=
'smallint'
;
...
...
framework/yii/db/cubrid/QueryBuilder.php
View file @
523a63f5
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
*/
public
$typeMap
=
array
(
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'int NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_PK
=>
'int NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_BIGPK
=>
'bigint NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'varchar'
,
Schema
::
TYPE_TEXT
=>
'varchar'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
...
...
framework/yii/db/mssql/QueryBuilder.php
View file @
523a63f5
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
*/
public
$typeMap
=
array
(
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'int IDENTITY PRIMARY KEY'
,
Schema
::
TYPE_PK
=>
'int IDENTITY PRIMARY KEY'
,
Schema
::
TYPE_BIGPK
=>
'bigint IDENTITY PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint(6)'
,
Schema
::
TYPE_SMALLINT
=>
'smallint(6)'
,
...
...
framework/yii/db/mysql/QueryBuilder.php
View file @
523a63f5
...
@@ -9,6 +9,7 @@ namespace yii\db\mysql;
...
@@ -9,6 +9,7 @@ namespace yii\db\mysql;
use
yii\db\Exception
;
use
yii\db\Exception
;
use
yii\base\InvalidParamException
;
use
yii\base\InvalidParamException
;
use
yii\db\sqlite\Schema
;
/**
/**
* QueryBuilder is the query builder for MySQL databases.
* QueryBuilder is the query builder for MySQL databases.
...
@@ -23,6 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
...
@@ -23,6 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
*/
public
$typeMap
=
array
(
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_PK
=>
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_BIGPK
=>
'bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint(6)'
,
Schema
::
TYPE_SMALLINT
=>
'smallint(6)'
,
...
...
framework/yii/db/pgsql/QueryBuilder.php
View file @
523a63f5
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
*/
public
$typeMap
=
array
(
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'serial NOT NULL PRIMARY KEY'
,
Schema
::
TYPE_PK
=>
'serial NOT NULL PRIMARY KEY'
,
Schema
::
TYPE_BIGPK
=>
'bigserial NOT NULL PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
...
...
framework/yii/db/pgsql/Schema.php
View file @
523a63f5
framework/yii/db/sqlite/QueryBuilder.php
View file @
523a63f5
...
@@ -24,6 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
...
@@ -24,6 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
*/
public
$typeMap
=
array
(
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'integer PRIMARY KEY AUTOINCREMENT NOT NULL'
,
Schema
::
TYPE_PK
=>
'integer PRIMARY KEY AUTOINCREMENT NOT NULL'
,
Schema
::
TYPE_BIGPK
=>
'integer PRIMARY KEY AUTOINCREMENT NOT NULL'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment