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

Ignore Autoincrement Option For Sql Dump

forums forums SQLyog SQLyog: Bugs / Feature Requests Ignore Autoincrement Option For Sql Dump

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #13284
      maxtoroq
      Member

      SQL Dump should have an option to ignore the Autoincrement of a table. When you generate a script for database creation, from an existing database used for development, the Autoincrement is not desired.

    • #35107
      peterlaursen
      Participant

      We save the *data as stored* in the database.  That is the purpose of a backup. No backup tool has that option. Do you find it in ‘mysqldump, for instance?

       

      You can

      1) Export a structure-only sql-dump

      2) export data to CSV. Here you you can select what columns to be included.

       

      Also be aware that

      1) if the autoincrement column is the Primary Key of the table (what it often is) then removing it may result in duplicate columns

      2) in relational databases the autoincrement will often be used for a Foreign Key (“relationship”). If it does not get created with exactly same value as it originally was, you will break the Foreign keys.

       

       

       

      There is no chance that we will include such option in ‘export as sql-dump’. It makes absolutely no sense to me.

    • #35108
      maxtoroq
      Member

      I am doing a ‘Structure only’ export, my point is that the autoincrement is not desired when you use the script to create other databases that will contain different data.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.