I generated some migrations with developer tools, and they are failing when I try to run them, why this could be? (To me it looks like it tries to create images before post table, and images table references post table, so it fails, how could I avoid this?)

$ phalcon migration run

Phalcon DevTools (1.3.2)

1406653362.4145: SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`= 'images' AND `TABLE_SCHEMA`='test'  => 1406653362.4152 (0.00068116188049316)
1406653362.4161: CREATE TABLE `test`.`images` (  `id` INT(11) NOT NULL AUTO_INCREMENT,  `filename` VARCHAR(255),  `original_filename` VARCHAR(255) NOT NULL,  `size` INT(11) NOT NULL,  `post_id` INT(11) NOT NULL,  `filetype` VARCHAR(255) NOT NULL,  PRIMARY KEY (`id`),  KEY `filename` (`filename`),  KEY `post_id` (`post_id`),  CONSTRAINT `images_ibfk_2` FOREIGN KEY (`post_id`) REFERENCES `post`(`id`) ) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci                                                                                             
  Error: SQLSTATE[HY000]: General error: 1005 Can't create table 'test.images' (errno: 150)