]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Changed uuid type in database
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 23 Dec 2016 08:49:22 +0000 (09:49 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 25 Dec 2016 09:51:25 +0000 (10:51 +0100)
.travis.yml
Makefile
app/DoctrineMigrations/Version20160410190541.php
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/Entity/Entry.php
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php

index 7468b1162bf444533a2bac0324ba213a4c07c4e9..8c8093bf4ed88967ab847856a84506a6c0f00107 100644 (file)
@@ -5,14 +5,13 @@ services:
   - redis
 
 # faster builds on docker-container setup
-sudo: required
+sudo: false
 
 # used for HHVM
 addons:
   apt:
     packages:
       - tidy
-  postgresql: 9.5
 
 # cache vendor dirs
 cache:
@@ -60,7 +59,6 @@ before_script:
     - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
     - composer self-update --no-progress
     - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
-    - if [[ $DB = pgsql ]]; then psql -U postgres wallabag_test -c 'create extension "uuid-ossp";'; fi;
 
 install:
     - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.7; fi;
index 83c5f37ad78610d12e49211d3f6c0fc1b8bb752f..b33352616488d2c8a2c3a13d674f73714184eaf1 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -27,8 +27,7 @@ build: ## Run grunt
        @grunt
 
 test: ## Launch wallabag testsuite
-       @if [ ! -d "vendor/phpunit" ]; then composer install; fi
-       @ant prepare && vendor/phpunit/phpunit/phpunit -v
+       @ant prepare && bin/simple-phpunit -v
 
 release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
 ifndef VERSION
index 0cdec00852dd1a715a9898dd7e5c02d56f06b0d4..8761a9bb7f7cb8cac6c1c03b9644a2eddb2db7c9 100644 (file)
@@ -33,8 +33,9 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
 
         $this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.');
 
-        $entryTable->addColumn('uuid', 'guid', [
+        $entryTable->addColumn('uuid', 'string', [
             'notnull' => false,
+            'length' => 23,
         ]);
         $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_public', '1', 'entry')");
     }
index 831486714a25b50b04f12e319711a7c5bd8495e1..b03f49eda339efe7af80441d9a46b0710e99a056 100644 (file)
@@ -355,9 +355,6 @@ class EntryController extends Controller
     {
         $this->checkUserAction($entry);
 
-        $version = $this->getDoctrine()->getManager()->getConnection()->query('SELECT version();')->fetchColumn();
-        var_dump($version);
-
         return $this->render(
             'WallabagCoreBundle:Entry:entry.html.twig',
             ['entry' => $entry]
index 4c22cf9c2663ab337011aa62f9860fc5ff63abb1..4c9d518f8912a6afd7b0144e77b825b713b57241 100644 (file)
@@ -47,7 +47,7 @@ class Entry
     /**
      * @var string
      *
-     * @ORM\Column(name="uuid", type="guid", nullable=true)
+     * @ORM\Column(name="uuid", type="string", length=23, nullable=true)
      *
      * @Groups({"entries_for_user", "export_all"})
      */
index 10cda475c29cc114f0ad934fdac8f3e3b48a32d8..c347cca5ad2ab05ba2acb3783fa432fd2ad13307 100644 (file)
@@ -816,7 +816,6 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         // generating the uuid
         $client->request('GET', '/share/'.$content->getId());
-        var_dump($client->getResponse()->getContent());
         $this->assertEquals(302, $client->getResponse()->getStatusCode());
 
         // follow link with uuid