fix job positions
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Successful in 1m22s

This commit is contained in:
root
2026-09-03 13:01:36 -04:00
parent c70f6bdc6e
commit 9e2f858343
9 changed files with 75 additions and 5 deletions
@@ -63,6 +63,7 @@ class CreateJobPostings extends Migration
'status' => ['type' => 'VARCHAR', 'constraint' => 20, 'default' => 'draft'],
'posted_by' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'null' => true],
'posted_at' => ['type' => 'DATETIME', 'null' => true],
'details_click_count' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => 0],
'created_at' => ['type' => 'DATETIME', 'null' => true],
'updated_at' => ['type' => 'DATETIME', 'null' => true],
]);
@@ -0,0 +1,32 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddDetailsClickCountToJobPositions extends Migration
{
public function up()
{
if (!$this->db->tableExists('job_positions') || $this->db->fieldExists('details_click_count', 'job_positions')) {
return;
}
$this->forge->addColumn('job_positions', [
'details_click_count' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'default' => 0,
'after' => 'posted_at',
],
]);
}
public function down()
{
if ($this->db->tableExists('job_positions') && $this->db->fieldExists('details_click_count', 'job_positions')) {
$this->forge->dropColumn('job_positions', 'details_click_count');
}
}
}