Difference between revisions of "Extensions:Embed Service"

From Lorekeeper Wiki
Jump to navigation Jump to search
(Added most of the instructions)
Tag: 2017 source edit
m
Tag: 2017 source edit
Line 12: Line 12:
 
== Usage ==
 
== Usage ==
 
Note that existing data in the database will need to be edited such that duplicate entries (where the item_id, user_id, and data are the same) need to be combined separately.
 
Note that existing data in the database will need to be edited such that duplicate entries (where the item_id, user_id, and data are the same) need to be combined separately.
 
 
You could just update each row's count column to reflect the total count at that point in time, leaving the duplicate entries alone. I'm unsure if it will break anything, but I don't think so.
 
You could just update each row's count column to reflect the total count at that point in time, leaving the duplicate entries alone. I'm unsure if it will break anything, but I don't think so.
 
 
You can also delete the duplicate rows once the count column is updated. However, this will probably require deleting the item logs associated with the affected stacks, unless you create your own workaround.
 
You can also delete the duplicate rows once the count column is updated. However, this will probably require deleting the item logs associated with the affected stacks, unless you create your own workaround.
  

Revision as of 07:19, 27 June 2020

Special thanks to itinerare for isolating and testing the changes.

This changes the default inventory in Lorekeeper from displaying each user_item row as a stack of 1, and instead condenses duplicate entries into stacks. This has affected Inventory, Trades, and Design Updates the most, though there could still be remnants of code that still aren't using the new system. Inventory pages will open a modal that displays a table of all the item varieties owned by the user, where the user can select and act on the items. Inventory select widgets use tables that display all items and their variations in the user's inventory.

Installation

Once the changes are pulled, the database needs to be updated as well - this can be done with: $ php artisan migrate The migrations will add 2 new columns to user_items: trade_count and update_count, for tracking items held in trades and updates respectively. It will also change the default value of count in user_items to 0.

Configuration

There is no need for configuration.

Usage

Note that existing data in the database will need to be edited such that duplicate entries (where the item_id, user_id, and data are the same) need to be combined separately. You could just update each row's count column to reflect the total count at that point in time, leaving the duplicate entries alone. I'm unsure if it will break anything, but I don't think so. You can also delete the duplicate rows once the count column is updated. However, this will probably require deleting the item logs associated with the affected stacks, unless you create your own workaround.

I have included some SQL that you can reference in creating a query, but it is unlikely to work out of the box. Alternatively, you can also edit the database manually. Either way, ALWAYS backup your database before making changes.

The migrations do not remove holding_type and holding_id, which are not used in this version of the inventory; these may be left in or removed on your own.

Troubleshooting

You can always find Draginraptor via the Lorekeeper Discord Server for help. Feel free to report bugs as well.

See Also

-

Documentation[create]