add feature do not show again job for parent portal
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AddHideJobOpeningsPopupToPreferences extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (! $this->db->tableExists('user_preferences')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $this->db->fieldExists('hide_job_openings_popup', 'user_preferences')) {
|
||||
$definition = [
|
||||
'type' => 'TINYINT',
|
||||
'constraint' => 1,
|
||||
'default' => 0,
|
||||
'null' => false,
|
||||
];
|
||||
|
||||
if ($this->db->fieldExists('menu_custom_mode', 'user_preferences')) {
|
||||
$definition['after'] = 'menu_custom_mode';
|
||||
}
|
||||
|
||||
$this->forge->addColumn('user_preferences', [
|
||||
'hide_job_openings_popup' => $definition,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if (
|
||||
$this->db->tableExists('user_preferences')
|
||||
&& $this->db->fieldExists('hide_job_openings_popup', 'user_preferences')
|
||||
) {
|
||||
$this->forge->dropColumn('user_preferences', 'hide_job_openings_popup');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user