You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
as I described some time ago, during updating process from version 12.0.0 to some higher version I had database schema error. Please see the following issue for more details: #6039
As I expected, during update process from NC 12.0.3 to NC13.0.0 I had this same problem too (it must be some server configuration issue which I cannot resolve - I am not a server administrator). But in NC13 the file structure is slightly different - there is no db_structure.xml file for instance. So, in order to apply the same solution (varchar(255)->varchar(191)) I had to search all NC server files :) looking for each problematic variables like:
migrations
personal_settings
personal_sections
trusted_servers
I have found and modified the following files (content of the files is below):
Then I rerun the web updater again, and ... update process was sucessfull passed. :)
Next, I replace the modified files with the originals, and rerun the code integrity check again to remove the annoying message about code integrity error.
I am writing this to help people who have similar problem with database scheme, you may close this issue.
Best regards,
Hubert
MigrationService.php (part)
private function createMigrationTable() {
if ($this->migrationTableCreated) {
return false;
}
$schema = new SchemaWrapper($this->connection);
/**
* We drop the table when it has different columns or the definition does not
* match. E.g. ownCloud uses a length of 177 for app and 14 for version.
*/
try {
$table = $schema->getTable('migrations');
$columns = $table->getColumns();
if (count($columns) === 2) {
try {
$column = $table->getColumn('app');
$schemaMismatch = $column->getLength() !== 191;
if (!$schemaMismatch) {
$column = $table->getColumn('version');
$schemaMismatch = $column->getLength() !== 191;
}
} catch (SchemaException $e) {
// One of the columns is missing
$schemaMismatch = true;
}
if (!$schemaMismatch) {
// Table exists and schema matches: return back!
$this->migrationTableCreated = true;
return false;
}
}
// Drop the table, when it didn't match our expectations.
$this->connection->dropTable('migrations');
// Recreate the schema after the table was dropped.
$schema = new SchemaWrapper($this->connection);
} catch (SchemaException $e) {
// Table not found, no need to panic, we will create it.
}
$table = $schema->createTable('migrations');
$table->addColumn('app', Type::STRING, ['length' => 191]);
$table->addColumn('version', Type::STRING, ['length' => 191]);
$table->setPrimaryKey(['app', 'version']);
$this->connection->migrateToSchema($schema->getWrappedSchema());
$this->migrationTableCreated = true;
return true;
}
<field>
<name>url_hash</name>
<type>text</type>
<default></default>
<notnull>true</notnull>
<length>191</length>
<comments>sha1 hash of the url without the protocol</comments>
</field>
The text was updated successfully, but these errors were encountered:
So, in order to apply the same solution (varchar(255)->varchar(191)) I had to search all NC server files :) looking for each problematic variables like:
We do not support changing the schema manually. You need to keep the schema as it is.
Hello,
as I described some time ago, during updating process from version 12.0.0 to some higher version I had database schema error. Please see the following issue for more details:
#6039
As I expected, during update process from NC 12.0.3 to NC13.0.0 I had this same problem too (it must be some server configuration issue which I cannot resolve - I am not a server administrator). But in NC13 the file structure is slightly different - there is no db_structure.xml file for instance. So, in order to apply the same solution (varchar(255)->varchar(191)) I had to search all NC server files :) looking for each problematic variables like:
I have found and modified the following files (content of the files is below):
Then I rerun the web updater again, and ... update process was sucessfull passed. :)
Next, I replace the modified files with the originals, and rerun the code integrity check again to remove the annoying message about code integrity error.
I am writing this to help people who have similar problem with database scheme, you may close this issue.
Best regards,
Hubert
MigrationService.php (part)
Version13000Date20170705121758.php & Version13000Date20170718121200.php (part)
database.xml (part)
The text was updated successfully, but these errors were encountered: