Yes I drop the database completely - part of my shell script:

echo 'Create database, create tables ..'
mysql -u $mysql_user -p$mysql_pw -e "DROP DATABASE IF EXISTS $db_name;CREATE DATABASE $db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"

date

mysql -u $mysql_user -D $db_name -p$mysql_pw < jobs/osm_schema_latest_optimized0.sql

echo 'Write to database ..'
osmosis/bin/osmosis --read-xml file=$uncompressedFile --write-mysql host=localhost database=$db_name user=$mysql_user password=$mysql_pw validateSchemaVersion=no

mysql -u $mysql_user -D $db_name -p$mysql_pw < jobs/osm_schema_latest_optimized1.sql

date

I have split up the sql script in two parts - 1st to create table just with primary keys on auto_increment fields, 2nd to alter the populated tables.

Best,

Andi


Joachim Zobel schrieb:
Am Sonntag, den 30.11.2008, 15:38 +0100 schrieb Andreas Kalsch:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '1' for key 1

Did you start with empty tables? This looks like remains from a
cancelled previous run.

Sincerely,
Joachim




-- MySQL dump 10.11
--
-- Host: localhost    Database: osm5
-- ------------------------------------------------------
-- Server version       5.0.51a

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 
*/;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `current_nodes`
--

DROP TABLE IF EXISTS `current_nodes`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_nodes` (
  `id` bigint(64) NOT NULL auto_increment primary key,
  `latitude` int(11) NOT NULL,
  `longitude` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `visible` tinyint(1) NOT NULL,
  `tags` text NOT NULL,
  `timestamp` datetime NOT NULL,
  `tile` int(11) unsigned NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_nodes`
--

LOCK TABLES `current_nodes` WRITE;
/*!40000 ALTER TABLE `current_nodes` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_nodes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_relation_members`
--

DROP TABLE IF EXISTS `current_relation_members`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_relation_members` (
  `id` bigint(64) NOT NULL,
  `member_type` enum('node','way','relation') NOT NULL default 'node',
  `member_id` bigint(11) NOT NULL,
  `member_role` varchar(255) NOT NULL default ''
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_relation_members`
--

LOCK TABLES `current_relation_members` WRITE;
/*!40000 ALTER TABLE `current_relation_members` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_relation_members` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_relation_tags`
--

DROP TABLE IF EXISTS `current_relation_tags`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_relation_tags` (
  `id` bigint(64) NOT NULL,
  `k` varchar(255) NOT NULL default '',
  `v` varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_relation_tags`
--

LOCK TABLES `current_relation_tags` WRITE;
/*!40000 ALTER TABLE `current_relation_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_relation_tags` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_relations`
--

DROP TABLE IF EXISTS `current_relations`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_relations` (
  `id` bigint(64) NOT NULL auto_increment primary key,
  `user_id` bigint(20) NOT NULL,
  `timestamp` datetime NOT NULL,
  `visible` tinyint(1) NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_relations`
--

LOCK TABLES `current_relations` WRITE;
/*!40000 ALTER TABLE `current_relations` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_relations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_way_nodes`
--

DROP TABLE IF EXISTS `current_way_nodes`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_way_nodes` (
  `id` bigint(64) NOT NULL,
  `node_id` bigint(64) NOT NULL,
  `sequence_id` bigint(11) NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_way_nodes`
--

LOCK TABLES `current_way_nodes` WRITE;
/*!40000 ALTER TABLE `current_way_nodes` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_way_nodes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_way_tags`
--

DROP TABLE IF EXISTS `current_way_tags`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_way_tags` (
  `id` bigint(64) NOT NULL,
  `k` varchar(255) NOT NULL default '',
  `v` varchar(255) NOT NULL default ''
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_way_tags`
--

LOCK TABLES `current_way_tags` WRITE;
/*!40000 ALTER TABLE `current_way_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_way_tags` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_ways`
--

DROP TABLE IF EXISTS `current_ways`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `current_ways` (
  `id` bigint(64) NOT NULL auto_increment primary key,
  `user_id` bigint(20) NOT NULL,
  `timestamp` datetime NOT NULL,
  `visible` tinyint(1) NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `current_ways`
--

LOCK TABLES `current_ways` WRITE;
/*!40000 ALTER TABLE `current_ways` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_ways` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `diary_comments`
--

DROP TABLE IF EXISTS `diary_comments`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `diary_comments` (
  `id` bigint(20) NOT NULL auto_increment primary key,
  `diary_entry_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `body` text NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `diary_comments`
--

LOCK TABLES `diary_comments` WRITE;
/*!40000 ALTER TABLE `diary_comments` DISABLE KEYS */;
/*!40000 ALTER TABLE `diary_comments` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `diary_entries`
--

DROP TABLE IF EXISTS `diary_entries`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `diary_entries` (
  `id` bigint(20) NOT NULL auto_increment primary key,
  `user_id` bigint(20) NOT NULL,
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `latitude` double default NULL,
  `longitude` double default NULL,
  `language` varchar(3) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `diary_entries`
--

LOCK TABLES `diary_entries` WRITE;
/*!40000 ALTER TABLE `diary_entries` DISABLE KEYS */;
/*!40000 ALTER TABLE `diary_entries` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `friends`
--

DROP TABLE IF EXISTS `friends`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `friends` (
  `id` bigint(20) NOT NULL auto_increment primary key,
  `user_id` bigint(20) NOT NULL,
  `friend_user_id` bigint(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `friends`
--

LOCK TABLES `friends` WRITE;
/*!40000 ALTER TABLE `friends` DISABLE KEYS */;
/*!40000 ALTER TABLE `friends` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `gps_points`
--

DROP TABLE IF EXISTS `gps_points`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `gps_points` (
  `altitude` float default NULL,
  `trackid` int(11) NOT NULL,
  `latitude` int(11) NOT NULL,
  `longitude` int(11) NOT NULL,
  `gpx_id` bigint(64) NOT NULL,
  `timestamp` datetime default NULL,
  `tile` int(11) unsigned NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `gps_points`
--

LOCK TABLES `gps_points` WRITE;
/*!40000 ALTER TABLE `gps_points` DISABLE KEYS */;
/*!40000 ALTER TABLE `gps_points` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `gpx_file_tags`
--

DROP TABLE IF EXISTS `gpx_file_tags`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `gpx_file_tags` (
  `gpx_id` bigint(64) NOT NULL default '0',
  `tag` varchar(255) NOT NULL,
  `id` int(20) NOT NULL auto_increment primary key
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `gpx_file_tags`
--

LOCK TABLES `gpx_file_tags` WRITE;
/*!40000 ALTER TABLE `gpx_file_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `gpx_file_tags` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `gpx_files`
--

DROP TABLE IF EXISTS `gpx_files`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `gpx_files` (
  `id` bigint(64) NOT NULL auto_increment primary key,
  `user_id` bigint(20) NOT NULL,
  `visible` tinyint(1) NOT NULL default '1',
  `name` varchar(255) NOT NULL default '',
  `size` bigint(20) default NULL,
  `latitude` double default NULL,
  `longitude` double default NULL,
  `timestamp` datetime NOT NULL,
  `public` tinyint(1) NOT NULL default '1',
  `description` varchar(255) NOT NULL default '',
  `inserted` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `gpx_files`
--

LOCK TABLES `gpx_files` WRITE;
/*!40000 ALTER TABLE `gpx_files` DISABLE KEYS */;
/*!40000 ALTER TABLE `gpx_files` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `messages`
--

DROP TABLE IF EXISTS `messages`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `messages` (
  `id` bigint(20) NOT NULL auto_increment primary key,
  `from_user_id` bigint(20) NOT NULL,
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `sent_on` datetime NOT NULL,
  `message_read` tinyint(1) NOT NULL default '0',
  `to_user_id` bigint(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `messages`
--

LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `nodes`
--

DROP TABLE IF EXISTS `nodes`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `nodes` (
  `id` bigint(64) NOT NULL,
  `latitude` int(11) NOT NULL,
  `longitude` int(11) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `visible` tinyint(1) NOT NULL,
  `tags` text NOT NULL,
  `timestamp` datetime NOT NULL,
  `tile` int(11) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `nodes`
--

LOCK TABLES `nodes` WRITE;
/*!40000 ALTER TABLE `nodes` DISABLE KEYS */;
/*!40000 ALTER TABLE `nodes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `relation_members`
--

DROP TABLE IF EXISTS `relation_members`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `relation_members` (
  `id` bigint(64) NOT NULL default '0',
  `member_type` enum('node','way','relation') NOT NULL default 'node',
  `member_id` bigint(11) NOT NULL,
  `member_role` varchar(255) NOT NULL default '',
  `version` bigint(20) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `relation_members`
--

LOCK TABLES `relation_members` WRITE;
/*!40000 ALTER TABLE `relation_members` DISABLE KEYS */;
/*!40000 ALTER TABLE `relation_members` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `relation_tags`
--

DROP TABLE IF EXISTS `relation_tags`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `relation_tags` (
  `id` bigint(64) NOT NULL default '0',
  `k` varchar(255) NOT NULL default '',
  `v` varchar(255) NOT NULL default '',
  `version` bigint(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `relation_tags`
--

LOCK TABLES `relation_tags` WRITE;
/*!40000 ALTER TABLE `relation_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `relation_tags` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `relations`
--

DROP TABLE IF EXISTS `relations`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `relations` (
  `id` bigint(64) NOT NULL default '0',
  `user_id` bigint(20) NOT NULL,
  `timestamp` datetime NOT NULL,
  `version` bigint(20) NOT NULL auto_increment primary key,
  `visible` tinyint(1) NOT NULL default '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `relations`
--

LOCK TABLES `relations` WRITE;
/*!40000 ALTER TABLE `relations` DISABLE KEYS */;
/*!40000 ALTER TABLE `relations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `schema_info`
--

DROP TABLE IF EXISTS `schema_info`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `schema_info` (
  `version` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `schema_info`
--

LOCK TABLES `schema_info` WRITE;
/*!40000 ALTER TABLE `schema_info` DISABLE KEYS */;
INSERT INTO `schema_info` VALUES (16);
/*!40000 ALTER TABLE `schema_info` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `sessions` (
  `id` int(11) NOT NULL auto_increment primary key,
  `session_id` varchar(255) default NULL,
  `data` text,
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `sessions`
--

LOCK TABLES `sessions` WRITE;
/*!40000 ALTER TABLE `sessions` DISABLE KEYS */;
/*!40000 ALTER TABLE `sessions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_preferences`
--

DROP TABLE IF EXISTS `user_preferences`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `user_preferences` (
  `user_id` bigint(20) NOT NULL,
  `k` varchar(255) NOT NULL,
  `v` varchar(255) NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `user_preferences`
--

LOCK TABLES `user_preferences` WRITE;
/*!40000 ALTER TABLE `user_preferences` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_preferences` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_tokens`
--

DROP TABLE IF EXISTS `user_tokens`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `user_tokens` (
  `id` bigint(20) NOT NULL auto_increment primary key,
  `user_id` bigint(20) NOT NULL,
  `token` varchar(255) NOT NULL,
  `expiry` datetime NOT NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `user_tokens`
--

LOCK TABLES `user_tokens` WRITE;
/*!40000 ALTER TABLE `user_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_tokens` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `users` (
  `email` varchar(255) NOT NULL,
  `id` bigint(20) NOT NULL auto_increment primary key,
  `active` int(11) NOT NULL default '0',
  `pass_crypt` varchar(255) NOT NULL,
  `creation_time` datetime NOT NULL,
  `display_name` varchar(255) NOT NULL default '',
  `data_public` tinyint(1) NOT NULL default '0',
  `description` text NOT NULL,
  `home_lat` double default NULL,
  `home_lon` double default NULL,
  `home_zoom` int(2) default '3',
  `nearby` int(11) default '50',
  `pass_salt` varchar(255) default NULL,
  `image` text,
  `administrator` tinyint(1) NOT NULL default '0',
  `email_valid` tinyint(1) NOT NULL default '0',
  `new_email` varchar(255) default NULL,
  `visible` tinyint(1) NOT NULL default '1',
  `creation_ip` varchar(255) default NULL
) DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `way_nodes`
--

DROP TABLE IF EXISTS `way_nodes`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `way_nodes` (
  `id` bigint(64) NOT NULL,
  `node_id` bigint(64) NOT NULL,
  `version` bigint(20) NOT NULL,
  `sequence_id` bigint(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `way_nodes`
--

LOCK TABLES `way_nodes` WRITE;
/*!40000 ALTER TABLE `way_nodes` DISABLE KEYS */;
/*!40000 ALTER TABLE `way_nodes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `way_tags`
--

DROP TABLE IF EXISTS `way_tags`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `way_tags` (
  `id` bigint(64) NOT NULL default '0',
  `k` varchar(255) NOT NULL,
  `v` varchar(255) NOT NULL,
  `version` bigint(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `way_tags`
--

LOCK TABLES `way_tags` WRITE;
/*!40000 ALTER TABLE `way_tags` DISABLE KEYS */;
/*!40000 ALTER TABLE `way_tags` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `ways`
--

DROP TABLE IF EXISTS `ways`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `ways` (
  `id` bigint(64) NOT NULL default '0',
  `user_id` bigint(20) NOT NULL,
  `timestamp` datetime NOT NULL,
  `version` bigint(20) NOT NULL auto_increment,
  `visible` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `ways`
--

LOCK TABLES `ways` WRITE;
/*!40000 ALTER TABLE `ways` DISABLE KEYS */;
/*!40000 ALTER TABLE `ways` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET [EMAIL PROTECTED] */;

/*!40101 SET [EMAIL PROTECTED] */;
/*!40014 SET [EMAIL PROTECTED] */;
/*!40014 SET [EMAIL PROTECTED] */;
/*!40101 SET [EMAIL PROTECTED] */;
/*!40101 SET [EMAIL PROTECTED] */;
/*!40101 SET [EMAIL PROTECTED] */;
/*!40111 SET [EMAIL PROTECTED] */;

-- Dump completed on 2008-11-23  7:10:12
-- MySQL dump 10.11
--
-- Host: localhost    Database: osm5
-- ------------------------------------------------------
-- Server version       5.0.51a

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 
*/;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `current_nodes`
--

ALTER TABLE `current_nodes`
        engine=Innodb,
        ADD KEY `current_nodes_timestamp_idx` (`timestamp`),
        ADD KEY `current_nodes_tile_idx` (`tile`);

--
-- Table structure for table `current_relation_members`
--

ALTER TABLE `current_relation_members`
        ENGINE=InnoDB,
        ADD PRIMARY KEY  (`id`,`member_type`,`member_id`,`member_role`),
        ADD KEY `current_relation_members_member_idx` 
(`member_type`,`member_id`);

--
-- Table structure for table `current_relation_tags`
--

ALTER TABLE `current_relation_tags`
        ADD KEY `current_relation_tags_id_idx` (`id`),
        ADD FULLTEXT KEY `current_relation_tags_v_idx` (`v`);

--
-- Table structure for table `current_relations`
--

ALTER TABLE `current_relations`
        ENGINE=InnoDB;

--
-- Table structure for table `current_way_nodes`
--

ALTER TABLE `current_way_nodes`
        ENGINE=InnoDB,
        ADD PRIMARY KEY  (`id`,`sequence_id`),
        ADD KEY `current_way_nodes_node_idx` (`node_id`);

--
-- Table structure for table `current_way_tags`
--

ALTER TABLE `current_way_tags`
        ADD KEY `current_way_tags_id_idx` (`id`),
        ADD FULLTEXT KEY `current_way_tags_v_idx` (`v`);

--
-- Table structure for table `current_ways`
--

ALTER TABLE `current_ways`
        ENGINE=InnoDB;

--
-- Table structure for table `diary_comments`
--

ALTER TABLE `diary_comments`
        ADD UNIQUE KEY `diary_comments_entry_id_idx` (`diary_entry_id`,`id`);

--
-- Table structure for table `diary_entries`
--

--
-- Table structure for table `friends`
--

ALTER TABLE `friends`
        ADD KEY `user_id_idx` (`friend_user_id`),
        ADD KEY `friends_user_id_idx` (`user_id`);

--
-- Table structure for table `gps_points`
--

ALTER TABLE `gps_points`
        ADD KEY `points_gpxid_idx` (`gpx_id`),
        ADD KEY `points_tile_idx` (`tile`);

--
-- Table structure for table `gpx_file_tags`
--

ALTER TABLE `gpx_file_tags`
        ADD KEY `gpx_file_tags_gpxid_idx` (`gpx_id`);

--
-- Table structure for table `gpx_files`
--

ALTER TABLE `gpx_files`
        ADD KEY `gpx_files_timestamp_idx` (`timestamp`),
        ADD KEY `gpx_files_visible_public_idx` (`visible`,`public`);

--
-- Table structure for table `messages`
--

ALTER TABLE `messages`
        ADD KEY `messages_to_user_id_idx` (`to_user_id`);

--
-- Table structure for table `nodes`
--

ALTER TABLE `nodes`
        ADD KEY `nodes_uid_idx` (`id`),
        ADD KEY `nodes_timestamp_idx` (`timestamp`),
        ADD KEY `nodes_tile_idx` (`tile`);

--
-- Table structure for table `relation_members`
--

ALTER TABLE `relation_members`
        ADD PRIMARY KEY  
(`id`,`version`,`member_type`,`member_id`,`member_role`),
        ADD KEY `relation_members_member_idx` (`member_type`,`member_id`);

--
-- Table structure for table `relation_tags`
--

ALTER TABLE `relation_tags`
        ADD KEY `relation_tags_id_version_idx` (`id`,`version`);

--
-- Table structure for table `relations`
--

ALTER TABLE `relations`
        ADD KEY `relations_timestamp_idx` (`timestamp`);

--
-- Table structure for table `schema_info`
--

--
-- Table structure for table `sessions`
--

--
-- Table structure for table `user_preferences`
--

--
-- Table structure for table `user_tokens`
--

--
-- Table structure for table `users`
--

--
-- Table structure for table `way_nodes`
--

ALTER TABLE `way_nodes`
        ADD PRIMARY KEY (`id`,`version`,`sequence_id`),
        ADD KEY `way_nodes_node_idx` (`node_id`);

--
-- Table structure for table `way_tags`
--

ALTER TABLE `way_tags`
        ADD KEY `way_tags_id_version_idx` (`id`,`version`);

--
-- Table structure for table `ways`
--

ALTER TABLE `ways`
        ADD KEY `ways_timestamp_idx` (`timestamp`);
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to