Back

Error when migrate/update to 1.5.3 from 1.4.13

  • 0
  • Self Hosted
rbiut
14 Mar, 2024, 04:10

I im trying to update to 1.5.3, i made my backup, then run the docker command to install :

TypeScript
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="upgrade" \
    appwrite/appwrite:1.5.3```

It installed sucessfully, then i run the migration command `docker compose exec appwrite migrate` and it failed on this:

```5731 / 5731
Migrating Collection providers:
0 / 0
Migrating Collection messages:
0 / 0
Migrating Collection topics:
0 / 0
Migrating Collection subscribers:
0 / 0
Migrating Collection targets:
0 / 0
Migrating Project: MyProject (6567a46b9f47bb4f6f0e)
Migrating Collections
Failed to update project ("6567a46b9f47bb4f6f0e") version with error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'appwrite._3_' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'appwrite._3_' doesn't exist```

And it exit to bash

 if i navigate my browser to console i got `{"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.3"}`

What to do now? Re-Run migration?
TL;DR
Developers are facing issues with migrating/updating from version 1.4.13 to 1.5.3. They are encountering errors related to missing indexes and attribute sizes. Upon investigating the database tables and logs, they find anomalies in the attribute data. The error message "Size length is required" hinders the update process, leading to troubleshooting attempts and restoring backups without success. Solution: One developer was able to resolve the "Locale not found" error by correcting the `_APP_LOCALE` variable in the .env file. However, the issue with missing sizes in attributes persists. The process of deleting projects and running migration
Steven
16 Mar, 2024, 16:13

Look through the _console_projects table for your project

Steven
16 Mar, 2024, 16:15

The _id column tells you the internal id. Then, look through the _<internal id>_attributes table for all attributes that are arrays

rbiut
16 Mar, 2024, 16:27

I dont know if this help, but, i started this project after i upgrade to 1.4.13, i upgraded to 1.4.13 en november 2023 and i started this project in January

rbiut
16 Mar, 2024, 16:32

ok, i have them, query returned 43 in total: SELECT * FROM _6_attributes WHERE array = 1 ORDER BY array DESC

Steven
16 Mar, 2024, 16:37

Does anything look weird about them?

Steven
16 Mar, 2024, 16:39

Maybe missing a size?

rbiut
16 Mar, 2024, 16:42

There is one that in the error column says "Attribute already exists", actually is the same name that in past weeks (if you remember) give us problem when creating that attribute give us error and i changed it to plural.. there are another attributes (_uid) that has my test names when testing that error but i deleted them but still here, and about the size, nope, all have a size, all have size 100 there is one that have size 1073741824

Steven
16 Mar, 2024, 17:18

Hmm...

Steven
16 Mar, 2024, 17:21

Hmm also looks like there's a problem with how we're deleting indexes...

Steven
16 Mar, 2024, 17:22

Jesus you have lots of attributes πŸ‘€

Steven
16 Mar, 2024, 17:23

Maybe it's the 43rd attribute that has 15 indexes?

rbiut
16 Mar, 2024, 17:31

actually no i do not have lots of attributes, maybe they are not deleted when i delete them from console?

rbiut
16 Mar, 2024, 17:31

let me check

rbiut
16 Mar, 2024, 17:34

does the indexes are on the same _6_attributes table?

Steven
16 Mar, 2024, 17:34

Yep

rbiut
16 Mar, 2024, 17:40

i dont see any column index or indexes, seeing the structure of the table neither, nor editing that record, im exploring it using phpmyadmin

Steven
16 Mar, 2024, 17:40

Oops sorry indexes are in a separate table but still under the _6 namespace

rbiut
16 Mar, 2024, 17:47

ok i found _6_indexes and _6_indexes_prems, the _indexes table only has 15 rows, none of them has a error, 14 of them has a length of [100] the first of them has [100,100,100] and its order is ["ASC","ASC","ASC"] this has 3 attributes too, key is searcn and type is fulltext

Steven
16 Mar, 2024, 17:48

Full text indexes on search attributes aren't allowed anymore.

Steven
16 Mar, 2024, 17:48

Maybe you can restore to 1.4.13, delete them, and then try to upgrade?

rbiut
16 Mar, 2024, 17:49

ok, let me do that and i will return with results

Steven
16 Mar, 2024, 17:51

I'm still a little baffled why it keeps printing 0/15 over and over...

rbiut
16 Mar, 2024, 18:00

ok, i restored it... but there are no indexes on my restored database

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more