ALTER TABLE `jadwal`
ADD COLUMN `id_matapelajaran` INT NULL AFTER `id_kelas`,
ADD CONSTRAINT `fk_jadwal_matapelajaran` 
    FOREIGN KEY (`id_matapelajaran`) 
    REFERENCES `mata_pelajaran`(`id`) 
    ON DELETE SET NULL;
