spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.65k stars 763 forks source link

DB Import fails for tables with Generated Column #1699

Closed eyounelson closed 1 year ago

eyounelson commented 1 year ago

I have a table with a generated column that was created via Laravel migration like so:

$table->string('pair')->after('rate')->virtualAs('concat(source, \' to \', destination)');

After the DB has been backed up, attempting to restore such a table fails because the DB export attempts to insert into the pair column which it shouldn't.

I'm wandering whether this is a MySQL issue or something the package can properly handle? Right now I have to edit my DB dumps and update such insert statements.