migrations/Version20240219060825.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240219060825 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17. //         // this up() migration is auto-generated, please modify it to your needs
  18. // 
  19. //         $entries = [
  20. //             ['title' => 'Download', 'slug' => 'admin_user_ads_data_download', 'route' => 'user-ads-data/index/download/', 'group' => 'User Ads Data', 'desc' => 'description', 'status' => '1'],
  21. //             ['title' => 'Download', 'slug' => 'admin_media_kit_permission', 'route' => 'media-kit/index/download/*', 'group' => 'Media Kit ', 'desc' => 'description', 'status' => '1'],
  22. //             ['title' => 'Show Password', 'slug' => 'admin_media_kit_show_password', 'route' => 'media-kit/index/showPassword/*', 'group' => 'Media Kit ', 'desc' => 'description', 'status' => '1'],
  23. // 
  24. //         ];
  25. //         foreach ($entries as $entry) {
  26. //             $existingEntry = $this->connection->fetchAssociative(
  27. //                 'SELECT * FROM permissions WHERE permission_slug = :slug',
  28. //                 ['slug' => $entry['slug']]
  29. //             );
  30. //             if (!$existingEntry) {
  31. //                 $this->addSql('INSERT INTO permissions (permission_title, permission_slug , permission_route,permission_group,permission_description,status,created_at) VALUES (:title, :slug, :route, :group,:desc,:status,CURRENT_TIMESTAMP)', [
  32. //                     'title' => $entry['title'],
  33. //                     'slug' => $entry['slug'],
  34. //                     'route' => $entry['route'],
  35. //                     'group' => $entry['group'],
  36. //                     'desc' => $entry['desc'],
  37. //                     'status' => 1,
  38. //                 ]);
  39. //             }
  40. //         }
  41. //         $this->addSql('UPDATE `permissions` SET `permission_slug` = "admin_resource_types_add" WHERE `permissions`.`permission_route` = "resource-types/index/add/"');
  42. //         $this->addSql('UPDATE `permissions` SET `permission_slug` = "admin_resource_types_edit" WHERE `permissions`.`permission_route` = "resource-types/index/edit/"');
  43. //         $this->addSql('UPDATE `permissions` SET `permission_slug` = "admin_resource_types_delete" WHERE `permissions`.`permission_route` = "resource-types/index/delete/"');
  44. //         $this->addSql('UPDATE `permissions` SET `permission_slug` = "admin_rating_criteria_listing" WHERE `permissions`.`permission_route` = "rating-criteria"');
  45.     }
  46.     public function down(Schema $schema): void
  47.     {
  48.         // this down() migration is auto-generated, please modify it to your needs
  49.        
  50.         $this->addSql('DROP TABLE schedule_subscriptions');
  51.         
  52.     }
  53. }