Increase url field size for feeds table
This commit is contained in:
parent
b550984d5a
commit
66d9fb9a73
@ -43,8 +43,8 @@ function import_opml($user_id, $content)
|
|||||||
foreach ($subscriptionList->subscriptions as $subscription) {
|
foreach ($subscriptionList->subscriptions as $subscription) {
|
||||||
if (! $db->table('feeds')->eq('user_id', $user_id)->eq('feed_url', $subscription->getFeedUrl())->exists()) {
|
if (! $db->table('feeds')->eq('user_id', $user_id)->eq('feed_url', $subscription->getFeedUrl())->exists()) {
|
||||||
$db->table('feeds')->insert(array(
|
$db->table('feeds')->insert(array(
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
'title' => $subscription->getTitle(),
|
'title' => $subscription->getTitle(),
|
||||||
'site_url' => $subscription->getSiteUrl(),
|
'site_url' => $subscription->getSiteUrl(),
|
||||||
'feed_url' => $subscription->getFeedUrl(),
|
'feed_url' => $subscription->getFeedUrl(),
|
||||||
));
|
));
|
||||||
|
@ -34,8 +34,8 @@ function version_1(PDO $pdo)
|
|||||||
$pdo->exec("CREATE TABLE feeds (
|
$pdo->exec("CREATE TABLE feeds (
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
user_id INT NOT NULL,
|
user_id INT NOT NULL,
|
||||||
feed_url VARCHAR(255) NOT NULL,
|
feed_url TEXT NOT NULL,
|
||||||
site_url VARCHAR(255),
|
site_url TEXT,
|
||||||
title VARCHAR(255) NOT NULL,
|
title VARCHAR(255) NOT NULL,
|
||||||
expiration BIGINT DEFAULT 0,
|
expiration BIGINT DEFAULT 0,
|
||||||
last_checked BIGINT DEFAULT 0,
|
last_checked BIGINT DEFAULT 0,
|
||||||
|
@ -5,7 +5,13 @@ namespace Miniflux\Schema;
|
|||||||
use PDO;
|
use PDO;
|
||||||
use Miniflux\Helper;
|
use Miniflux\Helper;
|
||||||
|
|
||||||
const VERSION = 3;
|
const VERSION = 4;
|
||||||
|
|
||||||
|
function version_4(PDO $pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec('ALTER TABLE feeds ALTER COLUMN feed_url TYPE TEXT');
|
||||||
|
$pdo->exec('ALTER TABLE feeds ALTER COLUMN site_url TYPE TEXT');
|
||||||
|
}
|
||||||
|
|
||||||
function version_3(PDO $pdo)
|
function version_3(PDO $pdo)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user