DB Mysql is not created when I migrate a [closed] model

0

in my console I write

php  artisan migrate

and my result is as follows

    
asked by jDanielSotoC 09.03.2018 в 00:36
source

2 answers

1

when it says table users already exists, it tells you that it is atabla and this creade, then you must enter your database and execute the following command if necessary or if it does not affect the information that you may already have stored

DROP TABLE users;

Once the above is done, you should be able to run the migration without problems, that is, it indicates that the database with which you are trying to work and to which you connected your Laravel project already has a table with the name users created and so you can not create it again so much

I notice the DROP command that I wrote you above is once you are inside your database

If you want to do it from artisan, delete and create all the tables from the beginning, execute:

php artisan migrate:fresh
    
answered by 09.03.2018 в 00:39
0

Test with php artisan migrate:fresh this command should remove all the tables from the migrations and recreate them.

    
answered by 09.03.2018 в 01:19