I am trying to upgrade an old 1.2.6 rail application to 2.3.8, and I will I'm having a problem with migrations, that is, if I have some model name names .create (: foo => "bar"), the migration is not complete. It does not hit an infinite loop or anything, it refuses to fulfill that migration.
Here is some sample code.
This works:
class CreateNewsArticles & lt; ActiveRecord :: Migration DF self.up create_table: news_articles ,: force = & gt; Is true T | T.string "name" t.string "image" t.text "body" t.boolean "featured" ,: default = & gt; To "0" t.integer "position" t.temestamps end # section.create (: name = & gt; 'news article' ,: controller = & gt; 'news_articles' ,: description = & gt; Add, Edit , And delete the news
Delete this section. (...) means that the migration never completes.
Here, from Rake DB output is migrating --trace:
** calls to db: migrate (Prtham_taim) ** perform invite environment (Phle_taim) ** environment * perform dB: migrate == Kretnevsrticles: Migreting ======================================== ===== - create_table (: news_articles, {: force = & gt; true}) - & gt; 0.0531s
Create after the comments section.
< code> ** calls to db: migrate (Phle_taim) ** Please call the environment (Phle_taim) or ** execute execute environment ** dB: migrate == CreateNewsArticles: migrating =========== ================================== - create_table (: news_articles, {: force = & gt; True}) - & gt; 0.0479s == CreateNewsArticles: Migrated (0.0481s) ==================================== ** calls in dB: schema: dump (Prtham_taim) ** perform invite environment ** db: schema: dump
I've tried on another computer, and it works Does the same version of the rack, the same version of Ruby, and the railways are frozen.
Rack - VERSION: Reich, version 0.8.7
, ruby -v: Ruby 1.8 0.6 (2010-02-05 Paclevl 39 9) [i686 -darwin10.3.0]
, rail -vi: Rail 2.3.8
there is no idea of any?
You can see the same symptoms in a different reason: If the migration might hang if you are running is: permission to complete the migration from leaving the console process in another process. $ rails console - sandbox
Comments
Post a Comment