c9s/LazyRecord — pull request #5 by jaceju (2012-09-23 07:33:46+00:00)
Title: Add support for mysql enum type

新增了 MySQL Enum 型態。

範例:

namespace Annualsale\Model;

use LazyRecord\Schema\SchemaDeclare;

class UserSchema extends SchemaDeclare
{
public function schema()
{
// ...
$this->column('status')
->enum('y', 'n')
->default('y');
}
}

產生的 SQL:

status enum('y', 'n') default 'y'