db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From flow1986 <fsa...@gmx.at>
Subject Error while executing SQL CREATE UNIQUE INDEX PRIMARY ON
Date Wed, 22 Jul 2009 14:29:12 GMT


I'm using ddlutils (1.0) and mysql (5.0.67)

I'm using this ant buildfile:

<?xml version="1.0"?>
<project name="" basedir=".">
  <path id="classpath">
    <fileset dir="./lib">
      <include name="**/*.jar" />
  <target name="export-source-db"
  description="Dumps db structure and data">
    <taskdef name="databaseToDdl"
      <classpath refid="classpath" />
    <databaseToDdl modelName="MigrateTest" databasetype="mysql5" >
      <database url="jdbc:mysql://localhost/forexport"
      driverClassName="com.mysql.jdbc.Driver" username="root"
      password="" />
      <writeSchemaToFile outputFile="db-schema.xml" />
      <writeDataToFile outputFile="data.xml" />
  <target name="import-target-db"
  description="Creates db and loads data" >
    <taskdef name="ddlToDatabase"
      <classpath refid="classpath" />
    <ddlToDatabase schemaFile="db-schema.xml" databasetype="mysql5"
      <database url="jdbc:mysql://localhost/dbstufftest"
      username="root" password="" />
     <!-- <createDatabase failonerror="false" /> -->
      <writeSchemaToDatabase />
      <writeDataToDatabase datafile="data.xml" />

When i try to execute import-target-db after if exported the data I get the
following error:

[ddlToDatabase] SQL Command CREATE UNIQUE INDEX PRIMARY ON campaign_users
(campaign_id, user_id) failed with: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL serv
er version for the right syntax to use near 'PRIMARY ON campaign_users
(campaign_id, user_id)' at line 1

Do you have any ideas?
View this message in context: http://www.nabble.com/Error-while-executing-SQL-CREATE-UNIQUE-INDEX-PRIMARY-ON-tp24607554p24607554.html
Sent from the Apache DdlUtils - User mailing list archive at Nabble.com.

View raw message