The current definition of the bookmarks table for PostgreSQL has uid as a primary key, which means that each user is only able to have one bookmark. Not so useful. :-)
I've attached a patch that fixes the problem.
| Comment | File | Size | Author |
|---|---|---|---|
| bookmarks.pgsql.patch | 558 bytes | Steve Simms |
Comments
Comment #1
Froestel commentedRelating to the patch by smsimms:
Just access your postgres DB, alter the bookmarks table changing the uid column to be of type integer as the patch does. Don't forget to drop the primary key on that column since this is wrong! It is obviously supposed to be a foreign key relating this column to the uid column of the users table. It does no harm to leave out the foreign key constraint but it is way better style to add it.
So the appropriate SQL snippet to fix the problem within a running installation is something like
You can patch before installation:
The file bookmarks.pgsql should contain the following code:
instead of the given one.
Comment #2
Steve Simms commentedI've just committed the patch to convert the unique key on uid to a regular index.
Since the rest of the Drupal project doesn't seem to be all that interested in using foreign keys, I didn't add it to this patch (it'll probably just confuse people who aren't expecting it). If that changes, I'll be happy to add it.