TiagoSilvaPereira / vemto2-issues

Repository to track Vemto 2 Issues
5 stars 0 forks source link

Failed to open the referenced table 'usuario' #162

Closed EAP04 closed 5 months ago

EAP04 commented 5 months ago

Error Message: schema-reader-db Error: SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'usuario' (Connection: vemto_db_connection, SQL: alter table pedido add constraint pedido_usuario_id_foreign foreign key (usuario_id) references usuario (id) on delete cascade on update cascade)

Stack:

schema-reader-db Error: #0 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Connection.php(767): Illuminate\Database\Connection->runQueryCallback('alter table `pe...', Array, Object(Closure))
#1 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Connection.php(560): Illuminate\Database\Connection->run('alter table `pe...', Array, Object(Closure))
#2 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Schema\Blueprint.php(109): Illuminate\Database\Connection->statement('alter table `pe...')
#3 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php(564): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#4 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php(418): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#5 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(357): Illuminate\Database\Schema\Builder->create('pedido', Object(Closure))
#6 C:\laragon\www\albimaqlda\database\migrations\2024_06_06_081622_002_create_pedido_table.php(15): Illuminate\Support\Facades\Facade::__callStatic('create', Array)
#7 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(482): Illuminate\Database\Migrations\Migration@anonymous->up()
#8 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(408): Illuminate\Database\Migrations\Migrator->runMethod(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Migrations\Migration@anonymous), 'up')
#9 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(417): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#10 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(214): Illuminate\Database\Migrations\Migrator->runMigration(Object(Illuminate\Database\Migrations\Migration@anonymous), 'up')
#11 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(749): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#12 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(214): Illuminate\Database\Migrations\Migrator->write('Illuminate\\Cons...', '2024_06_06_0816...', Object(Closure))
#13 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(179): Illuminate\Database\Migrations\Migrator->runUp('C:\\laragon\\www\\...', 1, false)
#14 C:\laragon\www\albimaqlda\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php(122): Illuminate\Database\Migrations\Migrator->runPending(Array, Array)
#15 phar://C:/Program Files/Vemto/resources/static/VMTTL2/index.php(114): Illuminate\Database\Migrations\Migrator->run('C:\\laragon\\www\\...')
#16 phar://C:/Program Files/Vemto/resources/static/VMTTL2/common/Vemto.php(111): {closure}()
#17 phar://C:/Program Files/Vemto/resources/static/VMTTL2/index.php(20): Vemto\Vemto::execute('schema-reader-d...', Object(Closure))
#18 C:\Program Files\Vemto\resources\static\VMTTL2(14): require('phar://C:/Progr...')
#19 {main}

Vemto 2.0.16 win32 10.0.22631 Locale: pt-BR App version: 2.0.16

TiagoSilvaPereira commented 5 months ago

@EAP04 what happens when you run:

php artisan migrate

on your project?

TiagoSilvaPereira commented 5 months ago

I'm closing for now because of the lack of details. Please feel free to reopen if necessary or try again with 2.0.23