initial project
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class CreateSupplierDetails extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField([
|
||||
'supplier_id' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
|
||||
'supplier_name' => ['type' => 'VARCHAR', 'constraint' => '255'],
|
||||
'supplier_ssm_no' => ['type' => 'VARCHAR', 'constraint' => '100', 'null' => true],
|
||||
'supplier_TIN_no' => ['type' => 'VARCHAR', 'constraint' => '100', 'null' => true],
|
||||
'supplier_phone_no'=> ['type' => 'VARCHAR', 'constraint' => '50', 'null' => true],
|
||||
'supplier_email' => ['type' => 'VARCHAR', 'constraint' => '255', 'null' => true],
|
||||
'supplier_address_1'=> ['type' => 'VARCHAR', 'constraint' => '255', 'null' => true],
|
||||
'supplier_address_2'=> ['type' => 'VARCHAR', 'constraint' => '255', 'null' => true],
|
||||
'supplier_address_3'=> ['type' => 'VARCHAR', 'constraint' => '255', 'null' => true],
|
||||
'supplier_address_4'=> ['type' => 'VARCHAR', 'constraint' => '255', 'null' => true],
|
||||
'poscode' => ['type' => 'VARCHAR', 'constraint' => '10', 'null' => true],
|
||||
'town' => ['type' => 'VARCHAR', 'constraint' => '100', 'null' => true],
|
||||
'state' => ['type' => 'VARCHAR', 'constraint' => '100', 'null' => true],
|
||||
'country' => ['type' => 'VARCHAR', 'constraint' => '100', 'null' => true],
|
||||
'person_in_charge' => ['type' => 'VARCHAR', 'constraint' => '255', 'null' => true],
|
||||
'pic_phone_no' => ['type' => 'VARCHAR', 'constraint' => '50', 'null' => true],
|
||||
'accounting_no' => ['type' => 'VARCHAR', 'constraint' => '100', 'null' => true],
|
||||
]);
|
||||
$this->forge->addKey('supplier_id', true);
|
||||
$this->forge->createTable('supplier_details');
|
||||
}
|
||||
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable('supplier_details');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user