Replace TYPE with TYPES
As TYPE::* is deprecated. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
43216f0ac9
commit
87dd760a89
|
@ -26,7 +26,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -47,26 +47,26 @@ class Version1005Date20180413093149 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('directlink')) {
|
if (!$schema->hasTable('directlink')) {
|
||||||
$table = $schema->createTable('directlink');
|
$table = $schema->createTable('directlink');
|
||||||
|
|
||||||
$table->addColumn('id',Type::BIGINT, [
|
$table->addColumn('id',Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('user_id', Type::STRING, [
|
$table->addColumn('user_id', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('file_id', Type::BIGINT, [
|
$table->addColumn('file_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('token', Type::STRING, [
|
$table->addColumn('token', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 60,
|
'length' => 60,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('expiration', Type::BIGINT, [
|
$table->addColumn('expiration', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -49,29 +49,29 @@ class Version1005Date20180530124431 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('calendar_' . $type)) {
|
if (!$schema->hasTable('calendar_' . $type)) {
|
||||||
$table = $schema->createTable('calendar_' . $type);
|
$table = $schema->createTable('calendar_' . $type);
|
||||||
|
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('backend_id', Type::STRING, [
|
$table->addColumn('backend_id', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('resource_id', Type::STRING, [
|
$table->addColumn('resource_id', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('email', Type::STRING, [
|
$table->addColumn('email', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('displayname', Type::STRING, [
|
$table->addColumn('displayname', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('group_restrictions', Type::STRING, [
|
$table->addColumn('group_restrictions', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 4000,
|
'length' => 4000,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
*/
|
*/
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -49,38 +49,38 @@ class Version1006Date20180619154313 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('calendar_invitations')) {
|
if (!$schema->hasTable('calendar_invitations')) {
|
||||||
$table = $schema->createTable('calendar_invitations');
|
$table = $schema->createTable('calendar_invitations');
|
||||||
|
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('uid', Type::STRING, [
|
$table->addColumn('uid', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('recurrenceid', Type::STRING, [
|
$table->addColumn('recurrenceid', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('attendee', Type::STRING, [
|
$table->addColumn('attendee', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('organizer', Type::STRING, [
|
$table->addColumn('organizer', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('sequence', Type::BIGINT, [
|
$table->addColumn('sequence', Types::BIGINT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('token', Type::STRING, [
|
$table->addColumn('token', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 60,
|
'length' => 60,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('expiration', Type::BIGINT, [
|
$table->addColumn('expiration', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
|
|
|
@ -28,7 +28,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -47,7 +47,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if ($schema->hasTable('calendarchanges')) {
|
if ($schema->hasTable('calendarchanges')) {
|
||||||
$calendarChangesTable = $schema->getTable('calendarchanges');
|
$calendarChangesTable = $schema->getTable('calendarchanges');
|
||||||
$calendarChangesTable->addColumn('calendartype', Type::INTEGER, [
|
$calendarChangesTable->addColumn('calendartype', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
|
@ -60,7 +60,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if ($schema->hasTable('calendarobjects')) {
|
if ($schema->hasTable('calendarobjects')) {
|
||||||
$calendarObjectsTable = $schema->getTable('calendarobjects');
|
$calendarObjectsTable = $schema->getTable('calendarobjects');
|
||||||
$calendarObjectsTable->addColumn('calendartype', Type::INTEGER, [
|
$calendarObjectsTable->addColumn('calendartype', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
|
@ -73,7 +73,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if ($schema->hasTable('calendarobjects_props')) {
|
if ($schema->hasTable('calendarobjects_props')) {
|
||||||
$calendarObjectsPropsTable = $schema->getTable('calendarobjects_props');
|
$calendarObjectsPropsTable = $schema->getTable('calendarobjects_props');
|
||||||
$calendarObjectsPropsTable->addColumn('calendartype', Type::INTEGER, [
|
$calendarObjectsPropsTable->addColumn('calendartype', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -45,7 +45,7 @@ class Version1008Date20181030113700 extends SimpleMigrationStep {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
$table = $schema->getTable('cards');
|
$table = $schema->getTable('cards');
|
||||||
$table->addColumn('uid', Type::STRING, [
|
$table->addColumn('uid', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 255
|
'length' => 255
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare(strict_types=1);
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\IDBConnection;
|
use OCP\IDBConnection;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
|
@ -58,7 +58,7 @@ class Version1008Date20181105104826 extends SimpleMigrationStep {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
$table = $schema->getTable('calendarsubscriptions');
|
$table = $schema->getTable('calendarsubscriptions');
|
||||||
|
|
||||||
$table->addColumn('source_copy', Type::TEXT, [
|
$table->addColumn('source_copy', Types::TEXT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => null,
|
'length' => null,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare(strict_types=1);
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\IDBConnection;
|
use OCP\IDBConnection;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
|
@ -57,7 +57,7 @@ class Version1008Date20181105110300 extends SimpleMigrationStep {
|
||||||
/** @var ISchemaWrapper $schema */
|
/** @var ISchemaWrapper $schema */
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
$table = $schema->getTable('calendarsubscriptions');
|
$table = $schema->getTable('calendarsubscriptions');
|
||||||
$table->addColumn('source', Type::TEXT, [
|
$table->addColumn('source', Types::TEXT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => null,
|
'length' => null,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare(strict_types=1);
|
||||||
*/
|
*/
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -53,22 +53,22 @@ class Version1011Date20190725113607 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable($this->getMetadataTableName($type))) {
|
if (!$schema->hasTable($this->getMetadataTableName($type))) {
|
||||||
$table = $schema->createTable($this->getMetadataTableName($type));
|
$table = $schema->createTable($this->getMetadataTableName($type));
|
||||||
|
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn($type . '_id', Type::BIGINT, [
|
$table->addColumn($type . '_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('key', Type::STRING, [
|
$table->addColumn('key', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('value', Type::STRING, [
|
$table->addColumn('value', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 4000,
|
'length' => 4000,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -28,7 +28,7 @@ declare(strict_types=1);
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -48,21 +48,21 @@ class Version1011Date20190806104428 extends SimpleMigrationStep {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
$table = $schema->createTable('dav_cal_proxy');
|
$table = $schema->createTable('dav_cal_proxy');
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('owner_id', Type::STRING, [
|
$table->addColumn('owner_id', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('proxy_id', Type::STRING, [
|
$table->addColumn('proxy_id', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('permissions', Type::INTEGER, [
|
$table->addColumn('permissions', Types::INTEGER, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
|
|
|
@ -28,7 +28,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCA\DAV\Migration;
|
namespace OCA\DAV\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -54,59 +54,59 @@ class Version1012Date20190808122342 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('calendar_reminders')) {
|
if (!$schema->hasTable('calendar_reminders')) {
|
||||||
$table = $schema->createTable('calendar_reminders');
|
$table = $schema->createTable('calendar_reminders');
|
||||||
|
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('calendar_id', Type::BIGINT, [
|
$table->addColumn('calendar_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('object_id', Type::BIGINT, [
|
$table->addColumn('object_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('is_recurring', Type::SMALLINT, [
|
$table->addColumn('is_recurring', Types::SMALLINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 1,
|
'length' => 1,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('uid', Type::STRING, [
|
$table->addColumn('uid', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('recurrence_id', Type::BIGINT, [
|
$table->addColumn('recurrence_id', Types::BIGINT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('is_recurrence_exception', Type::SMALLINT, [
|
$table->addColumn('is_recurrence_exception', Types::SMALLINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 1,
|
'length' => 1,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('event_hash', Type::STRING, [
|
$table->addColumn('event_hash', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('alarm_hash', Type::STRING, [
|
$table->addColumn('alarm_hash', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('type', Type::STRING, [
|
$table->addColumn('type', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('is_relative', Type::SMALLINT, [
|
$table->addColumn('is_relative', Types::SMALLINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 1,
|
'length' => 1,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('notification_date', Type::BIGINT, [
|
$table->addColumn('notification_date', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 11,
|
'length' => 11,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('is_repeat_based', Type::SMALLINT, [
|
$table->addColumn('is_repeat_based', Types::SMALLINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 1,
|
'length' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -42,7 +42,7 @@ use bantu\IniGetWrapper\IniGetWrapper;
|
||||||
use DirectoryIterator;
|
use DirectoryIterator;
|
||||||
use Doctrine\DBAL\DBALException;
|
use Doctrine\DBAL\DBALException;
|
||||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use GuzzleHttp\Exception\ClientException;
|
use GuzzleHttp\Exception\ClientException;
|
||||||
use OC;
|
use OC;
|
||||||
use OC\AppFramework\Http;
|
use OC\AppFramework\Http;
|
||||||
|
@ -634,7 +634,7 @@ Raw output
|
||||||
$column = $table->getColumn($columnName);
|
$column = $table->getColumn($columnName);
|
||||||
$isAutoIncrement = $column->getAutoincrement();
|
$isAutoIncrement = $column->getAutoincrement();
|
||||||
$isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
|
$isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
|
||||||
if ($column->getType()->getName() !== Type::BIGINT && !$isAutoIncrementOnSqlite) {
|
if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) {
|
||||||
$pendingColumns[] = $tableName . '.' . $columnName;
|
$pendingColumns[] = $tableName . '.' . $columnName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
namespace OCA\TwoFactorBackupCodes\Migration;
|
namespace OCA\TwoFactorBackupCodes\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -44,20 +44,20 @@ class Version1002Date20170607104347 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('twofactor_backupcodes')) {
|
if (!$schema->hasTable('twofactor_backupcodes')) {
|
||||||
$table = $schema->createTable('twofactor_backupcodes');
|
$table = $schema->createTable('twofactor_backupcodes');
|
||||||
|
|
||||||
$table->addColumn('id', Type::INTEGER, [
|
$table->addColumn('id', Types::INTEGER, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('user_id', Type::STRING, [
|
$table->addColumn('user_id', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('code', Type::STRING, [
|
$table->addColumn('code', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('used', Type::INTEGER, [
|
$table->addColumn('used', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 1,
|
'length' => 1,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
namespace OCA\TwoFactorBackupCodes\Migration;
|
namespace OCA\TwoFactorBackupCodes\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -47,8 +48,8 @@ class Version1002Date20170919123342 extends SimpleMigrationStep {
|
||||||
$column->setDefault('');
|
$column->setDefault('');
|
||||||
|
|
||||||
$column = $table->getColumn('used');
|
$column = $table->getColumn('used');
|
||||||
if ($column->getType()->getName() !== Type::SMALLINT) {
|
if ($column->getType()->getName() !== Types::SMALLINT) {
|
||||||
$column->setType(Type::getType(Type::SMALLINT));
|
$column->setType(Type::getType(Types::SMALLINT));
|
||||||
$column->setOptions(['length' => 6]);
|
$column->setOptions(['length' => 6]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace OCA\WorkflowEngine\Migration;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Schema\Table;
|
use Doctrine\DBAL\Schema\Table;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -25,25 +25,25 @@ class Version2000Date20190808074233 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if (!$schema->hasTable('flow_checks')) {
|
if (!$schema->hasTable('flow_checks')) {
|
||||||
$table = $schema->createTable('flow_checks');
|
$table = $schema->createTable('flow_checks');
|
||||||
$table->addColumn('id', Type::INTEGER, [
|
$table->addColumn('id', Types::INTEGER, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('class', Type::STRING, [
|
$table->addColumn('class', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 256,
|
'length' => 256,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('operator', Type::STRING, [
|
$table->addColumn('operator', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 16,
|
'length' => 16,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('value', Type::TEXT, [
|
$table->addColumn('value', Types::TEXT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('hash', Type::STRING, [
|
$table->addColumn('hash', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 32,
|
'length' => 32,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
|
@ -54,25 +54,25 @@ class Version2000Date20190808074233 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if (!$schema->hasTable('flow_operations')) {
|
if (!$schema->hasTable('flow_operations')) {
|
||||||
$table = $schema->createTable('flow_operations');
|
$table = $schema->createTable('flow_operations');
|
||||||
$table->addColumn('id', Type::INTEGER, [
|
$table->addColumn('id', Types::INTEGER, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('class', Type::STRING, [
|
$table->addColumn('class', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 256,
|
'length' => 256,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('name', Type::STRING, [
|
$table->addColumn('name', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 256,
|
'length' => 256,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('checks', Type::TEXT, [
|
$table->addColumn('checks', Types::TEXT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('operation', Type::TEXT, [
|
$table->addColumn('operation', Types::TEXT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
]);
|
]);
|
||||||
$this->ensureEntityColumns($table);
|
$this->ensureEntityColumns($table);
|
||||||
|
@ -84,22 +84,22 @@ class Version2000Date20190808074233 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if (!$schema->hasTable('flow_operations_scope')) {
|
if (!$schema->hasTable('flow_operations_scope')) {
|
||||||
$table = $schema->createTable('flow_operations_scope');
|
$table = $schema->createTable('flow_operations_scope');
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('operation_id', Type::INTEGER, [
|
$table->addColumn('operation_id', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('type', Type::INTEGER, [
|
$table->addColumn('type', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('value', Type::STRING, [
|
$table->addColumn('value', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
|
@ -113,14 +113,14 @@ class Version2000Date20190808074233 extends SimpleMigrationStep {
|
||||||
|
|
||||||
protected function ensureEntityColumns(Table $table) {
|
protected function ensureEntityColumns(Table $table) {
|
||||||
if (!$table->hasColumn('entity')) {
|
if (!$table->hasColumn('entity')) {
|
||||||
$table->addColumn('entity', Type::STRING, [
|
$table->addColumn('entity', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 256,
|
'length' => 256,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (!$table->hasColumn('events')) {
|
if (!$table->hasColumn('events')) {
|
||||||
$table->addColumn('events', Type::TEXT, [
|
$table->addColumn('events', Types::TEXT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => '[]',
|
'default' => '[]',
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -29,6 +29,7 @@ namespace OC\Core\Command\Db;
|
||||||
|
|
||||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OC\DB\SchemaWrapper;
|
use OC\DB\SchemaWrapper;
|
||||||
use OCP\IDBConnection;
|
use OCP\IDBConnection;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
@ -88,8 +89,8 @@ class ConvertFilecacheBigInt extends Command {
|
||||||
$column = $table->getColumn($columnName);
|
$column = $table->getColumn($columnName);
|
||||||
$isAutoIncrement = $column->getAutoincrement();
|
$isAutoIncrement = $column->getAutoincrement();
|
||||||
$isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
|
$isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement;
|
||||||
if ($column->getType()->getName() !== Type::BIGINT && !$isAutoIncrementOnSqlite) {
|
if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) {
|
||||||
$column->setType(Type::getType(Type::BIGINT));
|
$column->setType(Type::getType(Types::BIGINT));
|
||||||
$column->setOptions(['length' => 20]);
|
$column->setOptions(['length' => 20]);
|
||||||
|
|
||||||
$updates[] = '* ' . $tableName . '.' . $columnName;
|
$updates[] = '* ' . $tableName . '.' . $columnName;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -44,15 +44,15 @@ class Version13000Date20170705121758 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('personal_sections')) {
|
if (!$schema->hasTable('personal_sections')) {
|
||||||
$table = $schema->createTable('personal_sections');
|
$table = $schema->createTable('personal_sections');
|
||||||
|
|
||||||
$table->addColumn('id', Type::STRING, [
|
$table->addColumn('id', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('class', Type::STRING, [
|
$table->addColumn('class', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('priority', Type::INTEGER, [
|
$table->addColumn('priority', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 6,
|
'length' => 6,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
@ -65,20 +65,20 @@ class Version13000Date20170705121758 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('personal_settings')) {
|
if (!$schema->hasTable('personal_settings')) {
|
||||||
$table = $schema->createTable('personal_settings');
|
$table = $schema->createTable('personal_settings');
|
||||||
|
|
||||||
$table->addColumn('id', Type::INTEGER, [
|
$table->addColumn('id', Types::INTEGER, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('class', Type::STRING, [
|
$table->addColumn('class', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('section', Type::STRING, [
|
$table->addColumn('section', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('priority', Type::INTEGER, [
|
$table->addColumn('priority', Types::INTEGER, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 6,
|
'length' => 6,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -72,7 +72,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('numeric_id', Type::BIGINT, [
|
$table->addColumn('numeric_id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
|
@ -95,11 +95,11 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('storage_id', Type::BIGINT, [
|
$table->addColumn('storage_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('root_id', Type::BIGINT, [
|
$table->addColumn('root_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
]);
|
]);
|
||||||
|
@ -111,7 +111,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4000,
|
'length' => 4000,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('mount_id', Type::BIGINT, [
|
$table->addColumn('mount_id', Types::BIGINT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
]);
|
]);
|
||||||
|
@ -125,7 +125,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if (!$schema->hasTable('mimetypes')) {
|
if (!$schema->hasTable('mimetypes')) {
|
||||||
$table = $schema->createTable('mimetypes');
|
$table = $schema->createTable('mimetypes');
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
|
@ -141,12 +141,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if (!$schema->hasTable('filecache')) {
|
if (!$schema->hasTable('filecache')) {
|
||||||
$table = $schema->createTable('filecache');
|
$table = $schema->createTable('filecache');
|
||||||
$table->addColumn('fileid', Type::BIGINT, [
|
$table->addColumn('fileid', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('storage', Type::BIGINT, [
|
$table->addColumn('storage', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
@ -160,7 +160,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
'length' => 32,
|
'length' => 32,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('parent', Type::BIGINT, [
|
$table->addColumn('parent', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
@ -169,12 +169,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 250,
|
'length' => 250,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('mimetype', Type::BIGINT, [
|
$table->addColumn('mimetype', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('mimepart', Type::BIGINT, [
|
$table->addColumn('mimepart', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
@ -184,12 +184,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
'length' => 8,
|
'length' => 8,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('mtime', Type::BIGINT, [
|
$table->addColumn('mtime', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('storage_mtime', Type::BIGINT, [
|
$table->addColumn('storage_mtime', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -40,7 +40,7 @@ class Version14000Date20180710092004 extends SimpleMigrationStep {
|
||||||
$table = $schema->getTable('share');
|
$table = $schema->getTable('share');
|
||||||
|
|
||||||
if (!$table->hasColumn('password_by_talk')) {
|
if (!$table->hasColumn('password_by_talk')) {
|
||||||
$table->addColumn('password_by_talk', Type::BOOLEAN, [
|
$table->addColumn('password_by_talk', Types::BOOLEAN, [
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ declare(strict_types=1);
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -49,11 +49,11 @@ class Version16000Date20190207141427 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('collres_collections')) {
|
if (!$schema->hasTable('collres_collections')) {
|
||||||
$table = $schema->createTable('collres_collections');
|
$table = $schema->createTable('collres_collections');
|
||||||
|
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('name', Type::STRING, [
|
$table->addColumn('name', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
|
@ -64,14 +64,14 @@ class Version16000Date20190207141427 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('collres_resources')) {
|
if (!$schema->hasTable('collres_resources')) {
|
||||||
$table = $schema->createTable('collres_resources');
|
$table = $schema->createTable('collres_resources');
|
||||||
|
|
||||||
$table->addColumn('collection_id', Type::BIGINT, [
|
$table->addColumn('collection_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('resource_type', Type::STRING, [
|
$table->addColumn('resource_type', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('resource_id', Type::STRING, [
|
$table->addColumn('resource_id', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
|
@ -82,25 +82,25 @@ class Version16000Date20190207141427 extends SimpleMigrationStep {
|
||||||
if (!$schema->hasTable('collres_accesscache')) {
|
if (!$schema->hasTable('collres_accesscache')) {
|
||||||
$table = $schema->createTable('collres_accesscache');
|
$table = $schema->createTable('collres_accesscache');
|
||||||
|
|
||||||
$table->addColumn('user_id', Type::STRING, [
|
$table->addColumn('user_id', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('collection_id', Type::BIGINT, [
|
$table->addColumn('collection_id', Types::BIGINT, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('resource_type', Type::STRING, [
|
$table->addColumn('resource_type', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('resource_id', Type::STRING, [
|
$table->addColumn('resource_id', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
$table->addColumn('access', Type::SMALLINT, [
|
$table->addColumn('access', Types::SMALLINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -29,7 +29,7 @@ declare(strict_types=1);
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -47,52 +47,52 @@ class Version16000Date20190212081545 extends SimpleMigrationStep {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
$table = $schema->createTable('login_flow_v2');
|
$table = $schema->createTable('login_flow_v2');
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('timestamp', Type::BIGINT, [
|
$table->addColumn('timestamp', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('started', Type::SMALLINT, [
|
$table->addColumn('started', Types::SMALLINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 1,
|
'length' => 1,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('poll_token', Type::STRING, [
|
$table->addColumn('poll_token', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('login_token', Type::STRING, [
|
$table->addColumn('login_token', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('public_key', Type::TEXT, [
|
$table->addColumn('public_key', Types::TEXT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 32768,
|
'length' => 32768,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('private_key', Type::TEXT, [
|
$table->addColumn('private_key', Types::TEXT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 32768,
|
'length' => 32768,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('client_name', Type::STRING, [
|
$table->addColumn('client_name', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('login_name', Type::STRING, [
|
$table->addColumn('login_name', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('server', Type::STRING, [
|
$table->addColumn('server', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('app_password', Type::STRING, [
|
$table->addColumn('app_password', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 1024,
|
'length' => 1024,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -28,7 +28,7 @@ declare(strict_types=1);
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -48,7 +48,7 @@ class Version16000Date20190428150708 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if ($schema->hasTable('collres_accesscache')) {
|
if ($schema->hasTable('collres_accesscache')) {
|
||||||
$table = $schema->getTable('collres_accesscache');
|
$table = $schema->getTable('collres_accesscache');
|
||||||
$table->addColumn('access', Type::BOOLEAN, [
|
$table->addColumn('access', Types::BOOLEAN, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => false
|
'default' => false
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -30,7 +30,7 @@ declare(strict_types=1);
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -48,21 +48,21 @@ class Version17000Date20190514105811 extends SimpleMigrationStep {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
if (!$schema->hasTable('filecache_extended')) {
|
if (!$schema->hasTable('filecache_extended')) {
|
||||||
$table = $schema->createTable('filecache_extended');
|
$table = $schema->createTable('filecache_extended');
|
||||||
$table->addColumn('fileid', Type::BIGINT, [
|
$table->addColumn('fileid', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 4,
|
'length' => 4,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('metadata_etag', Type::STRING, [
|
$table->addColumn('metadata_etag', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 40,
|
'length' => 40,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('creation_time', Type::BIGINT, [
|
$table->addColumn('creation_time', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('upload_time', Type::BIGINT, [
|
$table->addColumn('upload_time', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
|
|
|
@ -28,7 +28,7 @@ declare(strict_types=1);
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\IDBConnection;
|
use OCP\IDBConnection;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
|
@ -56,7 +56,7 @@ class Version18000Date20190920085628 extends SimpleMigrationStep {
|
||||||
if ($schema->hasTable('groups')) {
|
if ($schema->hasTable('groups')) {
|
||||||
$table = $schema->getTable('groups');
|
$table = $schema->getTable('groups');
|
||||||
|
|
||||||
$table->addColumn('displayname', Type::STRING, [
|
$table->addColumn('displayname', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 255,
|
'length' => 255,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare(strict_types=1);
|
||||||
namespace OC\Core\Migrations;
|
namespace OC\Core\Migrations;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
use OCP\IDBConnection;
|
use OCP\IDBConnection;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -53,34 +53,34 @@ class Version18000Date20191014105105 extends SimpleMigrationStep {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
$table = $schema->createTable('direct_edit');
|
$table = $schema->createTable('direct_edit');
|
||||||
|
|
||||||
$table->addColumn('id', Type::BIGINT, [
|
$table->addColumn('id', Types::BIGINT, [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('editor_id', Type::STRING, [
|
$table->addColumn('editor_id', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('token', Type::STRING, [
|
$table->addColumn('token', Types::STRING, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('file_id', Type::BIGINT, [
|
$table->addColumn('file_id', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('user_id', Type::STRING, [
|
$table->addColumn('user_id', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('share_id', Type::BIGINT, [
|
$table->addColumn('share_id', Types::BIGINT, [
|
||||||
'notnull' => false
|
'notnull' => false
|
||||||
]);
|
]);
|
||||||
$table->addColumn('timestamp', Type::BIGINT, [
|
$table->addColumn('timestamp', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 20,
|
'length' => 20,
|
||||||
'unsigned' => true,
|
'unsigned' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('accessed', Type::BOOLEAN, [
|
$table->addColumn('accessed', Types::BOOLEAN, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => false
|
'default' => false
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -34,7 +34,7 @@ use Doctrine\DBAL\Schema\Schema;
|
||||||
use Doctrine\DBAL\Schema\SchemaException;
|
use Doctrine\DBAL\Schema\SchemaException;
|
||||||
use Doctrine\DBAL\Schema\Sequence;
|
use Doctrine\DBAL\Schema\Sequence;
|
||||||
use Doctrine\DBAL\Schema\Table;
|
use Doctrine\DBAL\Schema\Table;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OC\App\InfoParser;
|
use OC\App\InfoParser;
|
||||||
use OC\IntegrityCheck\Helpers\AppLocator;
|
use OC\IntegrityCheck\Helpers\AppLocator;
|
||||||
use OC\Migration\SimpleOutput;
|
use OC\Migration\SimpleOutput;
|
||||||
|
@ -165,8 +165,8 @@ class MigrationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = $schema->createTable('migrations');
|
$table = $schema->createTable('migrations');
|
||||||
$table->addColumn('app', Type::STRING, ['length' => 255]);
|
$table->addColumn('app', Types::STRING, ['length' => 255]);
|
||||||
$table->addColumn('version', Type::STRING, ['length' => 255]);
|
$table->addColumn('version', Types::STRING, ['length' => 255]);
|
||||||
$table->setPrimaryKey(['app', 'version']);
|
$table->setPrimaryKey(['app', 'version']);
|
||||||
|
|
||||||
$this->connection->migrateToSchema($schema->getWrappedSchema());
|
$this->connection->migrateToSchema($schema->getWrappedSchema());
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
namespace OCP\Migration;
|
namespace OCP\Migration;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
use OCP\DB\ISchemaWrapper;
|
use OCP\DB\ISchemaWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,8 +57,8 @@ abstract class BigIntMigration extends SimpleMigrationStep {
|
||||||
|
|
||||||
foreach ($columns as $columnName) {
|
foreach ($columns as $columnName) {
|
||||||
$column = $table->getColumn($columnName);
|
$column = $table->getColumn($columnName);
|
||||||
if ($column->getType()->getName() !== Type::BIGINT) {
|
if ($column->getType()->getName() !== Types::BIGINT) {
|
||||||
$column->setType(Type::getType(Type::BIGINT));
|
$column->setType(Type::getType(Types::BIGINT));
|
||||||
$column->setOptions(['length' => 20]);
|
$column->setOptions(['length' => 20]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Test\DB;
|
||||||
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
|
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
|
||||||
use Doctrine\DBAL\Schema\Comparator;
|
use Doctrine\DBAL\Schema\Comparator;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Types;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OCPostgreSqlPlatformTest
|
* Class OCPostgreSqlPlatformTest
|
||||||
|
@ -42,8 +42,8 @@ class OCPostgreSqlPlatformTest extends \Test\TestCase {
|
||||||
$sourceSchema = new Schema();
|
$sourceSchema = new Schema();
|
||||||
$targetSchema = new Schema();
|
$targetSchema = new Schema();
|
||||||
|
|
||||||
$this->createTableAndColumn($sourceSchema, Type::INTEGER);
|
$this->createTableAndColumn($sourceSchema, Types::INTEGER);
|
||||||
$this->createTableAndColumn($targetSchema, Type::BIGINT);
|
$this->createTableAndColumn($targetSchema, Types::BIGINT);
|
||||||
|
|
||||||
$comparator = new Comparator();
|
$comparator = new Comparator();
|
||||||
$diff = $comparator->compare($sourceSchema, $targetSchema);
|
$diff = $comparator->compare($sourceSchema, $targetSchema);
|
||||||
|
|
Loading…
Reference in New Issue