ALTER TABLE faltas
ADD COLUMN disciplina_id INT(11) NOT NULL AFTER turma_id,
ADD INDEX idx_disciplina (disciplina_id);

-- Opcional: Adicionar a chave estrangeira
-- ALTER TABLE faltas
-- ADD CONSTRAINT fk_falta_disciplina
-- FOREIGN KEY (disciplina_id) REFERENCES disciplinas(id) ON DELETE CASCADE;




ALTER TABLE faltas
ADD COLUMN disciplina_id INT(11) NOT NULL AFTER turma_id,
ADD INDEX idx_disciplina (disciplina_id);

-- Opcional: Adicionar a chave estrangeira
-- ALTER TABLE faltas
-- ADD CONSTRAINT fk_falta_disciplina
-- FOREIGN KEY (disciplina_id) REFERENCES disciplinas(id) ON DELETE CASCADE;