for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OCA\activity\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use OC\DB\MDB2SchemaReader;
class Version20161122085340 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
$prefix = $this->connection->getPrefix();
if ($schema->hasTable("{$prefix}activity")) {
return;
}
$schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $this->platform);
$schemaReader->loadSchemaFromFile(__DIR__ . '/../database.xml', $schema);
public function down(Schema $schema) {
$schema->dropTable("{$prefix}activity");
$schema->dropTable("{$prefix}activity_mq");