Jump to content

export and import looses auto_incremement or "extra" field values


mojito

Recommended Posts

Why is it that this very serious oversight isnt well documented. I mean I'm struggling like hell to understand why my sites break and then have to go through every single table to manually add auto increment to the field "extra".

I export correctly with complete inserts and the other things but this never works. Incidentally I have to export to a lower version to avoid sql errors. Is this the problem?

I would prefer to do it command line but not all hosts allow ssh in to their db.

grrrrrr....Would appreciate some understanding on this thanks.

PS there is no link to a forum on mysqlfreaks.com
Link to comment
Share on other sites

so then its the table definition which is being incorectly written. I may post below an example of the sql for a table.

[code]DROP TABLE IF EXISTS `default_classlistingsdb`;
CREATE TABLE `default_classlistingsdb` (
  `classlistingsdb_id` int(11) NOT NULL auto_increment,
  `class_id` int(11) NOT NULL default '0',
  `listingsdb_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`classlistingsdb_id`),
  KEY `idx_classlistingsdb_class_id` (`class_id`),
  KEY `idx_classlistingsdb_listingsdb_id` (`listingsdb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `default_classlistingsdb`
--

INSERT INTO `default_classlistingsdb` VALUES (1, 1, 1);
INSERT INTO `default_classlistingsdb` VALUES (2, 2, 2);
[/code]

I can see the auto increment value above, so it looks like it is being ignored.

For some reason it seems to be working now, but im not crazy and it did this a previous encounter a month ago, and i ended up manually putting in the auto_increment.
?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.