Created
August 21, 2015 07:03
-
-
Save 42milez/01ed2447e28bb13679c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Aug. 21, 2015 - Akihiro TAKASE | |
* | |
* 本ファイルは User テーブル用のマイグレーションスクリプトです。 | |
* | |
*/ | |
namespace Fuel\Migrations; | |
class Create_users { | |
public function up() { | |
\DBUtil::create_table('users', array( | |
'id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true, 'unsigned' => true), | |
'name' => array('constraint' => 50, 'type' => 'varchar'), | |
'email' => array('constraint' => 255, 'type' => 'varchar'), | |
'hashed_password' => array('constraint' => 64, 'type' => 'char'), | |
'salt' => array('constraint' => 32, 'type' => 'char'), | |
're' => array('type' => 'boolean'), | |
), array('id')); | |
} | |
public function down() { | |
\DBUtil::drop_table('users'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment