Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class Version20250305123000 extends AbstractMigrationChamilo |
||
13 | { |
||
14 | public function getDescription(): string |
||
15 | { |
||
16 | return 'Sets visible_to_self and changeable to 0 for extra fields migrated from configuration.php.'; |
||
17 | } |
||
18 | |||
19 | public function up(Schema $schema): void |
||
20 | { |
||
21 | $this->addSql(" |
||
22 | UPDATE extra_field |
||
23 | SET visible_to_self = 0, changeable = 0 |
||
24 | WHERE variable IN ( |
||
25 | 'session_courses_read_only_mode', |
||
26 | 'is_mandatory', |
||
27 | 'show_in_catalogue', |
||
28 | 'multiple_language', |
||
29 | 'send_notification_at_a_specific_date', |
||
30 | 'date_to_send_notification', |
||
31 | 'send_to_users_in_session', |
||
32 | 'tags', |
||
33 | 'acquisition', |
||
34 | 'invisible', |
||
35 | 'start_date', |
||
36 | 'end_date' |
||
37 | ); |
||
38 | "); |
||
39 | } |
||
40 | |||
41 | public function down(Schema $schema): void |
||
44 | UPDATE extra_field |
||
45 | SET visible_to_self = 1, changeable = 1 |
||
46 | WHERE variable IN ( |
||
63 |