for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OCA\files\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
use OCA\Files\Service\TransferOwnership\TransferRequestMapper;
use OCP\Migration\ISchemaMigration;
/**
* Auto-generated migration step: Please modify to your needs!
*/
class Version20180901190932 implements ISchemaMigration {
public function changeSchema(Schema $schema, array $options) {
// Add a new table to track user file transfer request
$table = $options['tablePrefix'] . TransferRequestMapper::TABLENAME;
$table = $schema->createTable($table);
$table->addColumn(
'id',
Type::INTEGER,
[
'comment' => 'Unique identifier for the transfer request',
'autoincrement' => true
]);
'source_user_id',
Type::STRING,
'comment' => 'The user who initiated the request'
'destination_user_id',
'comment' => 'The user who should receive the files'
'file_id',
Type::BIGINT,
'comment' => 'The file id for the folder to be transferred'
'requested_time',
'comment' => 'Time when the request was created by the source user'
'accepted_time',
'comment' => 'Time when the request was accepted by the destination user',
'notnull' => false
'rejected_time',
'comment' => 'Time when the request was rejected by the destination user',
'actioned_time',
'comment' => 'Time when the transfer actually completed on storage',
$table->setPrimaryKey(['id']);
}