-- UPDATE TABLE PESERTA
ALTER TABLE `pelatihan`.`peserta`
ADD COLUMN `domisili` TEXT NULL DEFAULT NULL AFTER `telepon`,
ADD COLUMN `biografi` TEXT NULL DEFAULT NULL AFTER `domisili`,
ADD COLUMN `rekening_cabang` VARCHAR(255) NULL DEFAULT NULL AFTER `rekening_bank`



-- CREATE TABLE PENGALAMAN PESERTA
CREATE TABLE IF NOT EXISTS `pelatihan`.`pengalaman_peserta` (
  `id` INT(11) UNSIGNED NOT NULL,
  `peserta_id` INT(11) NOT NULL,
  `jenis_pengalaman_id` INT UNSIGNED NOT NULL,
  `tahun_mulai` YEAR NOT NULL,
  `tahun_selesai` YEAR NULL DEFAULT NULL,
  `keterangan` VARCHAR(255) NOT NULL,
  `spesialisasi` VARCHAR(255) NULL DEFAULT NULL,
  `file_bukti` VARCHAR(255) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_pengalaman_peserta_peserta1_idx` (`peserta_id` ASC),
  INDEX `fk_pengalaman_peserta_jenis_pengalaman1_idx` (`jenis_pengalaman_id` ASC),
  CONSTRAINT `fk_pengalaman_peserta_peserta1`
    FOREIGN KEY (`peserta_id`)
    REFERENCES `pelatihan`.`peserta` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_pengalaman_peserta_jenis_pengalaman1`
    FOREIGN KEY (`jenis_pengalaman_id`)
    REFERENCES `pelatihan`.`jenis_pengalaman` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB