Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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



278

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



278
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