Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Execution of target "sql-diff-template" failed (idMethod="native" for table not specified) #200

Open
alecksmart opened this Issue · 0 comments

1 participant

@alecksmart

This is a permanent bug I got from version 1.6.1 and the today's github snapshot.

Please note that both defaultIdMethod="native" and idMethod="native" are present ("database" and "table" definitions).

schema.xml:

<database
    name="entities"
    defaultIdMethod="native"
    namespace="Core"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://svn.propelorm.org/branches/1.6/generator/resources/xsd/database.xsd">

table:

<table name="content_registry_entry" phpName="ContentRegistryEntry" namespace="Scraper" idMethod="native">
        <column name="id" phpName="Id" type="INTEGER" sqlType="INTEGER UNSIGNED" primaryKey="true" autoIncrement="true" required="true"/>
        <column name="created" phpName="Created" type="TIMESTAMP" sqlType="DATETIME" required="true" />
        <column name="token" phpName="Token" type="CHAR" size="40" required="true" />
        <column name="source_id" phpName="SourceId" type="INTEGER" sqlType="INTEGER UNSIGNED" required="true"/>
        <column name="recipient_id" phpName="RecipientId" type="INTEGER" sqlType="INTEGER UNSIGNED" required="true"/>
        <foreign-key onDelete="CASCADE" onUpdate="CASCADE" foreignTable="source">
            <reference local="source_id" foreign="id"/>
        </foreign-key>
        <foreign-key onDelete="CASCADE" onUpdate="CASCADE" foreignTable="recepient">
            <reference local="recipient_id" foreign="id"/>
        </foreign-key>
    </table>

When trying to execute the migrate procedure:


propel > sql-diff:                                                                                                                                                                                                      

     [echo] +----------------------------------------------+
     [echo] |                                              |
     [echo] | Generating SQL diff between the XML schemas  |
     [echo] | and the current database structure.          |
     [echo] |                                              |
     [echo] +----------------------------------------------+
[phingcall] Calling Buildfile '[... path skipped ...]/library/propel/generator/build-propel.xml' with target 'sql-diff-template'
 [property] Loading [... path skipped ...]/library/propel/generator/./default.properties

propel > sql-diff-template:                                                                                                                                                                                             

[propel-sql-diff] Reading databases structure...
[propel-sql-diff] 9 tables imported from databases.
[propel-sql-diff] Loading XML schema files...
[propel-sql-diff] 9 tables found in 1 schema files.
[propel-sql-diff] Comparing models...
[propel-sql-diff] Structure of database was modified in datasource "entities": 9 modified tables
Execution of target "sql-diff-template" failed for the following reason: [... path skipped ...]/library/propel/generator/build-propel.xml:327:17: You have specified autoIncrement for column "id", but you have not specified idMethod="native" for table "content_registry_entry".                                                                                                                                         
[phingcall] [... path skipped ...]/library/propel/generator/build-propel.xml:327:17: You have specified autoIncrement for column "id", but you have not specified idMethod="native" for table "content_registry_entry".                                                                                                                                                                                                      
Execution of target "sql-diff" failed for the following reason: [... path skipped ...]/library/propel/generator/build-propel.xml:311:22: Execution of the target buildfile failed. Aborting.
    [phing] [... path skipped ...]/library/propel/generator/build-propel.xml:311:22: Execution of the target buildfile failed. Aborting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.