> For the complete documentation index, see [llms.txt](https://sbscripts.gitbook.io/sb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sbscripts.gitbook.io/sb-scripts/sb-auction/logs-and-database.md).

# Logs and Database

### Discord logs

Webhook URLs go in `server/webhooks.lua`. That file is server-only. Leave a webhook empty to turn it off.

### Testing

While the resource is running, active lots are kept in server memory. Editing `sb_auction_listings` or `sb_auction_bids` by hand does nothing until a restart, and can skip refunds. Use `/auctiontestbid` instead.

`/auctiontestbid [lot] [amount]` is for admins and the console. It bids as a fake "Test Bidder", so you can test being outbid. It's free. The real bidder is refunded and emailed as normal. If the test bidder wins, the lot ends as unsold.

### Database

| Table                 | What it holds                                            |
| --------------------- | -------------------------------------------------------- |
| `sb_auction_listings` | Every lot, live and ended                                |
| `sb_auction_bids`     | Every bid and buy now                                    |
| `sb_auction_claims`   | Won and returned items waiting in the Claims tab         |
| `sb_auction_pending`  | Refunds, payouts and emails for players who were offline |
