0 votes

Skipper Beta:

I was experiencing an irritating error after I imported my project from MariaDB using the Laravel external import tool.

Laravel Error:
"message": "Undefined offset: 1",
"exception": "ErrorException",
"file": "/var/www/projectname/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php",

After a lot of experimenting and reading Laravel documentation, I found out that the bug came from decimals and attribute casting.

"When casting to decimal, you should define the number of digits, eg. decimal:2"

The import failed to grab the decimal arguments. If it not possible to grab them, it should default to some other value.

After manually setting the decimal digits the export to Laravel worked perfectly.

in Solved by (180 points)
recategorized by

Thanks for the info.

Decimal size should be imported correctly, but we tested that only via MySQL. It's possible that MariaDB is returning this param in a slightly different way and because of that it's wrongly imported

Can I ask you for one example SQL DDL of the wrongly imported table? (CREATE TABLE .... command)?

We will try it directly on MariaDB engine.


1 Answer

+1 vote
Best answer

We just found the issue.

"scale" parameter was wronlgy imported to "scale" instead of "decimal" for Laravel frameworks.

This issue is now fixed in latest beta: https://support.skipper18.com/402/downloads-skipper-beta

Thank you for reporting this issue.

by Skipper developer (141k points)
selected by

Great to hear!