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
7fa3b699
Commit
7fa3b699
authored
Nov 27, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted advanced app migration so it is now OK for non-mysql
parent
c1268315
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
m130524_201442_init.php
apps/advanced/console/migrations/m130524_201442_init.php
+11
-9
No files found.
apps/advanced/console/migrations/m130524_201442_init.php
View file @
7fa3b699
...
@@ -6,19 +6,21 @@ class m130524_201442_init extends \yii\db\Migration
...
@@ -6,19 +6,21 @@ class m130524_201442_init extends \yii\db\Migration
{
{
public
function
up
()
public
function
up
()
{
{
// MySQL-specific table options. Adjust if you plan working with another DBMS
$tableOptions
=
null
;
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
'tbl_user'
,
[
$this
->
createTable
(
'tbl_user'
,
[
'id'
=>
Schema
::
TYPE_PK
,
'id'
=>
Schema
::
TYPE_PK
,
'username'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'username'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'auth_key'
=>
Schema
::
TYPE_STRING
.
'(32) NOT NULL'
,
'auth_key'
=>
Schema
::
TYPE_STRING
.
'(32) NOT NULL'
,
'password_hash'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'password_hash'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'password_reset_token'
=>
Schema
::
TYPE_STRING
.
'(32)'
,
'password_reset_token'
=>
Schema
::
TYPE_STRING
.
'(32)'
,
'email'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'email'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'role'
=>
'tinyint
NOT NULL DEFAULT 10'
,
'role'
=>
Schema
::
TYPE_SMALLINT
.
'
NOT NULL DEFAULT 10'
,
'status'
=>
'tinyint
NOT NULL DEFAULT 10'
,
'status'
=>
Schema
::
TYPE_SMALLINT
.
'
NOT NULL DEFAULT 10'
,
'create_time'
=>
Schema
::
TYPE_INTEGER
.
' NOT NULL'
,
'create_time'
=>
Schema
::
TYPE_INTEGER
.
' NOT NULL'
,
'update_time'
=>
Schema
::
TYPE_INTEGER
.
' NOT NULL'
,
'update_time'
=>
Schema
::
TYPE_INTEGER
.
' NOT NULL'
,
],
$tableOptions
);
],
$tableOptions
);
...
...
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