Make sure the accounts table exists
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
073216e827
commit
601f795122
|
@ -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) {
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,7 +26,7 @@
|
||||||
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
||||||
// when updating major/minor version number.
|
// when updating major/minor version number.
|
||||||
|
|
||||||
$OC_Version = array(13, 0, 0, 2);
|
$OC_Version = array(13, 0, 0, 3);
|
||||||
|
|
||||||
// The human readable string
|
// The human readable string
|
||||||
$OC_VersionString = '13.0.0 alpha';
|
$OC_VersionString = '13.0.0 alpha';
|
||||||
|
|
Loading…
Reference in New Issue