2023031701-add_paylist_gateway.php 495 B

12345678910111213141516171819202122
  1. <?php
  2. declare(strict_types=1);
  3. use App\Interfaces\MigrationInterface;
  4. use App\Services\DB;
  5. return new class() implements MigrationInterface {
  6. public function up(): int
  7. {
  8. DB::getPdo()->exec("ALTER TABLE paylist ADD COLUMN IF NOT EXISTS `gateway` varchar(255) NOT NULL DEFAULT '';");
  9. return 2023031701;
  10. }
  11. public function down(): int
  12. {
  13. DB::getPdo()->exec('ALTER TABLE paylist DROP COLUMN IF EXISTS `gateway`;');
  14. return 2023031700;
  15. }
  16. };