当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Auto Increment Zend/Db/Sql/Ddl Database migration

问题描述:

I'm trying to make a migration in Zend Framework 2 using https://github.com/vgarvardt/ZfSimpleMigrations

The problem is that I can't use the option 'auto_increment' it simply doesn't do anything.

I tried it in many ways but it seems not working. Does anyone who has been using this know how to do it ?

code Example:

$table = new CreateTable('my_table');

$column = new Integer('id', false);

$column->setOption('auto_increment', true);

$table->addColumn($column);

$table->addConstraint(new PrimaryKey('id'));

分享给朋友:
您可能感兴趣的文章:
随机阅读: