migrate' does not compare table structure #63

Closed
sguy opened this Issue Apr 4, 2012 · 1 comment

Comments

Projects
None yet
4 participants
@sguy

sguy commented Apr 4, 2012

I've run into an issue when trying to map an existing data store (sqlite3) to persistent entities. migrate' tells me that the existing structure does not match the structure implied by the persistent entity. It wants to drop my tables and recreate them. It looks like what is happening (at least in the sqlite3 implementation) is that is just dumps the create statement from the existing schema and compares that with the create statement generated from the entity definition. I think it would be more correct to parse the existing schema and compare that to the proposed schema to see if they are compatible.

@meteficha

This comment has been minimized.

Show comment
Hide comment
@meteficha

meteficha Apr 4, 2012

Member

AFAIK persistent-sqlite does that because it's not meant to be used in production code anyways. This doesn't mean that this issue won't be fixed, however it's a low priority bug IMHO. Having written persistent-mysql's migration code I know that it's a terribly delicate and complicated beast. Pull requests are more than welcome =).

Member

meteficha commented Apr 4, 2012

AFAIK persistent-sqlite does that because it's not meant to be used in production code anyways. This doesn't mean that this issue won't be fixed, however it's a low priority bug IMHO. Having written persistent-mysql's migration code I know that it's a terribly delicate and complicated beast. Pull requests are more than welcome =).

@gregwebs gregwebs added the Sqlite label Aug 4, 2014

@snoyberg snoyberg closed this Aug 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment