Note that there are some explanatory texts on larger screens.

plurals
  1. POFailing on production/heroku: WHERE a.attrelid = '"schools"'::regclass
    primarykey
    data
    text
    <p>I added a table to my local env called <code>schools</code> and it works fine in dev. In fact it even works fine in staging (heroku) but fails big time in production and <code>rake db:migrate</code> throws the error bellow. </p> <p>I cannot even precompile assest (with RAILS_ENV=production), access any part of my application including the rails console in production(heroku). Everything is throwing the error bellow. I have lost several hours on this but do not feel any closer to figuring it our. (Note: I have <code>'"..."'</code> on the reference to the table_name which I think is part of the problem)</p> <p>I went from rails 3.1.0 to 3.1.3 so that might have something to do with it.</p> <pre><code>PGError: ERROR: relation "schools" does not exist LINE 4: WHERE a.attrelid = '"schools"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"schools"'::regclass AND a.attnum &gt; 0 AND NOT a.attisdropped ORDER BY a.attnum </code></pre> <p>I am as lost as can be on this. I read several other questions on this topic here but no solution at sight. Thank you for your help. Any insight is greatly appreciated. </p> <p><strong>UPDATE</strong>------------------------------------------------------</p> <p>I just created a brand new app on heroku and ran <code>rake db:migrate</code> and got the same error.</p> <p>UPDATE 2</p> <p>I cloned the app from heroku and "schools" is in the schema.</p> <pre><code>create_table "schools", :force =&gt; true do |t| ... ... end </code></pre> <p>UPDATE 3</p> <p>Tried reverting back to rails 3.1.0 but that did not help.</p> <p>UPDATE 4</p> <p>Still working on this. Have not heard from heroku support yet.</p> <p>UPDATE 5</p> <p>Heroku support was able to check that 'schools' is not a table in the DB but I still cannot access the console and app still down.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload