|
|
@@ -34,6 +34,7 @@ class Schema {
|
|
|
protected $_fieldDefaults = [
|
|
|
'type' => null,
|
|
|
'length' => null,
|
|
|
+ 'precision' => null,
|
|
|
'required' => false,
|
|
|
];
|
|
|
|
|
|
@@ -101,22 +102,6 @@ class Schema {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Check whether or not a field is required.
|
|
|
- *
|
|
|
- * Fields that are not defined in the schema are not required.
|
|
|
- *
|
|
|
- * @param string $name The name of the field.
|
|
|
- * @return bool Whether or not a field is required.
|
|
|
- */
|
|
|
- public function isRequired($name) {
|
|
|
- $field = $this->field($name);
|
|
|
- if (!$field) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- return (bool) $field['required'];
|
|
|
- }
|
|
|
-
|
|
|
-/**
|
|
|
* Get the type of the named field.
|
|
|
*
|
|
|
* @param string $field The name of the field.
|