70 lines
2.7 KiB
Markdown
70 lines
2.7 KiB
Markdown
# Database Schema
|
|
|
|
> Generated by /paul:map-codebase — 2026-04-26
|
|
> Note: WordPress core not in local repo — schema below is derived from config + plugin inventory.
|
|
|
|
## Connection
|
|
|
|
- **Database**: `garbary_szkury`
|
|
- **Prefix**: `wp_`
|
|
- **Host**: localhost
|
|
- **Charset**: UTF-8
|
|
|
|
## Standard WordPress Tables
|
|
|
|
| Table | Purpose |
|
|
|-------|---------|
|
|
| `wp_posts` | All content: pages, posts, WooCommerce products, bbPress topics/replies |
|
|
| `wp_postmeta` | Post custom fields (includes ACF fields, WooCommerce product data) |
|
|
| `wp_users` | User accounts |
|
|
| `wp_usermeta` | User meta (WooCommerce customer data, roles) |
|
|
| `wp_options` | Site settings, theme mods, plugin config, Divi builder settings |
|
|
| `wp_terms` | Categories, tags, product categories, bbPress forums |
|
|
| `wp_term_taxonomy` | Taxonomy definitions |
|
|
| `wp_term_relationships` | Post ↔ term relationships |
|
|
| `wp_comments` | Comments |
|
|
| `wp_commentmeta` | Comment meta |
|
|
|
|
## WooCommerce Tables
|
|
|
|
| Table | Purpose |
|
|
|-------|---------|
|
|
| `wp_woocommerce_sessions` | Customer sessions |
|
|
| `wp_woocommerce_api_keys` | REST API keys |
|
|
| `wp_woocommerce_attribute_taxonomies` | Product attribute definitions |
|
|
| `wp_woocommerce_downloadable_product_permissions` | Digital product access |
|
|
| `wp_woocommerce_order_items` | Order line items |
|
|
| `wp_woocommerce_order_itemmeta` | Order item meta |
|
|
| `wp_woocommerce_tax_rates` | Tax configuration |
|
|
| `wp_woocommerce_tax_rate_locations` | Tax rate geo rules |
|
|
| `wp_woocommerce_shipping_zones` | Shipping zones |
|
|
| `wp_woocommerce_shipping_zone_locations` | Zone locations |
|
|
| `wp_woocommerce_shipping_zone_methods` | Zone shipping methods |
|
|
| `wp_woocommerce_payment_tokens` | Saved payment tokens (PayU) |
|
|
| `wp_woocommerce_payment_tokenmeta` | Payment token meta |
|
|
| `wp_wc_product_meta_lookup` | Product search/filter cache |
|
|
| `wp_wc_tax_rate_classes` | Tax classes |
|
|
| `wp_wc_webhooks` | WooCommerce webhooks |
|
|
|
|
## Key Custom Fields (ACF — stored in wp_postmeta)
|
|
|
|
| Field key | Post type | Purpose |
|
|
|-----------|-----------|---------|
|
|
| `end_date_of_the_offer` | `product` | Offer expiry date; read by `cron-products.php` to auto-unpublish |
|
|
|
|
## bbPress Tables
|
|
|
|
| Table | Purpose |
|
|
|-------|---------|
|
|
| Uses `wp_posts` | Forum, topic, reply post types |
|
|
| Uses `wp_postmeta` | Forum/topic meta |
|
|
| Uses `wp_terms` | Forum taxonomy |
|
|
|
|
## Notes
|
|
|
|
- Products (courses) are stored as `wp_posts` with `post_type = 'product'`
|
|
- Course categories are `wp_terms` under `product_cat` taxonomy
|
|
- Custom "Rezerwuj miejsce" / stock behavior driven by `wp_postmeta` stock fields + ACF `end_date_of_the_offer`
|
|
- Divi page builder content stored as serialized shortcodes in `wp_posts.post_content`
|
|
- Divi customizer settings (from divi-children-engine) stored in `wp_options` as `theme_mods_body-relax`
|