ParseError: syntax error, unexpected ‘,’ in C:xampphtdocscake_phpconfigMigrations20191225092409_Users.php:17 [closed]

Question

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 MigrationsAbstractMigration;

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');


        }

    }
}
0
, , , , Ammad Hassan 2 years 2019-12-25T04:55:32-05:00 0 Answers 101 views 0

Leave an answer

Browse
Browse