'Stores wishlist meta information related to users.', 'fields' => [ 'wid' => [ 'description' => 'The wish list ID.', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ], 'uid' => [ 'description' => 'The uid or session ID of the user creating the wish list.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ], 'title' => [ 'description' => 'The title of the wish list.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ], 'expiration' => [ 'description' => 'Timestamp for when the wish list expires.', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ], 'address' => [ 'description' => 'Address for shipping items on the wish list.', 'type' => 'text', ], 'private' => [ 'description' => 'Private', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ], ], 'indexes' => [ 'uid' => ['uid'], ], 'primary key' => ['wid'], ]; $schema['uc_wishlist_products'] = [ 'description' => 'Products assigned to a wish list.', 'fields' => [ 'wpid' => [ 'description' => 'The ID of the wish list product.', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ], 'wid' => [ 'description' => 'The {uc_wishlists}.wid for the wish list this product is assigned to.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'nid' => [ 'description' => 'The {node}.nid of the product.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'qty' => [ 'description' => 'The quantity of this product on the wish list.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'changed' => [ 'description' => 'The timestamp of the last change to this wish list product.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => TRUE, ], 'data' => [ 'description' => 'The data array for the product.', 'type' => 'text', ], 'purchase' => [ 'description' => 'An array of purchase data for the product.', 'type' => 'text', ], ], 'indexes' => [ 'wid' => ['wid'], ], 'primary key' => ['wpid'], ]; return $schema; } /** * Replaced the anonymous configuration settings with 'create wish lists' * permissions. */ function uc_wishlist_update_7001() { $allow_anonymous = \Drupal::config()->get('uc_wishlist_allow_anonymous', FALSE); if ($allow_anonymous) { user_role_change_permissions(DRUPAL_ANONYMOUS_RID, ['create wish lists' => TRUE]); } variable_del('uc_wishlist_allow_anonymous'); }