-
-
Notifications
You must be signed in to change notification settings - Fork 620
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
character limits with sqlite3 #97
Comments
Thanks for trying out Gotify (:. Interesting finding! In MySQL It should be consistent between all databases. |
Explicitly adding |
Yeah, it still should be changed in our models. |
Okay, I think only |
I'd say, to stay consistent, we have to change all fields to text. In Postgres & sqlite all fields are type text too. |
I just got around to kicking the tires with this project. Due to a copy/paste mistake, I discovered that there are virtually no character limits in most (maybe all) fields when using sqlite. For the most part, both the web interface and the mobile app deal with 1600 characters for application name and description along with message title and message. I have a feeling that is not the intended use case, as varchar(255) is used throughout the sqlite database.
Doing some digging, I learned that sqlite3 will allow the of use VARCHAR during creation, but it will only treat it as TEXT without the limit. See the sqlite section of this page. The sqlite documentation on limits state that sqlite3_limit needs to be used at run time to set SQLITE_LIMIT_LENGTH or it needs to be set at compile time. Looks like the run time option is possible with go-sqlite3.
FYI, my testing was done with the gotify/server docker container and sqlite3 3.26.0. Here is as high as my testing got:
The text was updated successfully, but these errors were encountered: