phpip icon indicating copy to clipboard operation
phpip copied to clipboard

php artisan migrate with MariaDB 10.5.15

Open alexandreIP opened this issue 1 year ago • 9 comments

MariaDB Server version: 10.5.15-MariaDB-0+deb11u1 Raspbian 11

PHP 8.2.1 (cli) (built: Jan 7 2023 08:34:34) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.1, Copyright (c) Zend Technologies with Zend OPcache v8.2.1, Copyright (c), by Zend Technologies

fresh install : ip@raspberrypi:/var/www/phpip $ php artisan migrate --seed

INFO Preparing database.

Creating migration table .......................................................................................................... 608ms DONE

INFO Running migrations.

2014_10_12_100000_create_password_resets_table .................................................................................... 234ms DONE 2018_12_07_184310_create_actor_role_table ......................................................................................... 482ms DONE 2018_12_07_184310_create_actor_table ............................................................................................ 1,926ms DONE 2018_12_07_184310_create_classifier_table ....................................................................................... 1,422ms DONE 2018_12_07_184310_create_classifier_type_table .................................................................................... 502ms DONE 2018_12_07_184310_create_classifier_value_table ................................................................................... 839ms DONE 2018_12_07_184310_create_country_table ............................................................................................ 365ms DONE 2018_12_07_184310_create_default_actor_table ...................................................................................... 597ms DONE 2018_12_07_184310_create_event_name_table ......................................................................................... 971ms DONE 2018_12_07_184310_create_event_table .............................................................................................. 746ms DONE 2018_12_07_184310_create_matter_actor_lnk_table ................................................................................. 1,133ms DONE 2018_12_07_184310_create_matter_category_table .................................................................................... 487ms DONE 2018_12_07_184310_create_matter_table ............................................................................................. 333ms FAIL

Illuminate\Database\QueryException

SQLSTATE[HY000]: General error: 1901 Function or expression 'concat_ws('',concat_ws('-',concat_ws('/',country,origin),type_code),idx)' cannot be used in the GENERATED ALWAYS AS clause of suffix (SQL: alter table matter add unique UID(category_code, caseref, suffix))

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 756▕ // If an exception occurs when attempting to run a query, we'll format the error 757▕ // message to include the bindings with SQL, which will make this exception a 758▕ // lot more helpful to the developer instead of just the database's errors. 759▕ catch (Exception $e) { ➜ 760▕ throw new QueryException( 761▕ $query, $this->prepareBindings($bindings), $e 762▕ ); 763▕ } 764▕ }

  +12 vendor frames 

13 database/migrations/2018_12_07_184310_create_matter_table.php:15 Illuminate\Support\Facades\Facade::__callStatic()

  +25 vendor frames 

39 artisan:35 Illuminate\Foundation\Console\Kernel::handle()

alexandreIP avatar Jan 27 '23 11:01 alexandreIP