summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-04-09 19:14:28 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-04-09 19:14:28 +0200
commitae11018b37ef9506aa27660315b55a0898491f59 (patch)
treebf622d4b10a99c332a989ad09d07e24c8ca74f65
parentd4b965433085eb43911cd7d896ea3fec0ec45850 (diff)
drop last_modified column
-rw-r--r--appinfo/database.xml8
-rw-r--r--appinfo/info.xml2
-rw-r--r--appinfo/preupdate.php1
-rw-r--r--db/feed.php8
-rw-r--r--tests/integration/fixtures/feedfixture.php1
-rw-r--r--tests/unit/db/FeedTest.php7
-rw-r--r--upgrade/upgrade.php3
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 @@
<default>0</default>
<notnull>true</notnull>
</field>
- <field>
- <name>last_modified</name>
- <type>integer</type>
- <default></default>
- <length>8</length>
- <notnull>false</notnull>
- <unsigned>true</unsigned>
- </field>
<index>
<name>news_feeds_user_id_index</name>
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 @@
<author>Bernhard Posselt, Alessandro Cosentino, Jan-Christoph Borchardt</author>
<category>multimedia</category>
<licence>AGPL</licence>
- <version>8.2.2</version>
+ <version>8.2.4</version>
<namespace>News</namespace>
<!-- resources -->
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);
}
}