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
c4380f65
Commit
c4380f65
authored
May 25, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MySQL migration for User model
parent
f21edf76
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
.gitkeep
apps/advanced/console/migrations/.gitkeep
+0
-1
m130524_201442_init.php
apps/advanced/console/migrations/m130524_201442_init.php
+27
-0
No files found.
apps/advanced/console/migrations/.gitkeep
deleted
100644 → 0
View file @
f21edf76
*
apps/advanced/console/migrations/m130524_201442_init.php
0 → 100644
View file @
c4380f65
<?php
class
m130524_201442_init
extends
\yii\db\Migration
{
public
function
up
()
{
// MySQL-specific table options. Adjust if you plan working with another DBMS
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
$this
->
createTable
(
'tbl_user'
,
array
(
'id'
=>
Schema
::
TYPE_PK
,
'username'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'password_hash'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'email'
=>
Schema
::
TYPE_STRING
.
' NOT NULL'
,
'role'
=>
'tinyint NOT NULL DEFAULT 10'
,
'status'
=>
'tinyint NOT NULL DEFAULT 10'
,
'create_time'
=>
Schema
::
TYPE_INTEGER
.
' NOT NULL'
,
'update_time'
=>
Schema
::
TYPE_INTEGER
.
' NOT NULL'
,
),
$tableOptions
);
}
public
function
down
()
{
$this
->
dropTable
(
'tbl_user'
);
}
}
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