10 lines
596 B
SQL
10 lines
596 B
SQL
-- ─── horario.hora_inicio: varchar(15) → TIME (O3) ──────────────────────────
|
|
-- The column already holds time-of-day strings ("HH:MM") and the app reads it
|
|
-- with TIME_FORMAT(hora_inicio, '%H:%i'), so it's semantically a time. Storing
|
|
-- it as TIME makes ordering/comparison correct and matches hora_fim (already
|
|
-- TIME). Existing "HH:MM" values cast cleanly. If any non-time legacy value
|
|
-- exists this ALTER will fail under strict mode — fix that row, then re-run.
|
|
|
|
ALTER TABLE `horario`
|
|
MODIFY `hora_inicio` TIME NOT NULL;
|