018 - DB Cleanup, Naming, Standardization & Half-finished Features
- Tanggal: 2026-08-10
- Chat/topik: Drop dead tables, snake_case columns, audit fields, complete classes/matches/favorites/notifications/tier_benefits
Ringkasan perubahan
- Drop
amenities+branch_stocks(Rent/stock tetap viaproducts). - Rename camelCase pricing/benefit columns → snake_case.
- Audit columns on taxonomy/benefit tables; register GORM-only models in Prisma;
owner_userson ksrdb; conventions doc. - Admin Classes CRUD; Create Match wires to
POST /matches(Android/iOS/Web). - Favorites sync (
Player); notifications written on payment complete + real UI. - Admin structured
tier_benefits; promos documented as marketing-only vs vouchers checkout.
Impact bisnis
Schema lebih bersih dan konsisten; fitur engagement/katalog yang sebelumnya “kosong” jadi operable; mengurangi utang teknis multi-branch stock / amenities legacy.
Epic / User stories
- Epic: Schema hygiene + complete half-built member features
- US: Sebagai admin, saya dapat mengelola classes dan structured membership discounts.
- US: Sebagai member, saya dapat publish open match, sync favorites, dan melihat notifikasi pembayaran.
User terdampak
Admin, member (Android/iOS/Web), ops DB.
Aplikasi terdampak
- mpc-be: PERLU — pricing columns, notifications Notify, favorites Player, api_contract
- mpc-admin: PERLU — Prisma, Classes CRUD, tier benefits, promos copy
- mpc-android: PERLU — create match, notifications API, favorites sync + APK
- mpc-ios: PERLU — parity
- mpc-web: PERLU — createMatch + publish button
- mpc-be-pos / mpc-pos / mpc-owner / ksr-sync: TIDAK (ksrdb owner_users push only)
Perubahan schema
- DROP amenities, branch_stocks
- RENAME columns (008)
- ADD audit cols (009)
- Prisma: ProductVariant/Addon, Class, Match, Favorite, Notification, Subscription
Perubahan kode
Lihat changelogs admin v0.5, be v1.4, android v1.15, ios v1.4, web v0.5.
Follow-up (prod)
- Migrasi
007–009dijalankan di productionmpcdb(2026-08-10): dead tables gone, 0 camelCase, 35 tables. - Inventory snapshot:
mpc-dev/docs/schema/tables-preview.md.