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

Thursday, April 14, 2022

[FIXED] How can I run a specific migration in Symfony 5 for my mysql database?

 April 14, 2022     migration, symfony5     No comments   

Issue

Hi every body I'm learning Symfony 5, on migrations lessons, after a lot of make:migration commands, this time I've this messagerel="nofollow noreferrer">enter image description here

And on doctrine:migrations:migrate command, I've this error enter image description here

But in my migrations file , there's a migration with create etudiant table. So I'll know how to run that one migration for having that table in my database, Thanks!


Solution

This Error often happened when you got some differents between the last migration file and your BDD.

First of all your script seems to drop 'etudiant' table but this one does not exist. May be you have drop it before. However you have many possibility :

  • You can delete all migration file on your symfony project (under migrations folder), then delete all sql entry on doctrine_migration_versions. After that you can redo your migration command line (make:migration and doctrine:migrations:migrate).

  • You can edit the last migration file on your symfony projet and delete the drop table in trouble.



Answered By - Kevin FERRANDON
Answer Checked By - Gilberto Lyons (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