mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Merge pull request #513 from acelaya-forks/feature/fix-long-urls
Feature/fix long urls
This commit is contained in:
commit
232bf5a68b
@ -28,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
|||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
|
|
||||||
* *Nothing*
|
* [#507](https://github.com/shlinkio/shlink/issues/507) Fixed error with too long original URLs by increasing size to the maximum value (2048) based on [the standard](https://stackoverflow.com/a/417184).
|
||||||
|
|
||||||
|
|
||||||
## 1.19.0 - 2019-10-05
|
## 1.19.0 - 2019-10-05
|
||||||
|
@ -60,8 +60,8 @@
|
|||||||
"devster/ubench": "^2.0",
|
"devster/ubench": "^2.0",
|
||||||
"eaglewu/swoole-ide-helper": "dev-master",
|
"eaglewu/swoole-ide-helper": "dev-master",
|
||||||
"filp/whoops": "^2.4",
|
"filp/whoops": "^2.4",
|
||||||
"infection/infection": "^0.13.4",
|
"infection/infection": "^0.14.2",
|
||||||
"phpstan/phpstan": "^0.11.2",
|
"phpstan/phpstan": "^0.11.16",
|
||||||
"phpunit/phpcov": "^6.0",
|
"phpunit/phpcov": "^6.0",
|
||||||
"phpunit/phpunit": "^8.3",
|
"phpunit/phpunit": "^8.3",
|
||||||
"roave/security-advisories": "dev-master",
|
"roave/security-advisories": "dev-master",
|
||||||
@ -151,7 +151,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts-descriptions": {
|
"scripts-descriptions": {
|
||||||
"check": "<fg=blue;options=bold>Alias for \"cs\", \"stan\", \"test\" and \"infect\"</>",
|
|
||||||
"ci": "<fg=blue;options=bold>Alias for \"cs\", \"stan\", \"test:ci\" and \"infect:ci\"</>",
|
"ci": "<fg=blue;options=bold>Alias for \"cs\", \"stan\", \"test:ci\" and \"infect:ci\"</>",
|
||||||
"cs": "<fg=blue;options=bold>Checks coding styles</>",
|
"cs": "<fg=blue;options=bold>Checks coding styles</>",
|
||||||
"cs:fix": "<fg=blue;options=bold>Fixes coding styles, when possible</>",
|
"cs:fix": "<fg=blue;options=bold>Fixes coding styles, when possible</>",
|
||||||
|
37
data/migrations/Version20191020074522.php
Normal file
37
data/migrations/Version20191020074522.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace ShlinkMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Column;
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\DBAL\Schema\SchemaException;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20191020074522 extends AbstractMigration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws SchemaException
|
||||||
|
*/
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->getOriginalUrlColumn($schema)->setLength(2048);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SchemaException
|
||||||
|
*/
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->getOriginalUrlColumn($schema)->setLength(1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SchemaException
|
||||||
|
*/
|
||||||
|
private function getOriginalUrlColumn(Schema $schema): Column
|
||||||
|
{
|
||||||
|
return $schema->getTable('short_urls')->getColumn('original_url');
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace <namespace>;
|
namespace <namespace>;
|
||||||
|
@ -78,6 +78,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
MYSQL_DATABASE: shlink
|
MYSQL_DATABASE: shlink
|
||||||
|
MYSQL_INITDB_SKIP_TZINFO: 1
|
||||||
|
|
||||||
shlink_redis:
|
shlink_redis:
|
||||||
container_name: shlink_redis
|
container_name: shlink_redis
|
||||||
|
@ -24,7 +24,7 @@ $builder->createField('id', Type::BIGINT)
|
|||||||
|
|
||||||
$builder->createField('longUrl', Type::STRING)
|
$builder->createField('longUrl', Type::STRING)
|
||||||
->columnName('original_url')
|
->columnName('original_url')
|
||||||
->length(1024)
|
->length(2048)
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
$builder->createField('shortCode', Type::STRING)
|
$builder->createField('shortCode', Type::STRING)
|
||||||
|
Loading…
Reference in New Issue
Block a user