Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

diff fails on ARCHIVE tables #185

OneHourTranslation opened this Issue Nov 9, 2011 · 4 comments


None yet
3 participants

ghost commented Nov 9, 2011

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.


willdurand commented Nov 9, 2011

Can you provide more details ?


ghost commented Nov 10, 2011


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

fzaninotto commented Nov 10, 2011

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.


ghost commented Nov 10, 2011

Right, those tables were created and managed separately.


@willdurand willdurand added a commit that referenced this issue Sep 9, 2013

@willdurand willdurand Merge pull request #185 from pableu/patch-1
Fix a typo in customizing-build documentation page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment