diff options
| author | 2018-05-29 23:55:31 +0200 | |
|---|---|---|
| committer | 2018-05-29 23:55:31 +0200 | |
| commit | e98e40b7b4d8ebd4f7e03ade2d3fb6be2c22cc52 (patch) | |
| tree | def42fff2be7915a30e8bb1fed45e400f53e9ffe /app/SQL | |
| parent | 66ff16294a2f5dc6a731e4e7a82409d4e3e4dee0 (diff) | |
Fix check default category, and PostgreSQL seq bug (#1907)
checkDefault() was broken as it was not necessarily creating the default
category with the right ID.
PostgreSQL required additional care.
https://github.com/FreshRSS/FreshRSS/issues/1890#issuecomment-392869777
https://github.com/FreshRSS/FreshRSS/pull/1322
https://github.com/FreshRSS/FreshRSS/issues/1312#issuecomment-254009397
Diffstat (limited to 'app/SQL')
| -rw-r--r-- | app/SQL/install.sql.pgsql.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/SQL/install.sql.pgsql.php b/app/SQL/install.sql.pgsql.php index 99f5a05d3..b80fbf1e7 100644 --- a/app/SQL/install.sql.pgsql.php +++ b/app/SQL/install.sql.pgsql.php @@ -52,7 +52,7 @@ $SQL_CREATE_TABLES = array( 'CREATE INDEX %1$sis_read_index ON "%1$sentry" ("is_read");', 'CREATE INDEX %1$sentry_lastSeen_index ON "%1$sentry" ("lastSeen");', -'INSERT INTO "%1$scategory" (name) SELECT \'%2$s\' WHERE NOT EXISTS (SELECT id FROM "%1$scategory" WHERE id = 1);', +'INSERT INTO "%1$scategory" (id, name) SELECT 1, \'%2$s\' WHERE NOT EXISTS (SELECT id FROM "%1$scategory" WHERE id = 1) RETURNING nextval(\'%1$scategory_id_seq\');', ); global $SQL_CREATE_TABLE_ENTRYTMP; |
