Unsupported Screen Size: The viewport size is too small for the theme to render properly.

SQL Dump without "AUTO_INCREMENT" option

forums forums SQLyog SQLyog: Bugs / Feature Requests SQL Dump without "AUTO_INCREMENT" option

Viewing 1 reply thread
  • Author
    Posts
    • #35968
      dwhalenenr
      Participant

      Hi. We often use the SQL Dump option to generate a structure-only script of our database objects. This is used in diffs and stored in a repository to track changes. It’s a very convenient approach.

      The only thing that makes it hard for us is that the SQL Dump includes the “AUTO_INCREMENT” value in the table script. For example:

      CREATE TABLE foo (
      id int(11) NOT NULL AUTO_INCREMENT,
      data text NOT NULL,
      created_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      PRIMARY KEY (id)
      ) ENGINE=InnoDB AUTO_INCREMENT=183 DEFAULT CHARSET=utf8

      Over time as we run the SQL Dump that AUTO_INCREMENT value increases, leading our repository and diffs to think the table has changed but it hasn’t.

      It would be great if there was a checkbox in the SQL Dump tool to say “don’t generate AUTO_INCREMENT value” or the like.

      We’re running SQLYog Ultimate 12.4.1

      Thanks!

    • #35977
      Sibin A S
      Moderator

      Hi,

      The ‘AUTO_INCREMENT’ option which you mentioned is an option provided by the MySQL Create table statement. You may refer the MySQL documentation, here

      In SQLyog, we execute ‘SHOW CREATE TABLE’ to fetch the info. Hence, it is not SQLyog which sets the value, but MySQL.

      Regards,
      Sibin

Viewing 1 reply thread
  • You must be logged in to reply to this topic.