Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long database names in apps break the update #10518

Closed
juliushaertl opened this issue Aug 3, 2018 · 17 comments
Closed

Long database names in apps break the update #10518

juliushaertl opened this issue Aug 3, 2018 · 17 comments
Assignees
Milestone

Comments

@juliushaertl
Copy link
Member

juliushaertl commented Aug 3, 2018

Apps that have a to long identifier name break the update.

So far I found:

Ref #10221

Is there anything we could do about that to avoid having the update stopped with those long names? Like can we just enforce the check on oracle and maybe only log a warning on other database types where this is not an issue?

Disabling the app also doesn't work, since the check is executed anyway.

cc @nickvergessen

@nextcloud-bot

This comment has been minimized.

@nickvergessen
Copy link
Member

Like can we just enforce the check on oracle and maybe only log a warning on other database types where this is not an issue?

The thing is that would just obsolete the check all together, because no one of us ever installs oracle or checks the logs.

But yeah I will look into how we can improve the situation, so apps can have a compatibility upgrade going forward.

But also Note, if you make a new migration to fix your database layout, oracle still can't install, because the old table names you are using would need to install because migrations are applied incremental, not all combined into one batch.

@nickvergessen nickvergessen added this to the Nextcloud 14 milestone Aug 3, 2018
@newsyrom
Copy link

newsyrom commented Aug 3, 2018

i am having the same problem with ownbackup also.

@nickvergessen
Copy link
Member

Had a couple of thoughts. But they all failed. The problem is we currently analyse all tables/columns/indexes/... everytime and not just the new ones. Otherwise we could have checked if the app supports oracle or not and only check it in case it does.

So my suggestion would be to only check the length in debug for 14 (or we simply disable the check in stable14 once its branched off) while we try to find a more clever solution for 15, which:

  • respects apps which are not supporting oracle
  • has a way for apps to migrate from a "broken" layout to a new one without big changes

Opinions @rullzer @ChristophWurst

@nickvergessen
Copy link
Member

For a temporary solution you can delete

$this->ensureOracleIdentifierLengthLimit($targetSchema, strlen($this->connection->getPrefix()));

@icewind1991
Copy link
Member

icewind1991 commented Aug 6, 2018

A big problem with this is that it doesn't limit the checks to apps that are currently enabled, meaning that you can't disable the problematic app and continue the upgrade.

@icewind1991
Copy link
Member

Given how it checks against the entire database for each migration and not just the changed tables, I'm not even sure if you can solve this in the app if a core migration is triggered first.

@nickvergessen
Copy link
Member

Work around for beta3: #10553

@icewind1991
Copy link
Member

#10554 changes it to only check tables that are touched by a migration

@rullzer
Copy link
Member

rullzer commented Aug 8, 2018

Fixed for 14 with #10553
Lets fix properly for 15 with #10555

@rullzer rullzer closed this as completed Aug 8, 2018
@ghost
Copy link

ghost commented Aug 8, 2018

Getting this error message

image

@rullzer
Copy link
Member

rullzer commented Aug 8, 2018

@andyxh yes it is not released yet. Beta3 will be fixed. Which is scheduled for tomorrow.

@ghost
Copy link

ghost commented Aug 8, 2018 via email

@shiftgeist
Copy link

shiftgeist commented Nov 22, 2021

It's been a while

The code appeared again in https://github.com/nextcloud/server/blob/master/lib/private/DB/MigrationService.php#L461

Installation goes brrrr

@nickvergessen
Copy link
Member

Remove Oracle from support database list to get rid of it.

@code1x1
Copy link

code1x1 commented Nov 25, 2021

@nickvergessen
Where do I have to remove Oracle from support database list?

@nickvergessen
Copy link
Member

https://docs.nextcloud.com/server/latest/developer_manual/app_development/info.html

Check your info.xml file and add the database dependencies

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

No branches or pull requests

9 participants