diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-05-21 18:09:38 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-08-22 20:18:27 +0200 |
commit | 9c545fe028013b30417c1a932cd6b9027bff752d (patch) | |
tree | 3de7e843c34d058355a3b3a4c090b61bca9c2078 /app/DoctrineMigrations | |
parent | db4d63fc1ae513335b751beb8f89e1eed61871c2 (diff) | |
download | wallabag-9c545fe028013b30417c1a932cd6b9027bff752d.tar.gz wallabag-9c545fe028013b30417c1a932cd6b9027bff752d.tar.zst wallabag-9c545fe028013b30417c1a932cd6b9027bff752d.zip |
Added name on client
- Fix typos in field name
- Added migration for name field in API client table
Manually cherry-picked from PR
https://github.com/wallabag/wallabag/pull/2171
Diffstat (limited to 'app/DoctrineMigrations')
-rw-r--r-- | app/DoctrineMigrations/Version20160812120952.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php new file mode 100644 index 00000000..58f070c7 --- /dev/null +++ b/app/DoctrineMigrations/Version20160812120952.php | |||
@@ -0,0 +1,27 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | |||
8 | class Version20160812120952 extends AbstractMigration | ||
9 | { | ||
10 | /** | ||
11 | * @param Schema $schema | ||
12 | */ | ||
13 | public function up(Schema $schema) | ||
14 | { | ||
15 | $this->addSql('ALTER TABLE wallabag_oauth2_clients ADD name CLOB DEFAULT NULL COLLATE BINARY'); | ||
16 | } | ||
17 | |||
18 | /** | ||
19 | * @param Schema $schema | ||
20 | */ | ||
21 | public function down(Schema $schema) | ||
22 | { | ||
23 | $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); | ||
24 | $this->addSql('ALTER TABLE wallabag_oauth2_clients DROP COLUMN name; | ||
25 | '); | ||
26 | } | ||
27 | } | ||