castopod/modules/Auth/Database/Migrations/2020-12-29-100000_add_is_owner_to_users.php
Yassine Doghri 2a50f6e4d2 style: update ecs config to align associative arrays arrows
update composer dependencies to latest
2023-06-12 15:12:49 +00:00

31 lines
603 B
PHP

<?php
declare(strict_types=1);
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddIsOwnerToUsers extends Migration
{
public function up(): void
{
$fields = [
'is_owner' => [
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'null' => false,
],
];
$this->forge->addColumn('users', $fields);
}
public function down(): void
{
$fields = ['is_owner'];
$this->forge->dropColumn('users', $fields);
}
}