Permalink
Browse files

Added char() column API function

  • Loading branch information...
1 parent 96093ac commit 1ba5800bddf5b9279db9a1057a8a7d116a571dae Ollie Rattue committed Jan 20, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 libraries/Schema.php
View
@@ -181,7 +181,14 @@ public function string($column_name, $constraint = 200, $options = array()) {
'constraint' => $constraint
), $options);
}
-
+
+ public function char($column_name, $constraint = 2, $options = array()) {
+ $this->add_definition_rule($column_name, array(
+ 'type' => 'CHAR',
+ 'constraint' => $constraint
+ ), $options);
+ }
+
public function text($column_name, $options = array()) {
$this->add_definition_rule($column_name, array(
'type' => 'TEXT'

0 comments on commit 1ba5800

Please sign in to comment.