]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Replace http status with a string
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 18 Nov 2016 14:55:16 +0000 (15:55 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 18 Nov 2016 14:55:16 +0000 (15:55 +0100)
I don't want to have 0 if we don't fetch status code, I think it's better to have an empty string, mainly for filters

app/DoctrineMigrations/Version20161118134328.php
src/Wallabag/CoreBundle/Entity/Entry.php

index b5413ddceefc3710d4287424d09f9580a9db2037..390e89ce610256d9377252089846bd923f997c7a 100644 (file)
@@ -32,7 +32,7 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI
      */
     public function up(Schema $schema)
     {
-        $this->addSql('ALTER TABLE '.$this->getTable('entry').' ADD http_status INT DEFAULT 0');
+        $this->addSql('ALTER TABLE '.$this->getTable('entry').' ADD http_status VARCHAR(3) DEFAULT NULL');
     }
 
     /**
index 31e594bf349f7f1aff92a9829b430e1d57d47a8f..3cf9ac1a3b061f2928350119bba0be128e66c431 100644 (file)
@@ -181,9 +181,9 @@ class Entry
     private $isPublic;
 
     /**
-     * @var int
+     * @var string
      *
-     * @ORM\Column(name="http_status", type="integer", nullable=true)
+     * @ORM\Column(name="http_status", type="text", nullable=true)
      *
      * @Groups({"entries_for_user", "export_all"})
      */