sql: Remove PostgreSQL text limits, fixes hangs Modify all PostgreSQL text column limits to the unlimited TEXT type instead of VARCHAR. Modern PostgreSQL versions (year 2000 onward) do not store text any differently depending on whether or not it's TEXT or VARCHAR. https://www.postgresql.org/message-id/20667.971213689%40sss.pgh.pa.us This avoids having the core fail to save values or hang entirely, and also addresses migration issues from SQLite where text limits aren't applied. See https://bugs.quassel-irc.org/issues/1526 This shouldn't introduce any noticeable performance impact: https://stackoverflow.com/questions/1067061/does-a-varchar-fields-declared-size-have-any-impact-in-postgresql Fix up a spurious length-limited field for SQLite in case length limits are applied in newer SQLite versions. The proper long-term fix is to implement length checks throughout the Quassel core (sanitizing data) and client (to warn of length issues), rather than relying on the database to enforce limits. Sponsored by Postgres Phone Plans. UNLIMITED TEXT, TALK, and DATA for $9.99 a month! Some restrictions apply. This is not serious. [Commit squashed from "jcolson", thanks!] See https://github.com/quassel/quassel/pull/478 Fixes GH-478 Fixes #1526
Add authenticator column to quasseluser table ... as additional cross-check when logging in a user. This will default to storage-based auth.
core: Separate SQL current and upgrade scripts Move the current SQL queries into the 'SQL/[database]' top folder, move all database schema upgrade scripts into the 'SQL/[database]/version/##' subfolders. This preserves repository history for the general SQL queries when adding a new schema version, and simplifies rebasing a branch if the master schema version changes in the meantime (e.g. managing multiple pull requests). Thanks to justJanne and others for the suggestion! Update 'sql.qrc' with the moved SQL files. Modify AbstractSqlStorage 'setupQueries()' and 'upgradeQueries()' to use these new folder locations, and modify 'queryString()' to pick either the current SQL schema folder or the versioned schema folder according to whether a version was specified when calling it. Update 'updateSQLResource.sh' with the new folder locations, including fixing the 'sort' command to sort independent of the current operating system language settings. Update 'upgradeSchema.sh' with the new locations and stop moving the non-upgrade '*.sql' scripts. Now, it just adds a new folder and prints a message on how to use it. Also send error messages to standard error. Add more documentation on schema upgrades. You can never have enough testing...