From ae11018b37ef9506aa27660315b55a0898491f59 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 9 Apr 2016 19:14:28 +0200 Subject: drop last_modified column --- appinfo/database.xml | 8 -------- appinfo/info.xml | 2 +- appinfo/preupdate.php | 1 - db/feed.php | 8 ++------ tests/integration/fixtures/feedfixture.php | 1 - tests/unit/db/FeedTest.php | 7 ++----- upgrade/upgrade.php | 3 --- 7 files changed, 5 insertions(+), 25 deletions(-) diff --git a/appinfo/database.xml b/appinfo/database.xml index eb4e122c9..5c17aba15 100644 --- a/appinfo/database.xml +++ b/appinfo/database.xml @@ -217,14 +217,6 @@ 0 true - - last_modified - integer - - 8 - false - true - news_feeds_user_id_index diff --git a/appinfo/info.xml b/appinfo/info.xml index 1c33d413a..4f2ef4305 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -7,7 +7,7 @@ Bernhard Posselt, Alessandro Cosentino, Jan-Christoph Borchardt multimedia AGPL - 8.2.2 + 8.2.4 News diff --git a/appinfo/preupdate.php b/appinfo/preupdate.php index b493b8920..f356ae0ce 100644 --- a/appinfo/preupdate.php +++ b/appinfo/preupdate.php @@ -13,6 +13,5 @@ namespace OCA\News\AppInfo; use OCA\News\Upgrade\Upgrade; -throw new \Exception('heheheo'); $app = new Application(); $app->getContainer()->query(Upgrade::class)->preUpgrade(); diff --git a/db/feed.php b/db/feed.php index b339c2837..1258c2d13 100644 --- a/db/feed.php +++ b/db/feed.php @@ -79,7 +79,6 @@ class Feed extends Entity implements IAPI, \JsonSerializable { protected $preventUpdate; protected $deletedAt; protected $articlesPerUpdate; - protected $lastModified; protected $httpLastModified; protected $httpEtag; protected $location; @@ -105,7 +104,6 @@ class Feed extends Entity implements IAPI, \JsonSerializable { $this->addType('fullTextEnabled', 'boolean'); $this->addType('updateMode', 'integer'); $this->addType('updateErrorCount', 'integer'); - $this->addType('lastModified', 'integer'); } @@ -135,8 +133,7 @@ class Feed extends Entity implements IAPI, \JsonSerializable { 'updateErrorCount', 'lastUpdateError', 'basicAuthUser', - 'basicAuthPassword', - 'lastModified' + 'basicAuthPassword' ]); $url = parse_url($this->link)['host']; @@ -163,8 +160,7 @@ class Feed extends Entity implements IAPI, \JsonSerializable { 'unreadCount', 'ordering', 'link', - 'pinned', - 'lastModified' + 'pinned' ]); } diff --git a/tests/integration/fixtures/feedfixture.php b/tests/integration/fixtures/feedfixture.php index 25c1cbf46..eafcab906 100644 --- a/tests/integration/fixtures/feedfixture.php +++ b/tests/integration/fixtures/feedfixture.php @@ -35,7 +35,6 @@ class FeedFixture extends Feed { 'articlesPerUpdate' => 40, 'httpLastModified' => 10, 'httpEtag' => '', - 'lastModified' => 9, 'location' => 'http://feed.com/rss', 'ordering' => 0, 'fullTextEnabled' => false, diff --git a/tests/unit/db/FeedTest.php b/tests/unit/db/FeedTest.php index fdcdc3c53..63a32328e 100644 --- a/tests/unit/db/FeedTest.php +++ b/tests/unit/db/FeedTest.php @@ -20,7 +20,6 @@ class FeedTest extends \PHPUnit_Framework_TestCase { private function createFeed() { $feed = new Feed(); $feed->setId(3); - $feed->setLastModified(43); $feed->setHttpLastModified(44); $feed->setHttpEtag(45); $feed->setUrl('http://google.com/some/weird/path'); @@ -55,8 +54,7 @@ class FeedTest extends \PHPUnit_Framework_TestCase { 'unreadCount' => 321, 'ordering' => 2, 'pinned' => true, - 'link' => 'https://www.google.com/some/weird/path', - 'lastModified' => 43 + 'link' => 'https://www.google.com/some/weird/path' ], $feed->toAPI()); } @@ -87,8 +85,7 @@ class FeedTest extends \PHPUnit_Framework_TestCase { 'updateErrorCount' => 2, 'lastUpdateError' => 'hi', 'basicAuthUser' => 'user', - 'basicAuthPassword' => 'password', - 'lastModified' => 43 + 'basicAuthPassword' => 'password' ], $feed->jsonSerialize()); } diff --git a/upgrade/upgrade.php b/upgrade/upgrade.php index 79a7de172..c6350aa60 100644 --- a/upgrade/upgrade.php +++ b/upgrade/upgrade.php @@ -57,9 +57,7 @@ class Upgrade { $this->appName, 'installed_version' ); - $dbType = $this->config->getSystemValue('dbtype'); - throw new \Exception($previousVersion . ' ' . $dbType); if (version_compare($previousVersion, '8.2.2', '<') && $dbType !== 'sqlite3' ) { @@ -67,7 +65,6 @@ class Upgrade { `last_modified`'; $query = $this->db->prepare($sql); $query->execute(); - throw new \Exception($sql); } } -- cgit v1.2.3