Table 'nc_roles' already exists error [May 20]

:raising_hand_man: Alsu asked

Hello everyone, I am trying to update an image, but I keep getting this error: e[2Je[0fmigration file “project” failed. My RDS is in AWS, and I am using MySQL. Before that final message, I also get migration failed with error: create table nc_roles (id int unsigned not null auto_increment primary key, project_id varchar(255), db_alias varchar(255) default ‘db’, title varchar(255), type varchar(255) default ‘CUSTOM’, description varchar(255), created_at datetime, updated_at datetime) - Table ‘nc_roles’ already exists. I tried several times, dropped tables before updating, still gave me the same error with different tables.

:person_tipping_hand: o1lab replied

from what version are you migrating and what is the your NC_DB variable ?

:raising_hand_man: Alsu replied

I am going from v 0.84.16 to 0.90.11. I am just passing my database name variable.

:raising_hand_man: Alsu replied

on my docker file I put latest, I did not specify numbers, and it went to

PackageVersion: 0.84.15

:person_tipping_hand: o1lab replied

may be you have to remove the image from your machine

:person_tipping_hand: o1lab replied

it should have picked the latest otherwise

:raising_hand_man: Alsu replied

I am building it with jenkins, and I am cleaning before building it. When I specify which version to update to, it gives me correct one

:raising_hand_man: Alsu replied

removing all system tables (nc_*) worked, I was able to pull the latest version

:person_tipping_hand: o1lab replied

(deleted it… since its not advisable to show the NC_DB :slightly_smiling_face: - I understand some credentialas was redacted … but yet)

:person_tipping_hand: o1lab replied

> removing all system tables (nc_*) worked, I was able to pull the latest version

great

:raising_hand_man: Alsu replied

It is still not ideal, because users and projects are gone, but workaround, which requires to insert that data into the new tables manually

:person_tipping_hand: o1lab replied

Did you happen to manually fiddle with NC_DB database (like removing or adding tables or data within) when error happened

:person_tipping_hand: o1lab replied

it should automatically role up to the latest version

:person_tipping_hand: o1lab replied

the err mentioned was the first time I have seen

:raising_hand_man: Alsu replied

to recap, I faced several issues: 1. pulling latest – pulled v 0.84.15, when I was already in 0.84.16. 2. first time trying to update gave me issue with nc_projects table – i deleted it, tried again, gave me error in nc_roles. I deleted all system tables, and pull the latest, it worked, but updated to 0.84.15 version, but specifying which version to update to, creates tables with _v2 and no more issues.

:raising_hand_man: Alsu replied

thank you for looking into my issues with me!

Autogenerated from discord


Join NocoDB’s community

DiscordTwitterRedditDocs