v2.0.0
Added
- Made columns nullable by default
- Added auto-detecting of column types:
integer
,float
,datetime
,string
- Allow for a custom schema with
$schema
property orgetSchema
function:
class ModelWithCustomSchema extends Model
{
use \Sushi\Sushi;
protected $rows = [[
'string_int' => '123',
]];
protected $schema = [
'string_int' => 'integer',
];
}
(Now the $model->string_int
will be an integer instead of a string)