diff options
| author | 2016-10-15 00:49:56 +0200 | |
|---|---|---|
| committer | 2016-10-15 00:49:56 +0200 | |
| commit | bfb252a0f381c3edfbd09071f7025082ce92c029 (patch) | |
| tree | 43c290e3d480d9f7c184a139c73594bec0b30525 /app/SQL | |
| parent | 1013c7d2e2d8a2331b47859e918f4e6ac45aef63 (diff) | |
| parent | c24d60372ad59932638964e37cb84ba0de8b1661 (diff) | |
Merge pull request #1314 from Alkarex/PostgreSQL-duplicates
PostgreSQL avoid duplicate category 1
Diffstat (limited to 'app/SQL')
| -rw-r--r-- | app/SQL/install.sql.pgsql.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/SQL/install.sql.pgsql.php b/app/SQL/install.sql.pgsql.php index 841003def..91c5b257d 100644 --- a/app/SQL/install.sql.pgsql.php +++ b/app/SQL/install.sql.pgsql.php @@ -51,9 +51,9 @@ $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" (id, name) VALUES(1, \'%2$s\');', -'INSERT INTO "%1$sfeed" (url, category, name, website, description, ttl) VALUES(\'http://freshrss.org/feeds/all.atom.xml\', 1, \'FreshRSS.org\', \'http://freshrss.org/\', \'FreshRSS, a free, self-hostable aggregator…\', 86400);', -'INSERT INTO "%1$sfeed" (url, category, name, website, description, ttl) VALUES(\'https://github.com/FreshRSS/FreshRSS/releases.atom\', 1, \'FreshRSS @ GitHub\', \'https://github.com/FreshRSS/FreshRSS/\', \'FreshRSS releases @ GitHub\', 86400);', +'INSERT INTO "%1$scategory" (id, name) SELECT 1, \'%2$s\' WHERE NOT EXISTS (SELECT id FROM "%1$scategory" WHERE id = 1);', +'INSERT INTO "%1$sfeed" (url, category, name, website, description, ttl) SELECT \'http://freshrss.org/feeds/all.atom.xml\', 1, \'FreshRSS.org\', \'http://freshrss.org/\', \'FreshRSS, a free, self-hostable aggregator…\', 86400 WHERE NOT EXISTS (SELECT id FROM "%1$sfeed" WHERE url = \'http://freshrss.org/feeds/all.atom.xml\');', +'INSERT INTO "%1$sfeed" (url, category, name, website, description, ttl) SELECT \'https://github.com/FreshRSS/FreshRSS/releases.atom\', 1, \'FreshRSS @ GitHub\', \'https://github.com/FreshRSS/FreshRSS/\', \'FreshRSS releases @ GitHub\', 86400 WHERE NOT EXISTS (SELECT id FROM "%1$sfeed" WHERE url = \'https://github.com/FreshRSS/FreshRSS/releases.atom\');', ); define('SQL_DROP_TABLES', 'DROP TABLES "%1$sentry", "%1$sfeed", "%1$scategory"'); |
