<?php

namespace App\Database\Migrations\Panel;

use CodeIgniter\Database\Migration;

class Ujian extends Migration
{
    public function up()
    {
        $fields = [
            'id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
            'nama'   => ['type' => 'varchar', 'constraint' => 255, 'unique' => true],
            'bank_soal_id'   => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'order_soal' => ['type' => 'varchar', 'constraint' => 255],
            'mapel_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'bobot_tf'   => ['type' => 'int', 'constraint' => 3, 'default' => 0],
            'bobot_esai'   => ['type' => 'int', 'constraint' => 3, 'default' => 0],
            'acak_soal'   =>   ['type' => 'enum', 'constraint' => ['1', '0'], 'default' => '0'],
            'acak_opsi'   =>   ['type' => 'enum', 'constraint' => ['1', '0'], 'default' => '0'],
            'timeout'   => ['type' => 'int', 'constraint' => 8, 'default' => 0],
            'minFinishTime'   => ['type' => 'int', 'constraint' => 11, 'default' => 0],
        ];
        $this->forge->addField($fields);
        $this->forge->addKey('id', true);
        $this->forge->addForeignKey('bank_soal_id', 'm_banksoal', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('mapel_id', 'm_mapel', 'id', false, 'CASCADE');
        $this->forge->createTable('draft_ujian', true);
        // ALTER TABLE `draft_ujian` ADD `order_soal` VARCHAR(255) NOT NULL AFTER `bank_soal_id`;

        $fields = [
            'id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
            'nama' => ['type' => 'varchar', 'constraint' => 255],
            'tahun_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'draft_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'ruang_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'jenis_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'pengawas_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'cache_soal' => ['type' => 'enum', 'constraint' => ['0', '1'], 'default' => '0'],
            'multi_login' => ['type' => 'enum', 'constraint' => ['0', '1'], 'default' => '0'],
            'status' => ['type' => 'enum', 'constraint' => ['0', '1'], 'default' => '0', 'comment' => "0=>'Tidak Aktif',1=>'Aktif'"],
            'strict' => ['type' => 'int', 'constraint' => 11, 'default' => 0, 'unsigned' => true],
            'afktimeout' => ['type' => 'int', 'constraint' => 11, 'default' => 0, 'unsigned' => true],
            'maxCheatCount' => ['type' => 'int', 'constraint' => 1, 'default' => 0],
            'startDateTime' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'endDateTime' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'use_token' => ['type' => 'enum', 'constraint' => ['0', '1'], 'default' => '0'],
            'show_point' => ['type' => 'enum', 'constraint' => ['0', '1'], 'default' => '0'],
            'token' => ['type' => 'varchar', 'constraint' => 128, 'default' => null],
        ];

        $this->forge->addField($fields);
        $this->forge->addKey('id', true);
        $this->forge->addForeignKey('tahun_id', 'tahun_pelajaran', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('draft_id', 'draft_ujian', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('ruang_id', 'm_ruangujian', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('jenis_id', 'm_jenisujian', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('pengawas_id', 'users', 'id', false, 'CASCADE');
        $this->forge->createTable('jadwal_ujian', true);

        $fields = [
            'id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true, 'auto_increment' => true],
            'jadwal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'siswa_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'status' => ['type' => 'enum', 'constraint' => ['1', '0', '2'], 'default' => '0', 'comment' => "0=>'Belum Mulai',1=>'Mengerjakan', 2=>'Selesai'"],
            'pg_benar' => ['type' => 'int', 'constraint' => 3, 'default' => 0, 'unsigned' => true],
            'pgtf_benar' => ['type' => 'int', 'constraint' => 3, 'default' => 0, 'unsigned' => true],
            'pgmulti_benar' => ['type' => 'int', 'constraint' => 3, 'default' => 0, 'unsigned' => true],
            'pgcouple_benar' => ['type' => 'int', 'constraint' => 3, 'default' => 0, 'unsigned' => true],
            'shortentry_benar' => ['type' => 'int', 'constraint' => 3, 'default' => 0, 'unsigned' => true],
            'total_pg' => ['type' => 'int', 'constraint' => 11, 'default' => 0,],
            'total_shortentry' => ['type' => 'int', 'constraint' => 11, 'default' => 0,],
            'nilai_pg' => ['type' => 'float', 'constraint' => '10,2', 'default' => 0,],
            'nilai_esai' => ['type' => 'float', 'constraint' => '15,2', 'default' => 0,],
            'ip_address' => ['type' => 'char', 'constraint' => 24, 'null' => true],
            'jwt' => ['type' => 'text', 'null' => true],
            'hasCheating' => ['type' => 'ENUM', 'constraint' => ['0', '1'], 'default' => '0'],
            'soal_generated' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'start_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'end_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addKey('id', true);
        $this->forge->addForeignKey('jadwal_id', 'jadwal_ujian', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('siswa_id', 'm_siswa', 'id', false, 'CASCADE');
        $this->forge->createTable('ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'updated_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addPrimaryKey(['ujian_id', 'soal_id']);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pg_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pgmulti_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'tf' => ['type' => 'enum', 'constraint' => ['1', '0'], 'default' => null, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pgtf_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'couple_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('couple_id', 'soal_data_couple', 'id', false, 'SET NULL');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pgcouple_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'esai' => ['type' => 'text', 'null' => true],
            'nilai' => ['type' => 'float', 'constraint' => '10,2', 'default' => 0],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'updated_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addPrimaryKey(['ujian_id', 'soal_id']);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->createTable('jawaban_esai_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'respond' => ['type' => 'text', 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'updated_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addPrimaryKey(['ujian_id', 'soal_id']);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->createTable('jawaban_shortentry_ujian_siswa', true);

        // Temporary Jawaban

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'updated_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addPrimaryKey(['ujian_id', 'soal_id']);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pg_temp_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pgmulti_temp_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'tf' => ['type' => 'enum', 'constraint' => ['1', '0'], 'default' => null, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pgtf_temp_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'couple_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'opsi_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('couple_id', 'soal_data_couple', 'id', false, 'SET NULL');
        $this->forge->addForeignKey('opsi_id', 'soal_opsi', 'id', false, 'SET NULL');
        $this->forge->createTable('jawaban_pgcouple_temp_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'esai' => ['type' => 'text', 'null' => true],
            'nilai' => ['type' => 'float', 'constraint' => '10,2', 'default' => 0],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'updated_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addPrimaryKey(['ujian_id', 'soal_id']);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->createTable('jawaban_esai_temp_ujian_siswa', true);

        $fields = [
            'ujian_id' => ['type' => 'bigint', 'constraint' => 32, 'unsigned' => true],
            'soal_id' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'respond' => ['type' => 'text', 'null' => true],
            'created_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
            'updated_at' => ['type' => 'int', 'constraint' => 11, 'unsigned' => true],
        ];

        $this->forge->addField($fields);
        $this->forge->addPrimaryKey(['ujian_id', 'soal_id']);
        $this->forge->addForeignKey('ujian_id', 'ujian_siswa', 'id', false, 'CASCADE');
        $this->forge->addForeignKey('soal_id', 'soal_data', 'id', false, 'CASCADE');
        $this->forge->createTable('jawaban_shortentry_temp_ujian_siswa', true);
    }

    public function down()
    {
        // drop constraints first to prevent errors
        if ($this->db->DBDriver != 'SQLite3') {
            $this->forge->dropForeignKey('draft_ujian', 'draft_ujian_bank_soal_id_foreign');
            $this->forge->dropForeignKey('draft_ujian', 'draft_ujian_mapel_id_foreign');
            $this->forge->dropForeignKey('jadwal_ujian', 'jadwal_ujian_tahun_id_foreign');
            $this->forge->dropForeignKey('jadwal_ujian', 'jadwal_ujian_draft_id_foreign');
            $this->forge->dropForeignKey('jadwal_ujian', 'jadwal_ujian_ruang_id_foreign');
            $this->forge->dropForeignKey('jadwal_ujian', 'jadwal_ujian_jenis_id_foreign');
            $this->forge->dropForeignKey('jadwal_ujian', 'jadwal_ujian_pengawas_id_foreign');

            $this->forge->dropForeignKey('jawaban_pg_ujian_siswa', 'jawaban_pg_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pg_ujian_siswa', 'jawaban_pg_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pg_ujian_siswa', 'jawaban_pg_ujian_siswa_opsi_id_foreign');

            $this->forge->dropForeignKey('jawaban_esai_ujian_siswa', 'jawaban_esai_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_esai_ujian_siswa', 'jawaban_esai_ujian_siswa_soal_id_foreign');

            $this->forge->dropForeignKey('jawaban_shortentry_ujian_siswa', 'jawaban_shortentry_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_shortentry_ujian_siswa', 'jawaban_shortentry_ujian_siswa_soal_id_foreign');

            $this->forge->dropForeignKey('jawaban_pgmulti_ujian_siswa', 'jawaban_pgmulti_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgmulti_ujian_siswa', 'jawaban_pgmulti_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgmulti_ujian_siswa', 'jawaban_pgmulti_ujian_siswa_opsi_id_foreign');

            $this->forge->dropForeignKey('jawaban_pgtf_ujian_siswa', 'jawaban_pgtf_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgtf_ujian_siswa', 'jawaban_pgtf_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgtf_ujian_siswa', 'jawaban_pgtf_ujian_siswa_opsi_id_foreign');

            $this->forge->dropForeignKey('jawaban_pgcouple_ujian_siswa', 'jawaban_pgcouple_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgcouple_ujian_siswa', 'jawaban_pgcouple_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgcouple_ujian_siswa', 'jawaban_pgcouple_ujian_siswa_couple_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgcouple_ujian_siswa', 'jawaban_pgcouple_ujian_siswa_opsi_id_foreign');

            // Temporary Jawaban

            $this->forge->dropForeignKey('jawaban_pg_temp_ujian_siswa', 'jawaban_pg_temp_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pg_temp_ujian_siswa', 'jawaban_pg_temp_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pg_temp_ujian_siswa', 'jawaban_pg_temp_ujian_siswa_opsi_id_foreign');

            $this->forge->dropForeignKey('jawaban_esai_temp_ujian_siswa', 'jawaban_esai_temp_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_esai_temp_ujian_siswa', 'jawaban_esai_temp_ujian_siswa_soal_id_foreign');

            $this->forge->dropForeignKey('jawaban_shortentry_temp_ujian_siswa', 'jawaban_shortentry_temp_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_shortentry_temp_ujian_siswa', 'jawaban_shortentry_temp_ujian_siswa_soal_id_foreign');

            $this->forge->dropForeignKey('jawaban_pgmulti_temp_ujian_siswa', 'jawaban_pgmulti_temp_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgmulti_temp_ujian_siswa', 'jawaban_pgmulti_temp_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgmulti_temp_ujian_siswa', 'jawaban_pgmulti_temp_ujian_siswa_opsi_id_foreign');

            $this->forge->dropForeignKey('jawaban_pgtf_temp_ujian_siswa', 'jawaban_pgtf_temp_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgtf_temp_ujian_siswa', 'jawaban_pgtf_temp_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgtf_temp_ujian_siswa', 'jawaban_pgtf_temp_ujian_siswa_opsi_id_foreign');

            $this->forge->dropForeignKey('jawaban_pgcouple_temp_ujian_siswa', 'jawaban_pgcouple_temp_ujian_siswa_ujian_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgcouple_temp_ujian_siswa', 'jawaban_pgcouple_temp_ujian_siswa_soal_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgcouple_temp_ujian_siswa', 'jawaban_pgcouple_temp_ujian_siswa_couple_id_foreign');
            $this->forge->dropForeignKey('jawaban_pgcouple_temp_ujian_siswa', 'jawaban_pgcouple_temp_ujian_siswa_opsi_id_foreign');
        }
        $this->forge->dropTable('draft_ujian', true);
        $this->forge->dropTable('jadwal_ujian', true);
        $this->forge->dropTable('ujian_siswa', true);
        $this->forge->dropTable('jawaban_pg_ujian_siswa', true);
        $this->forge->dropTable('jawaban_esai_ujian_siswa', true);
        $this->forge->dropTable('jawaban_shortentry_ujian_siswa', true);
        $this->forge->dropTable('jawaban_pgmulti_ujian_siswa', true);
        $this->forge->dropTable('jawaban_pgtf_ujian_siswa', true);
        $this->forge->dropTable('jawaban_pgcouple_ujian_siswa', true);
        // Temporary Jawaban
        $this->forge->dropTable('jawaban_pg_temp_ujian_siswa', true);
        $this->forge->dropTable('jawaban_esai_temp_ujian_siswa', true);
        $this->forge->dropTable('jawaban_shortentry_temp_ujian_siswa', true);
        $this->forge->dropTable('jawaban_pgmulti_temp_ujian_siswa', true);
        $this->forge->dropTable('jawaban_pgtf_temp_ujian_siswa', true);
        $this->forge->dropTable('jawaban_pgcouple_temp_ujian_siswa', true);
    }
}
