# Warning regarding need Bigint after 17.01 to 17.02 upgrade

**URL:** <https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531>\
**Category:** ℹ️ Support\
**Tags:** nc17\
**Created:** [December 19, 2019, 2:28pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531 "2019-12-19T14:28:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamhives](https://help.nextcloud.com/letter_avatar/iamhives/32/5_5575768a8748004e209b776fc1b2916d.png) [@iamhives](https://help.nextcloud.com/u/iamhives)\
**Post date:** [December 19, 2019, 2:28pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/1 "2019-12-19T14:28:32Z")

</div>

I just upgraded (successfully!) from 17.0.1 to 17.0.2. Now I get the BigInt warning below. Looks like I have to run “occ db:convert-filecache-bigint” to convert the database. The instructions seem to refer to this being relevant to upgrades from NextcLoud 12 to 13. I began using Nextcloud at V16 so am a little confused why this would be necessary now?

Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running ‘occ db:convert-filecache-bigint’ those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read [the documentation page about this](https://docs.nextcloud.com/server/17/go.php?to=admin-bigint-conversion).

- mounts.storage\_id
- mounts.root\_id
- mounts.mount\_id **strong text**

---

<div class="post-metadata">

**Author:** ![kesselb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kesselb/32/74519_2.png) [@kesselb](https://help.nextcloud.com/u/kesselb)\
**Post date:** [December 19, 2019, 3:15pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/2 "2019-12-19T15:15:48Z")

</div>

Run `occ db:convert-filecache-bigint` 😉

> why this would be necessary now?

> <https://github.com/nextcloud/server/pull/18299>
>
> Fixes error messages like:
> \`\`\`
> 'SQLSTATE\[22003\]: Numeric value out of range: 1…264 Out of range value for column 'root\_id' at row 1"'.
> \`\`\`

> <https://github.com/nextcloud/server/pull/18004>
>
> Signed-off-by: Roeland Jago Douma \<roeland@famdouma.nl\>

---

<div class="post-metadata">

**Author:** ![JanDragon](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jandragon/32/11326_2.png) [@JanDragon](https://help.nextcloud.com/u/JanDragon)\
**Post date:** [December 19, 2019, 3:17pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/3 "2019-12-19T15:17:19Z")

</div>

You have to login in your ssh and perform this command:

sudo -u www-data php occ db:convert-filecache-bigint

Than the message should be cleared. And you have to stop the Nextcloud instance when you perform this command.

JanDragon

---

<div class="post-metadata">

**Author:** ![iamhives](https://help.nextcloud.com/letter_avatar/iamhives/32/5_5575768a8748004e209b776fc1b2916d.png) [@iamhives](https://help.nextcloud.com/u/iamhives)\
**Post date:** [December 19, 2019, 4:06pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/4 "2019-12-19T16:06:46Z")

</div>

Thanks. Yes, as I stated in my OP I know that I need to run that command - which I have successfully run. I guess my question is why, since most of the references to needing to do this are for much older versions (12 to 13) not for a minor version upgrade from 17.0.1 to 17.02. What changed in the latest upgrade or was this something that should have happened previously but for some reason was missed?

---

<div class="post-metadata">

**Author:** ![kesselb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kesselb/32/74519_2.png) [@kesselb](https://help.nextcloud.com/u/kesselb)\
**Post date:** [December 19, 2019, 4:42pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/5 "2019-12-19T16:42:57Z")

</div>

From time to time other columns are changed to BigInt.

---

<div class="post-metadata">

**Author:** ![iamhives](https://help.nextcloud.com/letter_avatar/iamhives/32/5_5575768a8748004e209b776fc1b2916d.png) [@iamhives](https://help.nextcloud.com/u/iamhives)\
**Post date:** [December 19, 2019, 5:40pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/6 "2019-12-19T17:40:10Z")

</div>

Ok. Makes sense. Probably would be good to proactively warn people in the upgrade documentation that this will likely be necessary instead of people discovering after the fact. Make it seem like a routine action rather than seem like a potential error…

---

<div class="post-metadata">

**Author:** ![hairydog](https://help.nextcloud.com/letter_avatar/hairydog/32/5_5575768a8748004e209b776fc1b2916d.png) [@hairydog](https://help.nextcloud.com/u/hairydog)\
**Post date:** [December 19, 2019, 6:17pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/7 "2019-12-19T18:17:57Z")

</div>

Better still, why not make it an optional step as part of a standard upgrade?

---

<div class="post-metadata">

**Author:** ![kesselb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kesselb/32/74519_2.png) [@kesselb](https://help.nextcloud.com/u/kesselb)\
**Post date:** [December 19, 2019, 9:47pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/8 "2019-12-19T21:47:27Z")

</div>

That’s explained at the docs. If a table contains a big amount of data changing the column type will take a while. If this timeouts or anything else this could damage the database. Run it from cli if possible. It’s optional for most people. It’s required for big instances.

---

<div class="post-metadata">

**Author:** ![hairydog](https://help.nextcloud.com/letter_avatar/hairydog/32/5_5575768a8748004e209b776fc1b2916d.png) [@hairydog](https://help.nextcloud.com/u/hairydog)\
**Post date:** [December 20, 2019, 3:59pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/9 "2019-12-20T15:59:10Z")

</div>

The installer could check whether there is a table with a lot of data. That’s what computers are good for, isn’t it?

---

<div class="post-metadata">

**Author:** ![kesselb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kesselb/32/74519_2.png) [@kesselb](https://help.nextcloud.com/u/kesselb)\
**Post date:** [December 20, 2019, 4:12pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/10 "2019-12-20T16:12:28Z")

</div>

As open source project nextcloud is accepting pull requests. Feel free to submit your patch with those run expensive migrations on smaller instances automatically changes. Thanks 👍

---

<div class="post-metadata">

**Author:** ![hairydog](https://help.nextcloud.com/letter_avatar/hairydog/32/5_5575768a8748004e209b776fc1b2916d.png) [@hairydog](https://help.nextcloud.com/u/hairydog)\
**Post date:** [December 20, 2019, 8:33pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/11 "2019-12-20T20:33:18Z")

</div>

Sorry, it appears that my babelfish is not well. It can’t make any sense of “those run expensive migrations on smaller instances automatically changes”

---

<div class="post-metadata">

**Author:** ![bitbernd](https://help.nextcloud.com/letter_avatar/bitbernd/32/5_5575768a8748004e209b776fc1b2916d.png) [@bitbernd](https://help.nextcloud.com/u/bitbernd)\
**Post date:** [December 20, 2019, 9:03pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/12 "2019-12-20T21:03:10Z")

</div>

Hi,

I am using the nextcloud docker image.  
I fixed it by running:

docker exec --user www-data nextcloud-container-name php occ db:convert-filecache-bigint

---

<div class="post-metadata">

**Author:** ![kesselb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kesselb/32/74519_2.png) [@kesselb](https://help.nextcloud.com/u/kesselb)\
**Post date:** [December 21, 2019, 1:32pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/13 "2019-12-21T13:32:02Z")

</div>

I rephrased “The installer could check whether there is a table with a lot of data. That’s what computers are good for, isn’t it?” to “run expensive migrations on smaller instances automatically”.

That’s actually what you are suggesting. Check if table X has a certain amount of data, compare it with the server configuration (e.g. script execution time) and decide to run the migration or show a warning. We suggest to shutdown the webserver while running the migration that is probably a technical challenge if you’re using the web based updater.

Nextcloud is open source. Feel free to dig into the code and submit a patch. I’m happy to look into.

---

<div class="post-metadata">

**Author:** ![rlitman](https://help.nextcloud.com/letter_avatar/rlitman/32/5_5575768a8748004e209b776fc1b2916d.png) [@rlitman](https://help.nextcloud.com/u/rlitman)\
**Post date:** [December 25, 2019, 12:55am UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/14 "2019-12-25T00:55:10Z")

</div>

To be fair, while it does error until you run the occ command, it also does continue to work.

What bothers me is that the in my case, the command warned me that it could take hours, and then completed in a fraction of a second. Really?

```
    $ sudo -u www-data php occ db:convert-filecache-bigint
    Following columns will be updated:

    * mounts.storage_id
    * mounts.root_id
    * mounts.mount_id

    This can take up to hours, depending on the number of files in your instance!
    Continue with the conversion (y/n)? [n] y
    $ sudo -u www-data php occ files:scan --all
    Starting scan for user 1 out of ......
    +---------+--------+--------------+
    | Folders | Files | Elapsed time |
    +---------+--------+--------------+
    | 6443 | 142811 | 00:01:12 |
    +---------+--------+--------------+
    $

```

I guess 1.2TB of data is not a lot?

---

<div class="post-metadata">

**Author:** ![kesselb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kesselb/32/74519_2.png) [@kesselb](https://help.nextcloud.com/u/kesselb)\
**Post date:** [December 25, 2019, 8:05pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/15 "2019-12-25T20:05:23Z")

</div>

> I guess 1.2TB of data is not a lot?

No.

> What bothers me is that the in my case, the command warned me that it could take hours, and then completed in a fraction of a second.

It’s hard to predict the execution time. Feel free to make some research about this topic and submit a patch 😉

---

<div class="post-metadata">

**Author:** ![RedVision100](https://help.nextcloud.com/user_avatar/help.nextcloud.com/redvision100/32/20016_2.png) [@RedVision100](https://help.nextcloud.com/u/RedVision100)\
**Post date:** [December 29, 2019, 4:11am UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/16 "2019-12-29T04:11:47Z")

</div>

Hi

I am also having the same issue and running an NCP docker image. Where exactly did you run this command?

Thanks

---

<div class="post-metadata">

**Author:** ![bitbernd](https://help.nextcloud.com/letter_avatar/bitbernd/32/5_5575768a8748004e209b776fc1b2916d.png) [@bitbernd](https://help.nextcloud.com/u/bitbernd)\
**Post date:** [December 29, 2019, 7:24am UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/17 "2019-12-29T07:24:30Z")

</div>

Hi,

I have never looked at ncp, but if it’s just a nc for arm, just run this on your pi’s host OS, as root or any other user that has the permissions to acces the docker socket.

kind regards

P. S. you have to replace nextcloud-container-name with your actual container name xD

---

<div class="post-metadata">

**Author:** ![ffs69](https://help.nextcloud.com/letter_avatar/ffs69/32/5_5575768a8748004e209b776fc1b2916d.png) [@ffs69](https://help.nextcloud.com/u/ffs69)\
**Post date:** [December 29, 2019, 12:39pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/18 "2019-12-29T12:39:35Z")

</div>

Hello,  
If anyone knows how to do this with an sql command in phpmyadmin, I am interested:

> [@"The database is missing some indexes." and "Some columns in the database are missing a conversion to big int." with phpmyadmin and-or CRON job (can't use occ command in shared hosting)](https://help.nextcloud.com/t/the-database-is-missing-some-indexes-and-some-columns-in-the-database-are-missing-a-conversion-to-big-int-with-phpmyadmin-and-or-cron-job-cant-use-occ-command-in-shared-hosting/42976/23):
>
> Hello everybody, First of all I wish you all very happy celebrations! partying_facetadasantaconfetti_ballsnowman_with_snow I turn to you regarding the new alerts in my configuration since the update from 17.0.1 to 17.0.2: “Some columns in the database are missing a conversion to big int. […]” mounts.storage\_id mounts.root\_id mounts.mount\_id I don’t know how to identify the characteristics to make the necessary sql commands myself, if someone can help me? I know it should look s…

Thanks in advance 😘🤗

---

<div class="post-metadata">

**Author:** ![lfischer](https://help.nextcloud.com/letter_avatar/lfischer/32/5_5575768a8748004e209b776fc1b2916d.png) [@lfischer](https://help.nextcloud.com/u/lfischer)\
**Post date:** [December 30, 2019, 7:49pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/19 "2019-12-30T19:49:32Z")

</div>

Hello,  
I run nextcloud in a shared webhosting environment and have no ssh access to the server.  
Is there a way to trigger the conversion from php or SQL?

edit:  
I just found the occweb app, but this seems to be not compatible with 17.0.2. It shows a warning.  
Are there other ways to get the columns converted?

edit2:  
I was brave and used occweb 😉  
Worked like a charm. Warnings are gone.

Best,  
Lars

---

<div class="post-metadata">

**Author:** ![Tucubanito07](https://help.nextcloud.com/user_avatar/help.nextcloud.com/tucubanito07/32/21926_2.png) [@Tucubanito07](https://help.nextcloud.com/u/Tucubanito07)\
**Post date:** [January 6, 2020, 6:54pm UTC](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531/20 "2020-01-06T18:54:24Z")

</div>

Hey Guys,

Where do you run this command? I am using Unraid and i ran it under Unraid and nothing happens. Furthermore, I actually tried to run it on the app console and i get this:  
sudo: unknown user: www-data  
sudo: unable to initialize policy plugin  
Any help would be amazing.

Thank you guys.

[Next page](https://help.nextcloud.com/t/warning-regarding-need-bigint-after-17-01-to-17-02-upgrade/66531.md?page=2)
