Fix quasseluser table setup on PostgreSQL and sort sql.qrc
authorBen Rosser <rosser.bjr@gmail.com>
Thu, 24 Nov 2016 23:51:11 +0000 (18:51 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 30 Aug 2017 21:55:25 +0000 (23:55 +0200)
It seems that at some point the DEFAULT option for a varchar()
column has become sensitive to whether or not single or double quotation
marks are used. In particular when ""s were used, core setup failed
with the message 'ERROR:  column "Database" does not exist'. Changing
to single quotation marks (''s) resolved the issue.

Also include @digitalcircuit's sorted version of sql.qrc.

Fix the upgrade script too.

src/core/SQL/PostgreSQL/setup_000_quasseluser.sql
src/core/SQL/PostgreSQL/version/22/upgrade_000_alter_quasseluser_add_authenticator.sql

index c668e69..57abcea 100644 (file)
@@ -3,5 +3,5 @@ CREATE TABLE quasseluser (
        username varchar(64) UNIQUE NOT NULL,
        password TEXT NOT NULL,
        hashversion integer NOT NULL DEFAULT 0,
-       authenticator varchar(64) NOT NULL DEFAULT "Database"
+       authenticator varchar(64) NOT NULL DEFAULT 'Database'
 )