Schema migrations — KSR MPC
Indeks ALTER/DDL yang harus dijalankan di database server. Setiap file berisi query siap copy-paste.
| No | File | Judul | Tanggal |
|---|---|---|---|
| 001 | 001-pos-outlets-devices-cashier.md | POS outlets/devices + Cashier role | 2026-08-07 |
| 002 | 002-multi-branch.md | Multi-branch venues + branch_stocks | 2026-08-08 |
| 003 | 003-ksrdb-datamart.md | Provision ksrdb datamart | 2026-08-08 |
| 004 | 004-owner-users.md | owner_users untuk login mpc-owner | 2026-08-08 |
| 005 | 005-three-courts-display-order.md | 3 courts aktif + display_order 1–3 (Court 3 VIP) | 2026-08-09 |
| 006 | 006-rename-product-category-proshop-rent.md | ProductCategory Merch→ProShop, Equipment→Rent | 2026-08-10 |
| 007 | 007-drop-amenities-branch-stocks.md | Drop unused amenities + branch_stocks | 2026-08-10 |
| 008 | 008-snake-case-pricing-benefit-columns.md | camelCase → snake_case pricing/benefit cols | 2026-08-10 |
| 010 | 010-cleanup-tasks-court4-devices-events.md | Drop tasks, Court 4, debug devices, events.title | 2026-08-10 |
| 011 | 011-product-type-channels-redemptions.md | product_type + promo/voucher channel + redemptions | 2026-08-10 |
| 012 | 012-booking-tx-payment-stock-ledgers.md | booking.transaction_id + payment/stock ledgers | 2026-08-10 |
| 013 | 013-staff-coaches-outlet-assignments.md | staff_coaches + staff_outlet_assignments | 2026-08-10 |
| 014 | 014-drop-proshop-rent-group-ops-cleanup.md | Drop ProShop "Rent" group; POS device purge; store_settings.default_branch_id | 2026-08-11 |
| 015 | 015-uuid-fk-indexes-drop-dead-enums.md | UUID id hygiene, FK indexes, drop dead enums | 2026-08-11 |
| 016 | 016-booking-exclusion-index-hygiene.md | Anti double-booking EXCLUDE, CHECK stok, index hygiene, ksrdb users | 2026-08-11 |
| 017 | 017-matchplay-participants-games.md | Matchplay: host/is_double + participants + games | 2026-08-11 |
| 018 | 018-fnb-pickup-settings.md | FnB pickup before/interval di store_settings + transactions.fnb_pickup_time | 2026-08-11 |
| 019 | 019-court-showcase-content.md | Courts showcase: description/gallery/specs/perks + seed 3 court | 2026-08-11 |
| 020 | 020-resto-spaces-reservations.md | Resto: spaces + space_reservations + table mapping + courts.bundled_space_id | 2026-08-13 |
| 021 | 021-link-orders-to-space-reservations.md | transactions.space_reservation_id — link F&B pre-order ke reservasi Resto | 2026-08-13 |
| 022 | 022-tip-reference-index.md | Index transaction_items.reference_id untuk lookup Tip (booking history) | 2026-08-13 |
| 023 | 023-device-tokens-notifications.md | device_tokens + notifications.category/data untuk FCM push | 2026-08-15 |
| 024 | 024-mpc-crm-database.md | DB terpisah crmdb untuk mpc-crm (portable) | 2026-08-15 |
| 025 | 025-promo-image-carousel.md | promos.image_url + display_order untuk carousel Home | 2026-08-15 |
| 026 | 026-email-otps.md | email_otps untuk OTP registrasi / reset password | 2026-08-20 |
| 027 | 027-product-image-gallery.md | products.image_url + gallery; events.image_url | 2026-08-20 |
Rule: .cursor/rules/schema-migration-log.mdc.
Preview tabel + row count production: ../tables-preview.md.