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

Creating columns then renaming or arranging causes SQLITE_ERROR: no such column #252

Closed
drdomark opened this issue Jun 9, 2021 · 6 comments
Labels
🐛 Type: Bug Something is broken or incorrect unexpectedly.

Comments

@drdomark
Copy link

drdomark commented Jun 9, 2021

Hi,

When I create columns for table and rename or rearrange it then I get issue SQLITE_ERROR: no such column for random column names even if they exist. I tried debugging and issue I am getting from net is:
1- Either space in column names - I didn't find any space in column names in request nor given when defining
2- Or Use of quotes is causing issue like explained here https://stackoverflow.com/questions/52673703/error-sqlite-error-no-such-column-undefined

Steps to produce:
1- Create many columns like 8-10
2- Rename or rearrange the columns
3- Try inserting data - Get error while inserting
4- Refresh table view - Error could be seen in network call

@o1lab
Copy link
Member

o1lab commented Jun 9, 2021

Thanks for the detailed report, steps & stackoverflow link.

Could you also please paste the error you see on terminal or browser console.

@drdomark
Copy link
Author

drdomark commented Jun 9, 2021

The browser I am using is Firefox and sqlite database, in case issue exist for these

Query
msg: select xa2__manga_chapters.id as id, xa2__manga_chapters.title as title, xa2__manga_chapters.created_at as created_at, xa2__manga_chapters.updated_at as updated_at, xa2__manga_chapters.Status as Status, xa2__manga_chapters.Content as Content, xa2__manga_chapters.Quotes as Quotes, xa2__manga_chapters.Images as Images, xa2__manga_chapters.Note as Note, xa2__manga_chapters.Category as Category, xa2__manga_chapters.Group as Group, xa2__manga_chapters.Links as Links from xa2__manga_chapters limit 25 - SQLITE_ERROR: no such column: xa2__manga_chapters.Status

select xa2__book_chapter.id as id, xa2__book_chapter.Book as Book, xa2__book_chapter.created_at as created_at, xa2__book_chapter.updated_at as updated_at, xa2__book_chapter.Chapter as Chapter, xa2__book_chapter.Category as Category, xa2__book_chapter.SubCategory as SubCategory, xa2__book_chapter.Group as Group, xa2__book_chapter.For as For, xa2__book_chapter.Tags as Tags, xa2__book_chapter.Rating as Rating, xa2__book_chapter.Score as Score, xa2__book_chapter.Links as Links, xa2__book_chapter.Vol as Vol, xa2__book_chapter.SubGroup as SubGroup, xa2__book_chapter.Section as Section, xa2__book_chapter.Status as Status from xa2__book_chapter limit 25 - SQLITE_ERROR: no such column: xa2__book_chapter.Book

Screenshot 2021-06-09 111511
Screenshot 2021-06-09 111626
Screenshot 2021-06-09 111704

@o1lab
Copy link
Member

o1lab commented Jun 9, 2021

Thank you that helps, we will take a look.

@o1lab o1lab added the 🐛 Type: Bug Something is broken or incorrect unexpectedly. label Jun 9, 2021
pranavxc added a commit that referenced this issue Jun 9, 2021
Enabled column rename and disabled column attribute update if database is SQLite

re #252

Signed-off-by: Pranav C Balan <pranavxc@gmail.com>
@drdomark
Copy link
Author

drdomark commented Jun 11, 2021

Will edit column type be enabled in future versions? or is it locked forever?

Also getting error while deleting column. Earlier it was possible. Issue is occurring in new version.
image

Will sqlite be supported for small to medium level business. Before these updates it allowed to update sqlite database that are used in various android, desktop apps quickly. Had to move back to DBlite for sqlite editing.

@pranavxc
Copy link
Member

@drdomark column edit is not straightforward in SQLite. We have to recreate the table and then need to copy data for updating the column. Anyway, we will try to improve it.

@o1lab
Copy link
Member

o1lab commented Aug 21, 2021

Just tested it out in latest release. This has been fixed.

@o1lab o1lab closed this as completed Aug 21, 2021
akbarpasha pushed a commit to akbarpasha/nocodb that referenced this issue Nov 15, 2021
Enabled column rename and disabled column attribute update if database is SQLite

re nocodb#252

Signed-off-by: Pranav C Balan <pranavxc@gmail.com>
mustafapc19 pushed a commit that referenced this issue Apr 25, 2023
Sync with main repo and replace icons with thin icon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something is broken or incorrect unexpectedly.
Projects
None yet
Development

No branches or pull requests

3 participants