mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-06-01 04:06:12 -04:00
- Add person_id column to attribute_links table for person attributes - Add person_attribute column to attribute_definitions to distinguish item vs person attributes - Add visibility flags: SHOW_IN_CUSTOMERS, SHOW_IN_EMPLOYEES, SHOW_IN_SUPPLIERS - Add person attribute methods to Attribute model (getAttributesByPerson, savePersonAttributeLink, etc.) - Refactor Persons controller with shared attribute handling (getPersonAttributes, savePersonAttributes) - Update Customers, Employees, Suppliers controllers with PSR-12 naming and attribute integration - Create attributes/person.php view for rendering person attributes - Add person attributes container to customer/employee/supplier forms Relates to #3161
18 lines
468 B
PHP
18 lines
468 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class AddPersonAttributeFlag extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
$this->db->query('ALTER TABLE `ospos_attribute_definitions` ADD COLUMN `person_attribute` TINYINT(1) DEFAULT 0 AFTER `definition_flags`');
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
$this->db->query('ALTER TABLE `ospos_attribute_definitions` DROP COLUMN `person_attribute`');
|
|
}
|
|
} |