mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-20 17:57:12 -04:00
Align migration helper function calls with PSR-12 camelCase naming convention. Affects all migration files from initial schema through recent upgrades. Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> Co-authored-by: Travis Garrison <travis@chiraqbookstore.com>
34 lines
760 B
PHP
34 lines
760 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
use Config\Database;
|
|
|
|
class AttributeLinksUniqueConstraint extends Migration
|
|
{
|
|
/**
|
|
* Perform a migration step.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
helper('migration');
|
|
$foreignKeys = [
|
|
'ospos_attribute_links_ibfk_1',
|
|
'ospos_attribute_links_ibfk_2',
|
|
];
|
|
|
|
dropForeignKeyConstraints($foreignKeys, 'attribute_links');
|
|
dropColumnIfExists('ospos_attribute_links', 'generated_unique_column');
|
|
|
|
executeScript(APPPATH . 'Database/Migrations/sqlscripts/3.4.1_attribute_links_unique_constraint.sql');
|
|
}
|
|
|
|
/**
|
|
* Revert a migration step.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
}
|
|
}
|