In PHP Doctrine, is it possible to create one migration class that creates a table and creates a foreign key on that table? For some reason, I can't get the foreign key to work ...
class Migration_001 extends Doctrine_Migration_Base {
public function up() {
$this->createTable('table_name', array(...))
$this->createForeignKey('table_name', 'foreign_key_name', array(...))
}
public function down() {
$this->dropForeignKey('table_name', 'foreign_key_name')
$this->dropTable('table_name')
}
}
Thanks, Ofir