From: Jeremy Benoist Date: Mon, 19 Dec 2016 13:24:19 +0000 (+0100) Subject: Be consistent between migration & schema definition X-Git-Tag: 2.2.0~3^2~19^2~1 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=3ef75cc4e327146513ff077d69de65c8f93b775c Be consistent between migration & schema definition --- diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index 5032a8f0..55bd87a2 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -35,6 +35,7 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI $configTable->addColumn('action_mark_as_read', 'integer', [ 'default' => 0, + 'notnull' => false, ]); } diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index 427a4c7f..9ed9f980 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php @@ -22,7 +22,7 @@ class Client extends BaseClient /** * @var string * - * @ORM\Column(name="name", type="text", nullable=true) + * @ORM\Column(name="name", type="text", nullable=false) */ protected $name; diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 0b75270d..b902ae2c 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -93,7 +93,7 @@ class Config /** * @var int * - * @ORM\Column(name="action_mark_as_read", type="integer", nullable=true) + * @ORM\Column(name="action_mark_as_read", type="integer", nullable=true, options={"default" = 0}) */ private $actionMarkAsRead; diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 3cf9ac1a..3ae5334f 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -183,7 +183,7 @@ class Entry /** * @var string * - * @ORM\Column(name="http_status", type="text", nullable=true) + * @ORM\Column(name="http_status", type="string", length=3, nullable=true) * * @Groups({"entries_for_user", "export_all"}) */