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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
1 deletion
+9
-1
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
+1
-1
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
* physical types):
*
* - `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)"
* - `text`: a long string type, will be converted into "text"
* - `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
* The followings are the supported abstract column data types.
*/
const
TYPE_PK
=
'pk'
;
const
TYPE_BIGPK
=
'bigpk'
;
const
TYPE_STRING
=
'string'
;
const
TYPE_TEXT
=
'text'
;
const
TYPE_SMALLINT
=
'smallint'
;
...
...
framework/yii/db/cubrid/QueryBuilder.php
View file @
523a63f5
...
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
public
$typeMap
=
array
(
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_TEXT
=>
'varchar'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
...
...
framework/yii/db/mssql/QueryBuilder.php
View file @
523a63f5
...
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'int IDENTITY PRIMARY KEY'
,
Schema
::
TYPE_BIGPK
=>
'bigint IDENTITY PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint(6)'
,
...
...
framework/yii/db/mysql/QueryBuilder.php
View file @
523a63f5
...
...
@@ -9,6 +9,7 @@ namespace yii\db\mysql;
use
yii\db\Exception
;
use
yii\base\InvalidParamException
;
use
yii\db\sqlite\Schema
;
/**
* QueryBuilder is the query builder for MySQL databases.
...
...
@@ -23,6 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
public
$typeMap
=
array
(
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_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint(6)'
,
...
...
framework/yii/db/pgsql/QueryBuilder.php
View file @
523a63f5
...
...
@@ -22,6 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
public
$typeMap
=
array
(
Schema
::
TYPE_PK
=>
'serial NOT NULL PRIMARY KEY'
,
Schema
::
TYPE_BIGPK
=>
'bigserial NOT NULL PRIMARY KEY'
,
Schema
::
TYPE_STRING
=>
'varchar(255)'
,
Schema
::
TYPE_TEXT
=>
'text'
,
Schema
::
TYPE_SMALLINT
=>
'smallint'
,
...
...
framework/yii/db/pgsql/Schema.php
View file @
523a63f5
...
...
@@ -255,7 +255,7 @@ SELECT
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
...
...
framework/yii/db/sqlite/QueryBuilder.php
View file @
523a63f5
...
...
@@ -24,6 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
public
$typeMap
=
array
(
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_TEXT
=>
'text'
,
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