I want the user table cakephp db in phpmyadmin. I can't see the "user' table in the database.
This error comes after migration. cake migrations migrate. The code is shown below.
<?php
use Migrations\AbstractMigration;
class Users extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
{
$table=$this->table('users');
$table
->addColumn('username','string'),[
'default'=>null,
'limit'=>50,
'null'=>false
])
->addColumn('password','string'),[
'default'=>null,
'limit'=>255,
'null'=>false
])
->addColumn('active','boolean'),[
'default'=>0;
'null'=>true
])
->addColumn('created','timestamp'),[
'default'=>'CURRENT_TIMESTAMP',
'limit'=>null,
'null'=>false
])
->addColumn('modified','datetime'),[
'default'=>'null',
'limit'=>null,
'null'=>true
])
->create();
}
public function down(){
$this->dropTable('users');
}
}
}
Post a Comment