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
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.
?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.