merge prod to main
This commit is contained in:
Regular → Executable
+37
-1
@@ -1 +1,37 @@
|
||||
Print all
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AddPageSelectionToPrintRequests extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (! $this->db->tableExists('print_requests')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! $this->db->fieldExists('page_selection', 'print_requests')) {
|
||||
$this->forge->addColumn('print_requests', [
|
||||
'page_selection' => [
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 255,
|
||||
'null' => true,
|
||||
'after' => 'num_copies',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if (! $this->db->tableExists('print_requests')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->db->fieldExists('page_selection', 'print_requests')) {
|
||||
$this->forge->dropColumn('print_requests', 'page_selection');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user