Skip to content

Commit

Permalink
Fixed check for ID type if no table exists
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jan 24, 2019
1 parent d9c32bc commit 11a9d12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/custom/setup/UsersRemoveSignedConstraints.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public function migrate()
{
$sql = 'SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = \'users\' AND COLUMN_NAME = \'id\'';

if( $this->getValue( $sql, 'COLUMN_TYPE', 'db-customer' ) === 'int(10)' )
try {
$type = $this->getValue( $sql, 'COLUMN_TYPE', 'db-customer' );
} catch( \Aimeos\MW\Setup\Exception $e ) {
$type = null;
}

if( $type === 'int(10)' )
{
$this->msg( sprintf( 'Remove signed constraints in users related tables' ), 0 );
$this->status( '' );
Expand Down

0 comments on commit 11a9d12

Please sign in to comment.