I'm trying to set up migrations in Phalcon 3. I gitcloned the fresh version of developer tools and run
phalcon migration generate --config=app/Config/Settings.dev.php --migrations=./migrations
but I've got an almost empty file:
<?php
use Phalcon\Db\Column;
use Phalcon\Db\Index;
use Phalcon\Db\Reference;
use Phalcon\Mvc\Model\Migration;
/**
* Class PotdMigration_100
*/
class PotdMigration_100 extends Migration
{
/**
* Define the table structure
*
* @return void
*/
public function morph()
{
$this->morphTable('potd', [
'columns' => [
],
'indexes' => [
new Index('potd_pkey', ['id'], null)
],
]
);
}
/**
* Run the migrations
*
* @return void
*/
public function up()
{
}
/**
* Reverse the migrations
*
* @return void
*/
public function down()
{
}
}
As you can see, there is no any column definition, while in this sample video I see that whole table structure in there out of the box. The other strange thing is phalcon created indexes
with my primary key index, so I assume that it was able to access the DB itself, but something went wrong. Is this generator behavior was changed since that video was created? I could describe all columns by hand, but in the video it were described automatically.
- Phalcon version is 3.0.1
- PG version is 9.5.4
- DevTools is 3.0.1 installed manually via clone of
https://github.com/phalcon/phalcon-devtools.git