0

Hello im begginer at laravel I was given a repo with database, and then when i want run new migration -php artisan migrate it gives an exception like this picture, anyone know how to solve this? thx before

laravel\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "personal_access_tokens" already exists")

laravel\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:119 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))

enter image description here

2
  • try using php artisan migrate:fresh --force Commented Mar 9, 2022 at 12:03
  • thxx mister, this is worked! :) Commented Mar 10, 2022 at 9:16

1 Answer 1

0

Try to follow those steps:

1.Run git clone <project-name-from-github>
2.Run composer install
3.Run cp .env.example .env
4.Run php artisan key:generate
5.Run php artisan migrate or php artisan migrate:fresh --force
6.Run php artisan serve
Sign up to request clarification or add additional context in comments.

1 Comment

You're welcoming, happy coding ^^

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.