also_migrate
also_migrate copied to clipboard
Postresql fix
For postgres 8.4 sql like this "CREATE TABLE archived_articles LIKE articles" is invalid. This is correct one "CREATE TABLE archived_articles (LIKE articles)"
Fixes #5
I just got burned by this, too. I can verify the fix works.
I take that back. The second commit, including indexes is bad if the index is named because then you get a duplicate index error. I believe it works fine if the index is only structured and postgres is free to add its own name.
Sorry, I'm gradually becoming more familiar with the codebase here. It'd be better if the "INCLUDING INDEXES" stuff was contingent on the config[:indexes]
value. But I think the lib goes ahead and adds those indices anyway, so the clause may not be necessary.
I have the same problem but fixed it with this fork https://github.com/mogotest/also_migrate.git
cant rate it versus yours Randx, but this one worked for me.
But whatever gets released will make me happy.
Bump. This is a good fix that should be merged
Please, I'd appreciate if you merge this fix. Thanks