Files
wavelog/application/migrations/251_add_wapc_bandxuser.php
2025-07-23 16:39:17 +08:00

24 lines
476 B
PHP

<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Migration_add_wapc_bandxuser extends CI_Migration
{
public function up()
{
$fields = array(
'wapc TINYINT NOT NULL DEFAULT 1',
);
if (!$this->db->field_exists('wapc', 'bandxuser')) {
$this->dbforge->add_column('bandxuser', $fields);
}
}
public function down()
{
if ($this->db->field_exists('wapc', 'bandxuser')) {
$this->dbforge->drop_column('bandxuser', 'wapc');
}
}
}