unixcharles / refinerycms-copywriting

Refinery CMS engine to manage copywriting, application wide or per pages with i18n.
53 stars 42 forks source link

use short index name for all adapter #55

Closed timfjord closed 10 years ago

timfjord commented 11 years ago

During installation of copywriting with rails 4, mysql and refinery from master i am getting this error on migration step:

rake db:migrate
==  CreateCopywritingTranslationTable: migrating ==============================
-- rename_column("copywriting_phrase_translations", :copywriting_phrase_id, :refinery_copywriting_phrase_id)
rake aborted!
An error has occurred, all later migrations canceled:

Index name 'index_copywriting_phrase_translations_on_refinery_copywriting_phrase_id' on table 'copywriting_phrase_translations' is too long; the limit is 64 characters

So this pull request should fix this.

ugisozols commented 11 years ago

How about making index name shorter by default so that it works in all dbs? /cc @unixcharles

timfjord commented 11 years ago

This would even better, so we can remove this conditions at all

unixcharles commented 11 years ago

I agree, lets do that instead.

timfjord commented 11 years ago

@unixcharles @ugisozols i just update pull request. So i removed with_short_sqlite_compatible_index method and renaming index name on all adapters

ugisozols commented 10 years ago

Thanks @timsly!

unixcharles commented 10 years ago

thank you guys!