mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
35 lines
706 B
PHP
35 lines
706 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class ChatDepartments extends Migration
|
|
{
|
|
protected array $COLUMNS = [
|
|
"id" => [
|
|
"type" => "INT",
|
|
"unsigned" => true,
|
|
"autoincrement" => true
|
|
],
|
|
"name" => [
|
|
"type" => "VARCHAR",
|
|
"constraint" => '45',
|
|
"unique" => true,
|
|
],
|
|
];
|
|
public function up()
|
|
{
|
|
$this->forge->addField($this->COLUMNS);
|
|
$this->forge->createTable("chat_departments");
|
|
$this->forge->addPrimaryKey('id');
|
|
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
//
|
|
$this->forge->dropTable("chat_departments");
|
|
}
|
|
}
|