| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class Version20240204120000 extends AbstractMigrationChamilo |
||
| 13 | { |
||
| 14 | public function getDescription(): string |
||
| 15 | { |
||
| 16 | return 'Remove track_course_ranking, add popularity to course.'; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function up(Schema $schema): void |
||
| 20 | { |
||
| 21 | $this->addSql('ALTER TABLE course ADD COLUMN popularity INT NOT NULL DEFAULT 0'); |
||
| 22 | |||
| 23 | $this->addSql('DROP TABLE IF EXISTS track_course_ranking'); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function down(Schema $schema): void |
||
| 31 | CREATE TABLE track_course_ranking ( |
||
| 32 | id INT AUTO_INCREMENT NOT NULL, |
||
| 33 | c_id INT NOT NULL, |
||
| 46 |