createTable( 'customer', [ 'id' => $this->primaryKey(), 'username' => $this->string() ->notNull() ->unique(), 'auth_key' => $this->string(32) ->notNull(), 'password_hash' => $this->string() ->notNull(), 'password_reset_token' => $this->string() ->unique(), 'email' => $this->string() ->notNull() ->unique(), 'status' => $this->smallInteger() ->notNull() ->defaultValue(10), 'created_at' => $this->integer() ->notNull(), 'updated_at' => $this->integer() ->notNull(), 'name' => $this->string(), 'phone' => $this->string(), 'gender' => $this->smallInteger(1), 'birthday' => $this->integer(), 'city' => $this->string(), 'address' => $this->string(), ] ); } /** * @inheritdoc */ public function safeDown() { $this->dropTable('customer'); } }