had the following problem:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'created' in 'field list': INSERT INTO {user_relationships} (rid, requester_id, requestee_id, rtid, approved, created, changed, flags) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 77262 [:db_insert_placeholder_1] => 74437 [:db_insert_placeholder_2] => 13431 [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 1353088959 [:db_insert_placeholder_6] => 1353088959 [:db_insert_placeholder_7] => 0 ) in drupal_write_record() (line 7036 of /Users/joshuaellinger/Sites/fanlala/includes/common.inc).

I was able to fix it with a slight formatting change, in the attached patch

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

westwesterson’s picture

previous patch included junk... heres a better one

Status: Needs review » Needs work

The last submitted patch, D7-user_relationships_upgrade.patch, failed testing.

Berdir’s picture

Status: Needs work » Postponed (maintainer needs more info)

I don't see how a formatting change could fix a query. Are you sure that you didn't just forgot to run update.php before?

westwesterson’s picture

Status: Postponed (maintainer needs more info) » Needs work

I'm not sure why the formatting change worked either, it is more in line with drupal coding standards though.

Walkthrough of my debug process:
1. update.php of script was not working.
2. tested function in devel/php, reproduced the same error.
3. reformatted code to match drupal standard.
4. function worked with no additional changes
5. upgrade.php works fine.

... and at that point I reported this bug, and my solution.

westwesterson’s picture

Status: Needs work » Needs review

#1: D7-user_relationships_upgrade.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, D7-user_relationships_upgrade.patch, failed testing.