22 lines
580 B
PHP
22 lines
580 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class AddDisplayNameToReceiptItems extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
$this->forge->addColumn('receipt_items', [
|
|
// Ladna, czytelna nazwa do wyswietlania i opisu operacji (name = surowa z paragonu, klucz mapowania).
|
|
'display_name' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true, 'after' => 'name'],
|
|
]);
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
$this->forge->dropColumn('receipt_items', 'display_name');
|
|
}
|
|
}
|