initial project
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class CreatePosition extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField([
|
||||
'position_id' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
|
||||
'position_name' => ['type' => 'VARCHAR', 'constraint' => 255],
|
||||
'permission' => ['type' => 'TEXT', 'null' => true],
|
||||
'created_at' => ['type' => 'DATETIME', 'null' => true],
|
||||
'updated_at' => ['type' => 'DATETIME', 'null' => true],
|
||||
'deleted_at' => ['type' => 'DATETIME', 'null' => true],
|
||||
]);
|
||||
$this->forge->addKey('position_id', true);
|
||||
$this->forge->createTable('position');
|
||||
}
|
||||
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable('position');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user