Create new tables in laravel

2

I am new to laravel and I have a problem I have already created a database with 3 tables with filled data and when I create a new migration I want to add the new table. I was using

php artisan migrate:refresh

but that updates me and deletes the data arrived.

    
asked by Jhosselin Giménez 31.01.2017 в 20:57
source

2 answers

2

Well surely you are using

php artisan make:migration create_ejemplos_table --create=ejemplos

now to add a new table you can execute the command

php artisan make:migration add_nueva_tabla_table --table=nueva_tabla

and you run php artisan migrate and everything will be normal.

    
answered by 31.01.2017 / 21:05
source
1

You just have to create a new migration with the new table and execute php artisan migrate , without any other suffix, to execute the migrations you have pending.

All the documentation on the Laravel site: link

    
answered by 31.01.2017 в 21:05