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