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
Comment | File | Size | Author |
---|---|---|---|
#1 | D7-user_relationships_upgrade.patch | 1.23 KB | westwesterson |
D7-user_relationships_upgrade.patch | 2.95 KB | westwesterson |
Comments
Comment #1
westwesterson CreditAttribution: westwesterson commentedprevious patch included junk... heres a better one
Comment #3
BerdirI 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?
Comment #4
westwesterson CreditAttribution: westwesterson commentedI'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.
Comment #5
westwesterson CreditAttribution: westwesterson commented#1: D7-user_relationships_upgrade.patch queued for re-testing.