jeudi 16 novembre 2017

Laravel Migration with data manipulation

I have a database with 3 tables that need to be migrated:

  • table 1 (process): contains data about a process
  • table 2 (file steps): is a many to many relationship to files for that process
  • table 3 (files): is a generic file table

I can make a migration that will change the steps table into a generic steps table with step information. However, I need to make a one time migration of the current process records, in order to make step records based on where that process is in the ... process :P

Raw DB queries don't seem like a good option since I need to do different things base on what stage in the process they are at.

What is the best way to make a migration that also contains data manipulation as well as schema manipulation in Laravel?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hFRBEH
via IFTTT

Aucun commentaire:

Enregistrer un commentaire