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