123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace Application\Migrations\Schema\V111;
- use Application\Migrations\AbstractMigrationChamilo;
- use Doctrine\DBAL\Schema\Schema;
- class Version20160929120000 extends AbstractMigrationChamilo
- {
-
- public function up(Schema $schema)
- {
- error_log('Version20160929120000');
- $this->addSql("ALTER TABLE c_tool ADD INDEX idx_ctool_name (name(20))");
- }
-
- public function down(Schema $schema)
- {
- foreach ($this->names as $name) {
- if (!$schema->hasTable($name)) {
- continue;
- }
- $this->addSql("ALTER TABLE c_tool DROP INDEX idx_ctool_name");
- }
- }
- }
|