Просмотр исходного кода

Make sure the accounts table exists

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v13.0.0beta1
Joas Schilling 6 лет назад
Родитель
Сommit
601f795122
Аккаунт пользователя с таким Email не найден
2 измененных файлов: 60 добавлений и 1 удалений
  1. 59
    0
      core/Migrations/Version13000Date20170814074715.php
  2. 1
    1
      version.php

+ 59
- 0
core/Migrations/Version13000Date20170814074715.php Просмотреть файл

@@ -0,0 +1,59 @@
<?php
namespace OC\Core\Migrations;

use Doctrine\DBAL\Schema\Schema;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;

/**
* Auto-generated migration step: Please modify to your needs!
*/
class Version13000Date20170814074715 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @return null|Schema
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
/** @var Schema $schema */
$schema = $schemaClosure();


if (!$schema->hasTable('accounts')) {
$table = $schema->createTable('accounts');
$table->addColumn('uid', 'string', [
'notnull' => true,
'length' => 64,
'default' => '',
]);
$table->addColumn('data', 'text', [
'notnull' => true,
'default' => '',
]);
$table->setPrimaryKey(['uid']);
}

return $schema;
}

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}
}

+ 1
- 1
version.php Просмотреть файл

@@ -26,7 +26,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.

$OC_Version = array(13, 0, 0, 2);
$OC_Version = array(13, 0, 0, 3);

// The human readable string
$OC_VersionString = '13.0.0 alpha';

Загрузка…
Отмена
Сохранить