Update besar apk finance
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_Add_pr_applicant extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('applicant_is_creator', 'purchase_requests')) {
|
||||
$this->db->query("ALTER TABLE purchase_requests ADD applicant_is_creator TINYINT(1) NOT NULL DEFAULT 1 AFTER requested_by");
|
||||
}
|
||||
if (!$this->db->field_exists('applicant_name', 'purchase_requests')) {
|
||||
$this->db->query("ALTER TABLE purchase_requests ADD applicant_name VARCHAR(150) NULL AFTER applicant_is_creator");
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('applicant_name', 'purchase_requests')) {
|
||||
$this->db->query('ALTER TABLE purchase_requests DROP COLUMN applicant_name');
|
||||
}
|
||||
if ($this->db->field_exists('applicant_is_creator', 'purchase_requests')) {
|
||||
$this->db->query('ALTER TABLE purchase_requests DROP COLUMN applicant_is_creator');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user