forge->addField([ 'id' => [ 'type' => 'BIGINT', 'constraint' => 20, 'unsigned' => true, 'auto_increment' => true, ], 'consent_request_id' => [ 'type' => 'VARCHAR', 'constraint' => 100, ], 'artifact_id' => [ 'type' => 'VARCHAR', 'constraint' => 100, ], 'abha_address' => [ 'type' => 'VARCHAR', 'constraint' => 120, 'null' => true, ], 'hfr_id' => [ 'type' => 'VARCHAR', 'constraint' => 60, 'null' => true, ], 'last_status' => [ 'type' => 'VARCHAR', 'constraint' => 40, 'null' => true, ], 'last_polled_at' => [ 'type' => 'DATETIME', 'null' => true, ], 'created_at' => [ 'type' => 'DATETIME', 'null' => true, ], 'updated_at' => [ 'type' => 'DATETIME', 'null' => true, ], ]); $this->forge->addKey('id', true); $this->forge->addUniqueKey(['consent_request_id', 'artifact_id'], 'uniq_request_artifact'); $this->forge->addKey('abha_address'); $this->forge->createTable('abdm_hiu_consent_artifacts', true); } public function down(): void { $this->forge->dropTable('abdm_hiu_consent_artifacts', true); } }