Considerando que tentei com as foreign keys
e sem, o quê tem de errado nas migrations , que não gera a segunda tabela, postagens?
Saída no terminal:
php artisan migrate
Migrating: 2019_01_17_164906_create_usuarios_table
Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view already > exists: 1050 Table 'usuarios' already exists (SQL: create table
usuarios(
idint unsigned not null auto_increment primary key,
postagem_idint unsigned not null,
emailvarchar(191) not null,
senhavarchar(191) not null,
imagemvarchar(100) null,
nomevarchar(30) not null,
sobrenomevarchar(50) not null,
idadeint not null,
estadoenum('Acre', 'Alagoas', 'Amapá', 'Amazonas', 'Bahia', 'Ceará', 'Distrito Federal', 'Espírito Santo', 'Goiás', 'Maranhão', 'Mato Grosso', 'Mato Grosso do Sul', 'Minas Gerais', 'Pará', 'Paraíba', 'Paraná', 'Pernambuco', 'Piauí', 'Rio de Janeiro', 'Rio Grande do Norte', 'Rio Grande do Sul','Rondônia', 'Roraima', 'Santa Catarina', 'São Paulo', 'Sergipe', 'Tocantins') not null,
created_attimestamp null,
updated_attimestamp null,
deleted_at` timestamp null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’)at /opt/lampp/htdocs/utilitarios/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we’ll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database’s errors.
663| catch (Exception $e) {
664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|`
Exception trace:
PDOException::(“SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘usuarios’ already exists”) /opt/lampp/htdocs/utilitarios/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
PDOStatement::execute() /opt/lampp/htdocs/utilitarios/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
Please use the argument -v to see more details.
leandro@leandro-B85M-D3PH:/opt/lampp/htdocs/utilitarios$