mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Fixed index on entry.uuid and changed uuid field type
This commit is contained in:
parent
af131cb513
commit
8137515171
4 changed files with 12 additions and 4 deletions
|
@ -5,13 +5,14 @@ services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
# faster builds on docker-container setup
|
# faster builds on docker-container setup
|
||||||
sudo: false
|
sudo: required
|
||||||
|
|
||||||
# used for HHVM
|
# used for HHVM
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- tidy
|
- tidy
|
||||||
|
postgresql: 9.5
|
||||||
|
|
||||||
# cache vendor dirs
|
# cache vendor dirs
|
||||||
cache:
|
cache:
|
||||||
|
@ -59,6 +60,7 @@ before_script:
|
||||||
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
||||||
- composer self-update --no-progress
|
- composer self-update --no-progress
|
||||||
- if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
- 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:
|
install:
|
||||||
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.7; fi;
|
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.7; fi;
|
||||||
|
|
|
@ -355,6 +355,9 @@ class EntryController extends Controller
|
||||||
{
|
{
|
||||||
$this->checkUserAction($entry);
|
$this->checkUserAction($entry);
|
||||||
|
|
||||||
|
$version = $this->getDoctrine()->getManager()->getConnection()->query('SELECT version();')->fetchColumn();
|
||||||
|
var_dump($version);
|
||||||
|
|
||||||
return $this->render(
|
return $this->render(
|
||||||
'WallabagCoreBundle:Entry:entry.html.twig',
|
'WallabagCoreBundle:Entry:entry.html.twig',
|
||||||
['entry' => $entry]
|
['entry' => $entry]
|
||||||
|
|
|
@ -22,8 +22,10 @@ use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||||
* @ORM\Table(
|
* @ORM\Table(
|
||||||
* name="`entry`",
|
* name="`entry`",
|
||||||
* options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"},
|
* options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"},
|
||||||
* indexes={@ORM\Index(name="created_at", columns={"created_at"})},
|
* indexes={
|
||||||
* indexes={@ORM\Index(name="uuid", columns={"uuid"})}
|
* @ORM\Index(name="created_at", columns={"created_at"}),
|
||||||
|
* @ORM\Index(name="uuid", columns={"uuid"})
|
||||||
|
* }
|
||||||
* )
|
* )
|
||||||
* @ORM\HasLifecycleCallbacks()
|
* @ORM\HasLifecycleCallbacks()
|
||||||
* @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())")
|
* @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())")
|
||||||
|
@ -45,7 +47,7 @@ class Entry
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="uuid", type="text", nullable=true)
|
* @ORM\Column(name="uuid", type="guid", nullable=true)
|
||||||
*
|
*
|
||||||
* @Groups({"entries_for_user", "export_all"})
|
* @Groups({"entries_for_user", "export_all"})
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -816,6 +816,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
|
|
||||||
// generating the uuid
|
// generating the uuid
|
||||||
$client->request('GET', '/share/'.$content->getId());
|
$client->request('GET', '/share/'.$content->getId());
|
||||||
|
var_dump($client->getResponse()->getContent());
|
||||||
$this->assertEquals(302, $client->getResponse()->getStatusCode());
|
$this->assertEquals(302, $client->getResponse()->getStatusCode());
|
||||||
|
|
||||||
// follow link with uuid
|
// follow link with uuid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue