Migration of MYSQL database without losing records
Tag : mysql , By : Denis Chaykovskiy
Date : March 29 2020, 07:55 AM
it helps some times If you look at the output of mysqldump (before you gzip it) you will see that it contains a sequence of DROP TABLE x;
CREATE TABLE x (...);
INSERT INTO x (...) VALUES (...);
|
Need to update database without losing data in Migration
Tag : chash , By : Malikul
Date : March 29 2020, 07:55 AM
hope this fix your issue You need to manually edit the Up and Down methods of the migration to add relation on the database by adding t-sql commands.
|
Laravel 5.2 how to update migration without losing data
Date : March 29 2020, 07:55 AM
This might help you Since you already have data in your tables then instead of rollback your migrations (which will cause data losses) you can create new migration files to update your tables. Suppose you have a table users with columns name, email, password. You stored data in that table. Then you realized that you also do need to add a new column named mobile_no to your users table. To do this you need to create a new migration file. Command will be: php artisan make:migration add_mobile_no_columns_to_users_table --table=users
|
Laravel migration without losing the real data
Date : March 29 2020, 07:55 AM
|
Change tables structures with migration without losing data?
Date : March 29 2020, 07:55 AM
|