We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

How to use the migrations ?

Hi, I installed the devtools and I can exec phalcon migrate generate.

When I enter: phalcon migration run

I get this error message.

Error: Migration class cannot be found UsersMigration_101 at /home/yangqi/www/compass/migrations/1.0.1/users.php

And how to use up and down functions when I need modify tables ?

/**
 * Run the migrations
 *
 * @return void
 */
public function up()
{

}

/**
 * Reverse the migrations
 *
 * @return void
 */
public function down()
{

}

Thanks for you help! Kevin

@yangqiphp Did you use Phalcon Devtools 3.0.x



870

Yes, I use devtools 3.0.1

@yangqiphp Did you use Phalcon Devtools 3.0.x

The 3.0.x branch has v3.0.2

Yes, I use devtools 3.0.1

@yangqiphp Did you use Phalcon Devtools 3.0.x



870
Accepted
answer
edited Nov '16

Hi,Serghei Iakovlev ,

I understand my error now, the error 'Migration class not found' meaning actural is 'The migration is already exce'. And then I remove the migration record form .phalcon/migration-version , the command can exce.

Thanks.

The 3.0.x branch has v3.0.2

Yes, I use devtools 3.0.1

@yangqiphp Did you use Phalcon Devtools 3.0.x