Skip to content

Instantly share code, notes, and snippets.

@42milez
Created August 21, 2015 07:03
Show Gist options
  • Save 42milez/01ed2447e28bb13679c2 to your computer and use it in GitHub Desktop.
Save 42milez/01ed2447e28bb13679c2 to your computer and use it in GitHub Desktop.
<?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