docs: add .paul/codebase/ codebase map (7 documents)
Stack, architecture, conventions, testing, integrations, db_schema, concerns. Generated by PAUL /map-codebase workflow from codebase analysis. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
82
.paul/codebase/db_schema.md
Normal file
82
.paul/codebase/db_schema.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# Database Schema — krolewskie-miody.pl
|
||||
|
||||
## Connection
|
||||
|
||||
- **Engine:** MariaDB
|
||||
- **Host:** `mariadb114.miody.nazwa.pl`
|
||||
- **Database:** `miody_miodynew`
|
||||
- **Table prefix:** `wp_` (default WordPress prefix)
|
||||
- **Charset:** `utf8mb4`
|
||||
|
||||
## Standard WordPress Tables
|
||||
|
||||
| Table | Purpose |
|
||||
|-------|---------|
|
||||
| `wp_posts` | All content (pages, products, orders, templates) |
|
||||
| `wp_postmeta` | Post metadata (product price, order items, etc.) |
|
||||
| `wp_terms` | Taxonomy terms (categories, tags, product attributes) |
|
||||
| `wp_term_taxonomy` | Term-taxonomy relationships |
|
||||
| `wp_term_relationships` | Object-term relationships |
|
||||
| `wp_options` | Site configuration, plugin settings |
|
||||
| `wp_users` | Customer and admin accounts |
|
||||
| `wp_usermeta` | User metadata (shipping address, billing, roles) |
|
||||
| `wp_comments` | Product reviews, order notes |
|
||||
| `wp_commentmeta` | Comment metadata |
|
||||
| `wp_links` | Blogroll (legacy, rarely used) |
|
||||
|
||||
## WooCommerce Tables
|
||||
|
||||
| Table | Purpose |
|
||||
|-------|---------|
|
||||
| `wp_woocommerce_sessions` | Cart sessions |
|
||||
| `wp_woocommerce_api_keys` | REST API authentication |
|
||||
| `wp_woocommerce_attribute_taxonomies` | Product attribute definitions |
|
||||
| `wp_woocommerce_downloadable_product_permissions` | Digital product access |
|
||||
| `wp_woocommerce_order_items` | Line items per order |
|
||||
| `wp_woocommerce_order_itemmeta` | Metadata for order items |
|
||||
| `wp_woocommerce_tax_rates` | Tax rate definitions |
|
||||
| `wp_woocommerce_tax_rate_locations` | Tax rate geographic zones |
|
||||
| `wp_woocommerce_shipping_zones` | Shipping zone definitions |
|
||||
| `wp_woocommerce_shipping_zone_locations` | Zone geographic areas |
|
||||
| `wp_woocommerce_shipping_zone_methods` | Methods per zone |
|
||||
| `wp_woocommerce_payment_tokens` | Saved payment methods |
|
||||
| `wp_woocommerce_payment_tokenmeta` | Payment token metadata |
|
||||
| `wp_woocommerce_log` | WooCommerce action log |
|
||||
|
||||
## Plugin Tables (selected)
|
||||
|
||||
| Table | Plugin | Purpose |
|
||||
|-------|--------|---------|
|
||||
| `wp_code_snippets` | Code Snippets | Custom PHP snippet storage |
|
||||
| `wp_complianz_*` | Complianz GDPR | Cookie consent records |
|
||||
| `wp_wfpk_*` or similar | PixelYourSite | Tracking pixel config |
|
||||
|
||||
## Key Relationships
|
||||
|
||||
### Products
|
||||
- `wp_posts` (post_type = 'product' or 'product_variation')
|
||||
- `wp_postmeta` — `_price`, `_regular_price`, `_sale_price`, `_sku`, `_stock`
|
||||
- `wp_term_relationships` → `wp_terms` (product categories, tags, attributes)
|
||||
|
||||
### Orders
|
||||
- `wp_posts` (post_type = 'shop_order')
|
||||
- `wp_postmeta` — `_billing_*`, `_shipping_*`, `_order_total`, `_payment_method`
|
||||
- `wp_woocommerce_order_items` + `wp_woocommerce_order_itemmeta`
|
||||
|
||||
### Customers
|
||||
- `wp_users` — account
|
||||
- `wp_usermeta` — `billing_address_1`, `shipping_city`, etc.
|
||||
|
||||
## Migration Rules
|
||||
|
||||
Per CLAUDE.md:
|
||||
1. Schema changes require a new migration file
|
||||
2. Never modify existing migrations
|
||||
3. Document all custom schema changes in this file
|
||||
|
||||
## Custom Schema Changes
|
||||
|
||||
*No custom tables or schema changes recorded yet.*
|
||||
|
||||
---
|
||||
*Update this file whenever schema changes are made.*
|
||||
Reference in New Issue
Block a user