Migration fail. Stuck in 1.4.3

Hi,

I posted Issue #8135 Github regarding migration failures.

I’m currently on 1.4.3. I’ve tried and failed to migrate it to 1.9, 1.6, 1.5.2, and 1.5. The error messages are always something like:

[…itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: no such index: IDX_repository_“idx_repository_IDX_repository_created_unix”
[…itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: no such index: IDX_repository_idx_repository_“IDX_repository_is_private”
[…itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Sync2: no such index: IDX_label_“idx_label_IDX_label_repo_id”

I tried fixing these manually by creating the missing indices in sqlite, but more such errors keep cropping up. Clearly there’s an ORM version mismatch. My version.version in sqlite is currently 58.

I noticed that there was another such issue on Github #8067, but the OP there solved it by migrating it to 1.5.2 first, and then following a chain. I’m unable to migrate anywhere from 1.4.3 (even to 1.5.0).

My guess is that during my failed attempt to migrate from 1.4.3 to 1.9, the database was corrupted/mangled. But wouldn’t DB upgrades be transaction based, and rolled back upon failure?

Is there any way I can upgrade? I’m even open to ways to export my data and re-import it into a fresh installation.

I would appreciate any help that can come my way.

Thanks.

Hi,

Were you able to sort it out? I think if it just for your user it is probably better to start anew.
I am not very good when it comes to database problems, but I know that the API is great.
If you take a look at the repo migrate api you should be able to migrate your projects from your old installation to a new one. If you need any help with the api, I’d be glad to help you out.

Several users reported problems upgrading from versions that old. I don’t know where, but sometime along the way some incompatibility was introduced in one of the libraries.

What you can try (and worked in the cases I knew about) is to upgrade to an intermediate version, and step up from there. For a start, I’d recommend you to start migrating to 1.5.x, then 1.6.x, then 1.9.3.

Hi, I haven’t resolved it yet. I’m still running 1.4.3. Thank you for the link to the API. I’ll try it when I can afford some downtime on the server.

I did try migrating to various 1.5.x releases without success. From the looks of it, the only option would be to export the dozen repos, and import them into a new instance, perhaps via the migrate API @buddyspencer linked to.