Changed uuid type in database

This commit is contained in:
Nicolas Lœuillet 2016-12-23 09:49:22 +01:00
parent 8137515171
commit 89cd670abf
6 changed files with 5 additions and 11 deletions

View 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;

View File

@ -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

View 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')");
}

View 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]

View 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"})
*/

View 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