also_migrate icon indicating copy to clipboard operation
also_migrate copied to clipboard

Postresql fix

Open dzaporozhets opened this issue 13 years ago • 6 comments

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

dzaporozhets avatar May 12 '11 11:05 dzaporozhets

I just got burned by this, too. I can verify the fix works.

nirvdrum avatar Jun 07 '11 14:06 nirvdrum

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.

nirvdrum avatar Jun 07 '11 14:06 nirvdrum

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.

nirvdrum avatar Jun 07 '11 14:06 nirvdrum

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.

matthewrudy avatar Nov 08 '11 07:11 matthewrudy

Bump. This is a good fix that should be merged

blakewatters avatar Apr 19 '12 21:04 blakewatters

Please, I'd appreciate if you merge this fix. Thanks

pmanrubia avatar Aug 07 '12 15:08 pmanrubia