Project

General

Profile

Actions

Bug #2783

closed

db:convert:prod2dev fails on table 'architectures_operatingsystems'

Added by Scuba Floyd almost 11 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When converting MySQL to Postgres on Foreman1.2, I get the following error (full trace attached):

Converting architectures_operatingsystems...rake aborted!
PG::Error: ERROR: column "id" does not exist
LINE 1: ...re_id", "operatingsystem_id") VALUES ($1, $2) RETURNING "id"
^
: INSERT INTO "architectures_operatingsystems" ("architecture_id", "operatingsystem_id") VALUES ($1, $2) RETURNING "id"

The schemas are consistent on both DBs.


Files

prod2dev.trace prod2dev.trace 7.97 KB Scuba Floyd, 07/14/2013 06:29 AM

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #3268: defer postgresql foreign key constraints for rake db:convert:prod2devClosedGreg Sutcliffe10/08/2013Actions
Actions #1

Updated by Joseph Magen almost 11 years ago

I also got this bug about a month ago and was not successful to fix it quickly. I ended up using the taps gem to manually migrate my database from MySQL to Postgres. Not the best method. I hope someone volunteers to look at this bug. If not, I will look at it again.

Actions #2

Updated by Scuba Floyd almost 11 years ago

My knowledge about Ruby and Rails is quite limited, but there's a boolean switch 'insert_returning' in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter which defaults true. Maybe that is causing the trouble.

Actions #3

Updated by Andy Bohne over 10 years ago

I'm also experiencing this issue, however I'm migrating from sqlite3 to pgsql.

Actions #4

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #3268: defer postgresql foreign key constraints for rake db:convert:prod2dev added
Actions #5

Updated by Dominic Cleal over 10 years ago

  • Description updated (diff)
  • Status changed from New to Ready For Testing
  • translation missing: en.field_release set to 3
Actions #6

Updated by Dominic Cleal over 10 years ago

  • Assignee set to Greg Sutcliffe
  • Target version set to 1.10.0
Actions #7

Updated by Greg Sutcliffe over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF