Skip to content

Warning on migrate + invalid result #9

@jeff1326

Description

@jeff1326

from.sql

 CREATE TABLE `contact` (
    `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT
 ) ENGINE = InnoDB;

to.sql

 CREATE TABLE IF NOT EXISTS `contact` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Command used :

php mysqldiff/php-mysql-diff migrate from.sql to.sql

Result :

PHP Warning:  Invalid argument supplied for foreach() in /var/www/fw57/mysqldiff/src/Differ.php on line 23

Warning: Invalid argument supplied for foreach() in /var/www/fw57/mysqldiff/src/Differ.php on line 23
# Disable Foreign Keys Check
SET FOREIGN_KEY_CHECKS = 0;
SET SQL_MODE = '';

# Deleted Tables

# Changed Tables

# New Tables

-- new table `contact`

CREATE TABLE IF NOT EXISTS `contact` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

# Disable Foreign Keys Check
SET FOREIGN_KEY_CHECKS = 1;

Expected result:

The databases have the same schema!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions