Laravel 5.5 Error Base table or view already exists: 1050 Table 'users' already exists

前端 未结 15 1299
温柔的废话
温柔的废话 2020-11-30 10:22

Specifications:

  • Laravel Version: 5.5.3
  • PHP Version: 7.1
  • Database Driver & Version: MariaDB 10.1.26

15条回答
  •  遥遥无期
    2020-11-30 11:14

    Migration errors usually occur when using php artisan migrate and your migration has an error.

    Within Laravel, there are some ways to reverse something that has been performed, especially migrations to more robust databases like MySql, for example.

    One way to be reversing the step taken

    php artisan migrate
    

    is to run the

    php artisan migrate: rollback
    

    It automatically reverses the last migrate performed You also have the possibility to delegate how many steps will be reversed with the step parameter.

    The number says how many steps will be reversed

    php artisan migrate: rollback --step=1
    

提交回复
热议问题