PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 14, 2022

[FIXED] how to reduce migrations of existing website that is developed in laravel

 April 14, 2022     laravel, migration, mysql, reduce     No comments   

Issue

I have 1000+ migrations of a website and tables are only 300-400, now i want to reduce the number of migrations without loosing any data is there any possibility to do it.


Solution

In Laravel 8 you'll be able to dump the database and throw away migrations thanks to this PR

In the mean time, you can take a look at the PR code and implement it in your current version https://github.com/laravel/framework/pull/32275/files.

The main idea is to use mysqldump (or pgdump, depending on your database) to dump your current database state and run a migration to import it.



Answered By - Elie Faës
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing