Closed iyamk closed 1 year ago
I think if you have set your database fields by hand rb does not change them
255 is the limit for unsigned TINYINT
Also check if you are in fluid mode
I came up with a wrapper for creating the base and now the problem is solved:
if (is_null(R::findOne('visit')))
{
$t = R::dispense('visit');
$t->ip = '255.255.255.255';
$t->count = 1000000000;
$t->visit_date = date('Y-m-d');
R::store($t);
R::trash($t);
}
R::freeze(true);
This is much more convenient than constantly climbing into the database after deleting it.
I write statistics to the database
Type in table becomes tinyint. When I visit the page, I update the statistics
And I see an error when the number exceeds 255
Why doesn't the type change automatically? I read the documentation and there is not a word about how to assign the necessary types forever