| 
				Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /home/matalashes/.trash/app.bak.1/Database/Migrations/  | 
Upload File :  | 
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class PsAdmListmenuChild extends Migration
{
    public function up()
    {
        //
        $this->db->disableForeignKeyChecks();
        $this->forge->addField([
            'ps_alc_id' => [
                'type' => 'INT',
                'constraint' => 3,
                'unsigned' => true,
                'auto_increment' => true,
            ],
            'ps_alp_id' => [
                'type' => 'INT',
                'constraint' => 3,
                'unsigned' => true,
            ],
            'alc_kode' => [
                'type' => 'VARCHAR',
                'constraint' => 15,
            ],
            'alc_nama' => [
                'type' => 'VARCHAR',
                'constraint' => 30,
            ],
            'alc_url' => [
                'type' => 'VARCHAR',
                'constraint' => 30,
            ],
            'alc_order' => [
                'type' => 'INT',
                'constraint' => 2,
                'unsigned' => true,
            ],
            'alc_fontaw' => [
                'type' => 'VARCHAR',
                'constraint' => 30,
            ],
            'alc_action' => [
                'type' => 'VARCHAR',
                'constraint' => 20,
                'comment' => '1 = add, 2 = update, 3 = delete, 4 = export, 5 = print, 6 = read(view gc), 9 = Table Only'
            ],
            'alc_basedir' => [
                'type' => 'VARCHAR',
                'constraint' => 10,
            ],
            'created_at' => [
                'type' => 'TIMESTAMP', 'null' => true
            ],
            'updated_at' => [
                'type' => 'TIMESTAMP',
                'null' => true
            ],
            'deleted_at' => [
                'type' => 'TIMESTAMP',
                'null' => true
            ],
        ]);
        $this->forge->addKey('ps_alc_id', true);
        $this->forge->addForeignKey('ps_alp_id', 'ps_adm_listmenu_parent', 'ps_alp_id');
        $this->forge->createTable('ps_adm_listmenu_child');
        $this->db->enableForeignKeyChecks();
    }
    public function down()
    {
        $this->forge->dropTable('ps_adm_listmenu_child');
    }
}