feat : migration and chat models

This commit is contained in:
Alvaro Mazuecos Nogales
2024-09-20 11:25:34 +02:00
parent b25abc19d9
commit bfea4aa67c
9 changed files with 158 additions and 59 deletions

View File

@ -11,13 +11,17 @@ class ChatDepartments extends Migration
"id" => [
"type" => "INT",
"unsigned" => true,
"autoincrement" => true
"auto_increment" => true
],
"name" => [
"type" => "VARCHAR",
"constraint" => '45',
"unique" => true,
],
"display" => [
"type" => "VARCHAR",
"constraint" => '255',
],
];
public function up()
@ -28,22 +32,21 @@ class ChatDepartments extends Migration
"created_at" => [
"type" => "TIMESTAMP",
"default" => $currenttime,
],
"updated_at" => [
"type" => "TIMESTAMP",
"nullable" => true,
"null" => true,
],
"deleted_at" => [
"type" => "TIMESTAMP",
"nullable" => true,
"null" => true,
],
]);
$this->forge->createTable("chat_departments",true);
$this->forge->addPrimaryKey('id');
$this->forge->createTable("chat_departments", true);
}
public function down()