Files
opensourcepos/app/Database/Migrations/20230307000000_int_to_tinyint.php
objecttothis e90b5b87da Replace tabs with spaces (#4196)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2025-03-28 21:24:21 +04:00

28 lines
833 B
PHP

<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class IntToTinyint extends Migration
{
/**
* Perform a migration step.
*/
public function up(): void
{
$this->db->query('ALTER TABLE ' . $this->db->prefixTable('customers') . ' MODIFY `consent` tinyint NOT NULL DEFAULT 0');
$this->db->query('ALTER TABLE ' . $this->db->prefixTable('cash_up') . ' MODIFY `note` tinyint NOT NULL DEFAULT 0');
}
/**
* Revert a migration step.
*/
public function down(): void
{
$this->db->query('ALTER TABLE ' . $this->db->prefixTable('customers') . ' MODIFY `consent` int NOT NULL DEFAULT 0');
$this->db->query('ALTER TABLE ' . $this->db->prefixTable('cash_up') . ' MODIFY `note` int NOT NULL DEFAULT 0');
}
}