Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
"Cannot redeclare class" when migrating
  • I have a migration file called 001_db.php, and another one called 003_db.php. Now when I run oil r migrate, I get a "Cannot redeclare class \Fuel\Migrations\db in 003_db.php". So, yeah, there are two classes that are \Fuel\Migrations\db - the 001 and the 003 versions. But isn't this how you're supposed to do the migrations? What did I miss?
    -----
    Edit: looked at the migrations for the Auth class as an example, and saw that they all have to be uniquely named.
  • Class names always have to be unique. The sequence number (that makes the file name unique) is not part of the class name.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion