Skip to content


Subversion checkout URL

You can clone with
Download ZIP


diff fails on ARCHIVE tables #185

OneHourTranslation opened this Issue · 4 comments

3 participants


Here is the error I get:

Execution of target "sql-diff-template" failed for the following reason: Table "some_archive_table" does not have a primary key defined. Propel requires all tables to have a primary key.

I also read somewhere that this happens for views as well.


Can you provide more details ?



My MySQL database consist of MyISAM, InnoDB and some Archive tables.
After configuring the migration as suggested on Propel documentation, I get the above error while running propel-gen diff.
Naturally, Archive table cannot have a primary key, thus there is no much I can do to workaround this error...

To reproduce:
1. Create a new archive table, like this: create table archive_users(id int, name varchar(20) ) engine=ARCHIVE ;
2. propel-gen diff


I guess you didn't use Propel to generate your archive table, and you don't use Propel to read/write it, right? It just happens to be in the same database where you store data managed by Propel?

Anyway, the migration engine must know how to deal with pk-less tables - be it for views or archives. You have a good point, we must look into a fix.


Right, those tables were created and managed separately.


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.