Skip to content

Conversation

@georgehrke
Copy link
Member

fixes #7726

@nickvergessen How does Doctrine determine what actual mysql type to use?

Text in here results in a LONGTEXT, the text in this pull-request resulted in TINYTEXT for me 😕

@georgehrke georgehrke added the 2. developing Work in progress label Oct 7, 2018
@nickvergessen
Copy link
Member

https://github.com/nextcloud/3rdparty/blob/eaf914b713e27625ec37a8fcc9e46227b8b0500b/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L249-L268

So if the limit is 255 tinytext,
up to 65535 text,
16777215 mediumtext,
else long

@georgehrke georgehrke force-pushed the bugfix/7726/convert_caldav_subscription_source_to_long_text branch from 03c0a36 to 44d14a8 Compare October 14, 2018 16:43
@georgehrke
Copy link
Member Author

@nickvergessen Thx! Setting length to null did the trick.

@georgehrke georgehrke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 14, 2018
@georgehrke georgehrke added this to the Nextcloud 15 milestone Oct 14, 2018
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove auto-generation notice

👍 otherwise

use OCP\Migration\IOutput;

/**
* Auto-generated migration step: Please modify to your needs!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
@georgehrke georgehrke force-pushed the bugfix/7726/convert_caldav_subscription_source_to_long_text branch from 44d14a8 to b83918e Compare October 15, 2018 11:16
@georgehrke
Copy link
Member Author

Please remove auto-generation notice

Done

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@georgehrke georgehrke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 17, 2018
@MorrisJobke MorrisJobke merged commit 851f525 into master Oct 19, 2018
@MorrisJobke MorrisJobke deleted the bugfix/7726/convert_caldav_subscription_source_to_long_text branch October 19, 2018 13:49
@nickvergessen
Copy link
Member

Oracle says nop, see https://stackoverflow.com/questions/13402510/oracle-changing-varchar2-column-to-clob for details:

{
  "reqId": "56EAuClJtPPLv3gQMBT0",
  "level": 3,
  "time": "2018-10-22T09:28:17+02:00",
  "remoteAddr": "",
  "user": "--",
  "app": "index",
  "method": "",
  "url": "--",
  "message": {
    "Exception": "Doctrine\\DBAL\\Exception\\DriverException",
    "Message": "An exception occurred while executing 'ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)':\n\nORA-22858: invalid alteration of datatype",
    "Code": 0,
    "Trace": [
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php",
        "line": 128,
        "function": "convertException",
        "class": "Doctrine\\DBAL\\Driver\\AbstractOracleDriver",
        "type": "->",
        "args": [
          "An exception occurred while executing 'ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)':\n\nORA-22858: invalid alteration of datatype",
          {
            "xdebug_message": "\nDoctrine\\DBAL\\Driver\\OCI8\\OCI8Exception: ORA-22858: invalid alteration of datatype in \/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Exception.php on line 33\n\nCall Stack:\n    0.0002     386064   1. {main}() \/home\/travis\/build\/nextcloud\/server\/index.php:0\n    0.0465    6985384   2. OC::handleRequest() \/home\/travis\/build\/nextcloud\/server\/index.php:42\n    0.0470    7068400   3. OC\\Core\\Controller\\SetupController->run() \/home\/travis\/build\/nextcloud\/server\/lib\/base.php:925\n    0.0474    7071488   4. OC\\Setup->install() \/home\/travis\/build\/nextcloud\/server\/core\/Controller\/SetupController.php:67\n   60.0539   10965304   5. OC\\Installer::installShippedApps() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/Setup.php:386\n   76.9131   11809872   6. OC\\Installer::installShippedApp() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php:524\n   76.9144   11874672   7. OC\\DB\\MigrationService->migrate() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php:561\n  141.8350   12312144   8. OC\\DB\\MigrationService->executeStep() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php:392\n  157.0663   12674600   9. OC\\DB\\OracleConnection->migrateToSchema() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php:462\n  157.0664   12674784  10. OC\\DB\\OracleMigrator->migrate() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Connection.php:446\n  157.0664   12674784  11. OC\\DB\\OracleMigrator->applySchema() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php:83\n  172.2809   13035944  12. OC\\DB\\OracleConnection->query() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php:260\n  172.2809   13036320  13. Doctrine\\DBAL\\Driver\\OCI8\\OCI8Connection->query() \/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php:954\n  172.2810   13037200  14. Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement->execute() \/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Connection.php:116\n",
            "__class__": "Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception"
          }
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php",
        "line": 964,
        "function": "driverExceptionDuringQuery",
        "class": "Doctrine\\DBAL\\DBALException",
        "type": "::",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Driver\\OCI8\\Driver"
          },
          {
            "xdebug_message": "\nDoctrine\\DBAL\\Driver\\OCI8\\OCI8Exception: ORA-22858: invalid alteration of datatype in \/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Exception.php on line 33\n\nCall Stack:\n    0.0002     386064   1. {main}() \/home\/travis\/build\/nextcloud\/server\/index.php:0\n    0.0465    6985384   2. OC::handleRequest() \/home\/travis\/build\/nextcloud\/server\/index.php:42\n    0.0470    7068400   3. OC\\Core\\Controller\\SetupController->run() \/home\/travis\/build\/nextcloud\/server\/lib\/base.php:925\n    0.0474    7071488   4. OC\\Setup->install() \/home\/travis\/build\/nextcloud\/server\/core\/Controller\/SetupController.php:67\n   60.0539   10965304   5. OC\\Installer::installShippedApps() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/Setup.php:386\n   76.9131   11809872   6. OC\\Installer::installShippedApp() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php:524\n   76.9144   11874672   7. OC\\DB\\MigrationService->migrate() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php:561\n  141.8350   12312144   8. OC\\DB\\MigrationService->executeStep() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php:392\n  157.0663   12674600   9. OC\\DB\\OracleConnection->migrateToSchema() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php:462\n  157.0664   12674784  10. OC\\DB\\OracleMigrator->migrate() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Connection.php:446\n  157.0664   12674784  11. OC\\DB\\OracleMigrator->applySchema() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php:83\n  172.2809   13035944  12. OC\\DB\\OracleConnection->query() \/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php:260\n  172.2809   13036320  13. Doctrine\\DBAL\\Driver\\OCI8\\OCI8Connection->query() \/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php:954\n  172.2810   13037200  14. Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement->execute() \/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Connection.php:116\n",
            "__class__": "Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception"
          },
          "ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)"
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php",
        "line": 260,
        "function": "query",
        "class": "Doctrine\\DBAL\\Connection",
        "type": "->",
        "args": [
          "ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)"
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php",
        "line": 83,
        "function": "applySchema",
        "class": "OC\\DB\\Migrator",
        "type": "->",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Schema\\Schema"
          }
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Connection.php",
        "line": 446,
        "function": "migrate",
        "class": "OC\\DB\\Migrator",
        "type": "->",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Schema\\Schema"
          }
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php",
        "line": 462,
        "function": "migrateToSchema",
        "class": "OC\\DB\\Connection",
        "type": "->",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Schema\\Schema"
          }
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php",
        "line": 392,
        "function": "executeStep",
        "class": "OC\\DB\\MigrationService",
        "type": "->",
        "args": [
          "1007Date20181007225117",
          false
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php",
        "line": 561,
        "function": "migrate",
        "class": "OC\\DB\\MigrationService",
        "type": "->",
        "args": [
          
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php",
        "line": 524,
        "function": "installShippedApp",
        "class": "OC\\Installer",
        "type": "::",
        "args": [
          "dav"
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/Setup.php",
        "line": 386,
        "function": "installShippedApps",
        "class": "OC\\Installer",
        "type": "::",
        "args": [
          
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/core\/Controller\/SetupController.php",
        "line": 67,
        "function": "install",
        "class": "OC\\Setup",
        "type": "->",
        "args": [
          {
            "installed": false,
            "dbtype": "oci",
            "dbtableprefix": "oc_",
            "adminlogin": "admin",
            "adminpass": "admin",
            "directory": "\/home\/travis\/build\/nextcloud\/server\/data-autotest",
            "dbuser": "autotest",
            "dbname": "XE",
            "dbhost": "172.17.0.2",
            "dbpass": "owncloud",
            "loglevel": 0,
            "install": "true",
            "dbIsSet": true,
            "directoryIsSet": true
          }
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/base.php",
        "line": 925,
        "function": "run",
        "class": "OC\\Core\\Controller\\SetupController",
        "type": "->",
        "args": [
          {
            "installed": false,
            "dbtype": "oci",
            "dbtableprefix": "oc_",
            "adminlogin": "admin",
            "adminpass": "admin",
            "directory": "\/home\/travis\/build\/nextcloud\/server\/data-autotest",
            "dbuser": "autotest",
            "dbname": "XE",
            "dbhost": "172.17.0.2",
            "dbpass": "owncloud",
            "loglevel": 0,
            "install": "true",
            "dbIsSet": true,
            "directoryIsSet": true
          }
        ]
      },
      {
        "file": "\/home\/travis\/build\/nextcloud\/server\/index.php",
        "line": 42,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": [
          
        ]
      }
    ],
    "File": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractOracleDriver.php",
    "Line": 76,
    "Previous": {
      "Exception": "Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception",
      "Message": "ORA-22858: invalid alteration of datatype",
      "Code": 0,
      "Trace": [
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Statement.php",
          "line": 245,
          "function": "fromErrorInfo",
          "class": "Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception",
          "type": "::",
          "args": [
            {
              "code": 22858,
              "message": "ORA-22858: invalid alteration of datatype",
              "offset": 47,
              "sqltext": "ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)"
            }
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Connection.php",
          "line": 116,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement",
          "type": "->",
          "args": [
            
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php",
          "line": 954,
          "function": "query",
          "class": "Doctrine\\DBAL\\Driver\\OCI8\\OCI8Connection",
          "type": "->",
          "args": [
            "ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)"
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php",
          "line": 260,
          "function": "query",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->",
          "args": [
            "ALTER TABLE \"oc_calendarsubscriptions\" MODIFY (\"source\" CLOB DEFAULT NULL)"
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Migrator.php",
          "line": 83,
          "function": "applySchema",
          "class": "OC\\DB\\Migrator",
          "type": "->",
          "args": [
            {
              "__class__": "Doctrine\\DBAL\\Schema\\Schema"
            }
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/Connection.php",
          "line": 446,
          "function": "migrate",
          "class": "OC\\DB\\Migrator",
          "type": "->",
          "args": [
            {
              "__class__": "Doctrine\\DBAL\\Schema\\Schema"
            }
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php",
          "line": 462,
          "function": "migrateToSchema",
          "class": "OC\\DB\\Connection",
          "type": "->",
          "args": [
            {
              "__class__": "Doctrine\\DBAL\\Schema\\Schema"
            }
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/DB\/MigrationService.php",
          "line": 392,
          "function": "executeStep",
          "class": "OC\\DB\\MigrationService",
          "type": "->",
          "args": [
            "1007Date20181007225117",
            false
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php",
          "line": 561,
          "function": "migrate",
          "class": "OC\\DB\\MigrationService",
          "type": "->",
          "args": [
            
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/Installer.php",
          "line": 524,
          "function": "installShippedApp",
          "class": "OC\\Installer",
          "type": "::",
          "args": [
            "dav"
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/private\/Setup.php",
          "line": 386,
          "function": "installShippedApps",
          "class": "OC\\Installer",
          "type": "::",
          "args": [
            
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/core\/Controller\/SetupController.php",
          "line": 67,
          "function": "install",
          "class": "OC\\Setup",
          "type": "->",
          "args": [
            {
              "installed": false,
              "dbtype": "oci",
              "dbtableprefix": "oc_",
              "adminlogin": "admin",
              "adminpass": "admin",
              "directory": "\/home\/travis\/build\/nextcloud\/server\/data-autotest",
              "dbuser": "autotest",
              "dbname": "XE",
              "dbhost": "172.17.0.2",
              "dbpass": "owncloud",
              "loglevel": 0,
              "install": "true",
              "dbIsSet": true,
              "directoryIsSet": true
            }
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/lib\/base.php",
          "line": 925,
          "function": "run",
          "class": "OC\\Core\\Controller\\SetupController",
          "type": "->",
          "args": [
            {
              "installed": false,
              "dbtype": "oci",
              "dbtableprefix": "oc_",
              "adminlogin": "admin",
              "adminpass": "admin",
              "directory": "\/home\/travis\/build\/nextcloud\/server\/data-autotest",
              "dbuser": "autotest",
              "dbname": "XE",
              "dbhost": "172.17.0.2",
              "dbpass": "owncloud",
              "loglevel": 0,
              "install": "true",
              "dbIsSet": true,
              "directoryIsSet": true
            }
          ]
        },
        {
          "file": "\/home\/travis\/build\/nextcloud\/server\/index.php",
          "line": 42,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": [
            
          ]
        }
      ],
      "File": "\/home\/travis\/build\/nextcloud\/server\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Exception.php",
      "Line": 33
    },
    "CustomMessage": "--"
  },
  "userAgent": "--",
  "version": "15.0.0.1"
}

@nickvergessen
Copy link
Member

Ref owncloud/core#15058 @georgehrke

@bephinix
Copy link

bephinix commented Nov 5, 2018

Is it possible to get this in a NC 14 update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long ical URL truncated in caldav

6 participants