-- This is a starter migration guide, not a fully automatic migration.
-- Map old tables from ticker_rallypanel.sql into the new schema carefully.

-- Recommended approach:
-- 1. Import database/schema.sql
-- 2. Import database/seeds.sql only on a fresh environment
-- 3. Export old tables to CSV or temporary staging tables
-- 4. Migrate entity-by-entity

-- Old to new mapping notes:
-- sm7_users           -> users + tournament_users
-- sm7_tournaments     -> tournaments
-- sm7_teams           -> teams
-- sm7_players         -> players / team_players
-- sm7_matches         -> matches + match_sets
-- sm7_points          -> match_events

-- Important manual fixes:
-- access_ids comma-separated values should NOT remain in production design.
-- set1_1..set12_2 should be converted to rows in match_sets.
-- scoring history should be replayed into match_events if available.
