Project

General

Profile

Actions

Bug #2377

closed

postgresql migrations are currently failing

Added by Greg Sutcliffe over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Currently both myself and Lukas are seeing failures on Postgresql, which look like this:

==  AddSuseTemplates: migrating ===============================================
-- Failed to migrate PG::Error: ERROR:  column "operatingsystem_id" of relation "media" does not exist
LINE 1: INSERT INTO "media" ("created_at", "name", "operatingsystem_...
                                                   ^
: INSERT INTO "media" ("created_at", "name", "operatingsystem_id", "path", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" 
==  AddSuseTemplates: migrated (0.2182s) ======================================

rake aborted!
An error has occurred, this and all later migrations canceled:

PG::Error: ERROR:  current transaction is aborted, commands ignored until end of transaction block
:           SELECT attr.attname
          FROM pg_attribute attr
          INNER JOIN pg_constraint cons ON attr.attrelid = cons.conrelid AND attr.attnum = cons.conkey[1]
          WHERE cons.contype = 'p'
            AND cons.conrelid = '"schema_migrations"'::regclass
/tmp/foreman/vendorgems/ruby/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `async_exec'

Git bisecting shows the Rails 3.2 commit is at fault, so I'm not sure how Jenkins is passing tests at the moment. I can't track down what's causing it - the Suse Migration in the error is quite complex, so I assume it relied on something Rails 3.0 specific...

Actions

Also available in: Atom PDF