hasTable('directlink')) { $table = $schema->createTable('directlink'); $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); $table->addColumn('user_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); $table->addColumn('file_id', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); $table->addColumn('token', Types::STRING, [ 'notnull' => false, 'length' => 60, ]); $table->addColumn('expiration', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); $table->setPrimaryKey(['id'], 'directlink_id_idx'); $table->addIndex(['token'], 'directlink_token_idx'); $table->addIndex(['expiration'], 'directlink_expiration_idx'); return $schema; } } }