forked from wallabag/wallabag
Compare commits
1 Commits
feature/fl
...
fix/CodeQL
| Author | SHA1 | Date | |
|---|---|---|---|
| af54ccea8a |
77
.env
77
.env
@ -1,77 +0,0 @@
|
|||||||
# In all environments, the following files are loaded if they exist,
|
|
||||||
# the latter taking precedence over the former:
|
|
||||||
#
|
|
||||||
# * .env contains default values for the environment variables needed by the app
|
|
||||||
# * .env.local uncommitted file with local overrides
|
|
||||||
# * .env.$APP_ENV committed environment-specific defaults
|
|
||||||
# * .env.$APP_ENV.local uncommitted environment-specific overrides
|
|
||||||
#
|
|
||||||
# Real environment variables win over .env files.
|
|
||||||
#
|
|
||||||
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
|
|
||||||
# https://symfony.com/doc/current/configuration/secrets.html
|
|
||||||
#
|
|
||||||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
|
||||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
|
||||||
|
|
||||||
DOMAIN_NAME=https://your-wallabag-instance.wallabag.org
|
|
||||||
SERVER_NAME="Your wallabag instance"
|
|
||||||
|
|
||||||
# two factor stuff
|
|
||||||
TWOFACTOR_AUTH=true
|
|
||||||
TWOFACTOR_SENDER=no-reply@wallabag.org
|
|
||||||
|
|
||||||
# fosuser stuff
|
|
||||||
FOSUSER_REGISTRATION=true
|
|
||||||
FOSUSER_CONFIRMATION=true
|
|
||||||
|
|
||||||
# how long the access token should live in seconds for the API
|
|
||||||
FOS_OAUTH_SERVER_ACCESS_TOKEN_LIFETIME=3600
|
|
||||||
# how long the refresh token should life in seconds for the API
|
|
||||||
FOS_OAUTH_SERVER_REFRESH_TOKEN_LIFETIME=1209600
|
|
||||||
|
|
||||||
FROM_EMAIL=no-reply@wallabag.org
|
|
||||||
|
|
||||||
RSS_LIMIT=50
|
|
||||||
|
|
||||||
LOCALE=en
|
|
||||||
DATABASE_TABLE_PREFIX=wallabag_
|
|
||||||
|
|
||||||
# redis stuff
|
|
||||||
REDIS_SCHEME=tcp
|
|
||||||
REDIS_HOST=localhost
|
|
||||||
REDIS_PORT=6379
|
|
||||||
REDIS_PATH=null
|
|
||||||
REDIS_PASSWORD=null
|
|
||||||
|
|
||||||
###> doctrine/doctrine-bundle ###
|
|
||||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
|
||||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
|
||||||
#
|
|
||||||
DATABASE_URL="sqlite:///%kernel.project_dir%/data/db/wallabag.sqlite"
|
|
||||||
# DATABASE_URL="mysql://root:@127.0.0.1:3306/wallabag?serverVersion=8&charset=utf8mb4"
|
|
||||||
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8"
|
|
||||||
###< doctrine/doctrine-bundle ###
|
|
||||||
|
|
||||||
###> nelmio/cors-bundle ###
|
|
||||||
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
|
||||||
###< nelmio/cors-bundle ###
|
|
||||||
|
|
||||||
###> php-amqplib/rabbitmq-bundle ###
|
|
||||||
RABBITMQ_URL=amqp://guest:guest@localhost:5672
|
|
||||||
###< php-amqplib/rabbitmq-bundle ###
|
|
||||||
|
|
||||||
###> sentry/sentry-symfony ###
|
|
||||||
SENTRY_DSN=
|
|
||||||
###< sentry/sentry-symfony ###
|
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
|
||||||
APP_ENV=dev
|
|
||||||
APP_SECRET=b6b54475f34a3238dec16508c4903ca0
|
|
||||||
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
|
||||||
#TRUSTED_HOSTS='^(localhost|example\.com)$'
|
|
||||||
###< symfony/framework-bundle ###
|
|
||||||
|
|
||||||
###> symfony/mailer ###
|
|
||||||
MAILER_DSN=smtp://127.0.0.1
|
|
||||||
###< symfony/mailer ###
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
# define your env variables for the test env here
|
|
||||||
KERNEL_CLASS='App\Kernel'
|
|
||||||
APP_SECRET='$ecretf0rt3st'
|
|
||||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
|
||||||
PANTHER_APP_ENV=panther
|
|
||||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
|
||||||
DATABASE_URL="mysql://root:root@127.0.0.1:3306/wallabag_test?serverVersion=8&charset=utf8mb4"
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
# define your env variables for the test env here
|
|
||||||
KERNEL_CLASS='App\Kernel'
|
|
||||||
APP_SECRET='$ecretf0rt3st'
|
|
||||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
|
||||||
PANTHER_APP_ENV=panther
|
|
||||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
|
||||||
DATABASE_URL="mysql://root:root@127.0.0.1:3306/wallabag_test?serverVersion=8&charset=utf8mb4"
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
# define your env variables for the test env here
|
|
||||||
KERNEL_CLASS='App\Kernel'
|
|
||||||
APP_SECRET='$ecretf0rt3st'
|
|
||||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
|
||||||
PANTHER_APP_ENV=panther
|
|
||||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
|
||||||
DATABASE_URL="postgresql://wallabag:wallabagrocks@localhost:5432/wallabag_test?serverVersion=14&charset=utf8"
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
# define your env variables for the test env here
|
|
||||||
KERNEL_CLASS='App\Kernel'
|
|
||||||
APP_SECRET='$ecretf0rt3st'
|
|
||||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
|
||||||
PANTHER_APP_ENV=panther
|
|
||||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
|
||||||
DATABASE_URL="sqlite:///%test_database_path%"
|
|
||||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3,6 +3,5 @@
|
|||||||
/.github export-ignore
|
/.github export-ignore
|
||||||
/.gitignore export-ignore
|
/.gitignore export-ignore
|
||||||
/phpstan.neon export-ignore
|
/phpstan.neon export-ignore
|
||||||
/phpstan-baseline.neon export-ignore
|
|
||||||
/phpunit.xml.dist export-ignore
|
/phpunit.xml.dist export-ignore
|
||||||
/tests export-ignore
|
/tests export-ignore
|
||||||
|
|||||||
14
.github/CONTRIBUTING.md
vendored
14
.github/CONTRIBUTING.md
vendored
@ -45,17 +45,3 @@ Note : If you have large portions of text, use [Github's Gist service](https://g
|
|||||||
|
|
||||||
## You want to fix a bug or to add a feature
|
## You want to fix a bug or to add a feature
|
||||||
Please fork wallabag and work with **the master branch**.
|
Please fork wallabag and work with **the master branch**.
|
||||||
|
|
||||||
## Run Tests and PHP formatter
|
|
||||||
|
|
||||||
All pull requests need to pass the tests and the code needs match the style guide.
|
|
||||||
|
|
||||||
To run the tests locally run:
|
|
||||||
|
|
||||||
- when testing using Docker: `docker-compose run --rm php make test`
|
|
||||||
- otherwise: `make test`
|
|
||||||
|
|
||||||
To run the PHP formatter:
|
|
||||||
|
|
||||||
- when testing using Docker: `docker-compose run --rm php bin/php-cs-fixer fix`
|
|
||||||
- otherwise: `php bin/php-cs-fixer fix`
|
|
||||||
|
|||||||
12
.github/dependabot.yml
vendored
12
.github/dependabot.yml
vendored
@ -22,10 +22,18 @@ updates:
|
|||||||
- j0k3r
|
- j0k3r
|
||||||
- tcitworld
|
- tcitworld
|
||||||
- Kdecherf
|
- Kdecherf
|
||||||
|
labels:
|
||||||
|
- Ready for review
|
||||||
ignore:
|
ignore:
|
||||||
- dependency-name: lcobucci/jwt
|
- dependency-name: doctrine/doctrine-migrations-bundle
|
||||||
versions:
|
versions:
|
||||||
- ">= 4.2.0"
|
- "> 1.3.2"
|
||||||
|
- dependency-name: friendsofsymfony/user-bundle
|
||||||
|
versions:
|
||||||
|
- "> 2.0.2"
|
||||||
|
- dependency-name: nelmio/api-doc-bundle
|
||||||
|
versions:
|
||||||
|
- "> 2.13.4"
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
42
.github/workflows/codeql-analysis.yml
vendored
Normal file
42
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '22 9 * * 2'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'javascript' ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
5
.github/workflows/coding-standards.yml
vendored
5
.github/workflows/coding-standards.yml
vendored
@ -48,7 +48,4 @@ jobs:
|
|||||||
run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr"
|
run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr"
|
||||||
|
|
||||||
- name: "Run TwigCS"
|
- name: "Run TwigCS"
|
||||||
run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle templates/ | cs2pr"
|
run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr"
|
||||||
|
|
||||||
- name: "Run ergebnis/composer-normalize"
|
|
||||||
run: "composer normalize --dry-run --no-check-lock"
|
|
||||||
|
|||||||
72
.github/workflows/continuous-integration.yml
vendored
72
.github/workflows/continuous-integration.yml
vendored
@ -32,7 +32,6 @@ jobs:
|
|||||||
- "7.4"
|
- "7.4"
|
||||||
- "8.0"
|
- "8.0"
|
||||||
- "8.1"
|
- "8.1"
|
||||||
- "8.2"
|
|
||||||
database:
|
database:
|
||||||
- "sqlite"
|
- "sqlite"
|
||||||
- "mysql"
|
- "mysql"
|
||||||
@ -80,74 +79,3 @@ jobs:
|
|||||||
|
|
||||||
- name: "Run PHPUnit"
|
- name: "Run PHPUnit"
|
||||||
run: "php bin/simple-phpunit -v"
|
run: "php bin/simple-phpunit -v"
|
||||||
|
|
||||||
phpunit_no_prefix:
|
|
||||||
name: "PHP ${{ matrix.php }} using ${{ matrix.database }} without prefix"
|
|
||||||
runs-on: "ubuntu-20.04"
|
|
||||||
services:
|
|
||||||
rabbitmq:
|
|
||||||
image: rabbitmq:3-alpine
|
|
||||||
ports:
|
|
||||||
- 5672:5672
|
|
||||||
redis:
|
|
||||||
image: redis:6-alpine
|
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
php:
|
|
||||||
- "8.2"
|
|
||||||
database:
|
|
||||||
- "sqlite"
|
|
||||||
- "mysql"
|
|
||||||
- "pgsql"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout"
|
|
||||||
uses: "actions/checkout@v3"
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: "Install PHP"
|
|
||||||
uses: "shivammathur/setup-php@v2"
|
|
||||||
with:
|
|
||||||
php-version: "${{ matrix.php }}"
|
|
||||||
coverage: none
|
|
||||||
tools: pecl
|
|
||||||
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
|
|
||||||
ini-values: "date.timezone=Europe/Paris"
|
|
||||||
|
|
||||||
- name: "Remove database prefix"
|
|
||||||
run: |
|
|
||||||
pip install --user yq
|
|
||||||
yq -Y --in-place '.parameters.database_table_prefix = ""' app/config/parameters.yml.dist
|
|
||||||
|
|
||||||
- name: "Setup MySQL"
|
|
||||||
if: "${{ matrix.database == 'mysql' }}"
|
|
||||||
run: |
|
|
||||||
sudo systemctl start mysql.service
|
|
||||||
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
|
|
||||||
|
|
||||||
- name: "Setup PostgreSQL"
|
|
||||||
if: "${{ matrix.database == 'pgsql' }}"
|
|
||||||
run: |
|
|
||||||
sudo systemctl start postgresql
|
|
||||||
sudo -u postgres psql -d template1 -c "CREATE USER wallabag WITH PASSWORD 'wallabagrocks' CREATEDB"
|
|
||||||
createdb -h localhost -p 5432 -U wallabag wallabag_test
|
|
||||||
pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag
|
|
||||||
|
|
||||||
- name: "Install dependencies with Composer"
|
|
||||||
uses: "ramsey/composer-install@v2"
|
|
||||||
with:
|
|
||||||
composer-options: "--optimize-autoloader --prefer-dist"
|
|
||||||
|
|
||||||
- name: "Prepare database"
|
|
||||||
run: "make prepare DB=${{ matrix.database }}"
|
|
||||||
|
|
||||||
- name: "Prepare fixtures"
|
|
||||||
run: "make fixtures"
|
|
||||||
|
|
||||||
- name: "Run PHPUnit"
|
|
||||||
run: "php bin/simple-phpunit -v"
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Dependabot metadata
|
- name: Dependabot metadata
|
||||||
id: metadata
|
id: metadata
|
||||||
uses: dependabot/fetch-metadata@v1.6.0
|
uses: dependabot/fetch-metadata@v1.3.4
|
||||||
with:
|
with:
|
||||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
- name: Approve and merge minor updates
|
- name: Approve and merge minor updates
|
||||||
|
|||||||
10
.github/workflows/translations.yml
vendored
10
.github/workflows/translations.yml
vendored
@ -40,5 +40,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
composer-options: "--optimize-autoloader --prefer-dist"
|
composer-options: "--optimize-autoloader --prefer-dist"
|
||||||
|
|
||||||
- name: "Validate translations"
|
- name: "Validate Core translations"
|
||||||
run: "php bin/console lint:yaml translations -v"
|
run: "php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v"
|
||||||
|
|
||||||
|
- name: "Validate CraueConfig translations"
|
||||||
|
run: "php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v"
|
||||||
|
|
||||||
|
- name: "Validate User translations"
|
||||||
|
run: "php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v"
|
||||||
|
|||||||
2
.github/workflows/upload-release-package.yml
vendored
2
.github/workflows/upload-release-package.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
coverage: "none"
|
coverage: "none"
|
||||||
php-version: "${{ matrix.php }}"
|
php-version: "${{ matrix.php }}"
|
||||||
tools: pecl
|
tools: pecl, composer:2.2
|
||||||
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
|
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
|
||||||
ini-values: "date.timezone=Europe/Paris"
|
ini-values: "date.timezone=Europe/Paris"
|
||||||
env:
|
env:
|
||||||
|
|||||||
52
.gitignore
vendored
52
.gitignore
vendored
@ -1,27 +1,34 @@
|
|||||||
# Cache, log & sessions
|
# Cache, logs & sessions
|
||||||
/var/*
|
/var/*
|
||||||
!/var/cache
|
!/var/cache
|
||||||
/var/cache/*
|
/var/cache/*
|
||||||
!var/cache/.gitkeep
|
!var/cache/.gitkeep
|
||||||
!/var/log
|
!/var/logs
|
||||||
/var/log/*
|
/var/logs/*
|
||||||
!var/log/.gitkeep
|
!var/logs/.gitkeep
|
||||||
!/var/sessions
|
!/var/sessions
|
||||||
/var/sessions/*
|
/var/sessions/*
|
||||||
!var/sessions/.gitkeep
|
!var/sessions/.gitkeep
|
||||||
/bin/*
|
/bin/*
|
||||||
!/bin/console
|
!/bin/console
|
||||||
|
.php-cs-fixer.php
|
||||||
|
.php-cs-fixer.cache
|
||||||
|
.phpunit.result.cache
|
||||||
|
phpunit.xml
|
||||||
|
|
||||||
# Parameters
|
# Parameters
|
||||||
/app/config/parameters.yml
|
/app/config/parameters.yml
|
||||||
|
|
||||||
|
# Managed by Composer
|
||||||
|
/vendor/
|
||||||
|
|
||||||
# Assets and user uploads
|
# Assets and user uploads
|
||||||
public/uploads/
|
web/uploads/
|
||||||
/public/bundles/*
|
/web/bundles/*
|
||||||
!/public/bundles/.gitkeep
|
!/web/bundles/.gitkeep
|
||||||
/public/assets/images/*
|
/web/assets/images/*
|
||||||
!public/assets/images/.gitkeep
|
!web/assets/images/.gitkeep
|
||||||
/public/wallassets/*.dev.js
|
/web/wallassets/*.dev.js
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
/app/build
|
/app/build
|
||||||
@ -40,6 +47,9 @@ data/db/wallabag*.sqlite
|
|||||||
# assets stuff
|
# assets stuff
|
||||||
node_modules/
|
node_modules/
|
||||||
bin
|
bin
|
||||||
|
app/Resources/build/
|
||||||
|
!/src/Wallabag/CoreBundle/Resources/public
|
||||||
|
/src/Wallabag/CoreBundle/Resources/public/*
|
||||||
|
|
||||||
# Test-generated files
|
# Test-generated files
|
||||||
admin-export.json
|
admin-export.json
|
||||||
@ -47,24 +57,4 @@ specialexport.json
|
|||||||
/data/site-credentials-secret-key.txt
|
/data/site-credentials-secret-key.txt
|
||||||
|
|
||||||
# Custom CSS file
|
# Custom CSS file
|
||||||
public/custom.css
|
web/custom.css
|
||||||
|
|
||||||
###> friendsofphp/php-cs-fixer ###
|
|
||||||
/.php-cs-fixer.php
|
|
||||||
/.php-cs-fixer.cache
|
|
||||||
###< friendsofphp/php-cs-fixer ###
|
|
||||||
|
|
||||||
###> symfony/phpunit-bridge ###
|
|
||||||
.phpunit.result.cache
|
|
||||||
/phpunit.xml
|
|
||||||
###< symfony/phpunit-bridge ###
|
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
|
||||||
/.env.local
|
|
||||||
/.env.local.php
|
|
||||||
/.env.*.local
|
|
||||||
/config/secrets/prod/prod.decrypt.private.php
|
|
||||||
/public/bundles/
|
|
||||||
/var/
|
|
||||||
/vendor/
|
|
||||||
###< symfony/framework-bundle ###
|
|
||||||
|
|||||||
126
CHANGELOG.md
126
CHANGELOG.md
@ -1,131 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [2.6.2](https://github.com/wallabag/wallabag/tree/2.6.2)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.1...2.6.2)
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
* Fix mass action input on dark theme by @simounet https://github.com/wallabag/wallabag/pull/6673
|
|
||||||
* Fix undefined variable by @nicosomb https://github.com/wallabag/wallabag/pull/6672
|
|
||||||
* Fix table name in migration by @nicosomb https://github.com/wallabag/wallabag/pull/6653
|
|
||||||
|
|
||||||
### Technical stuff
|
|
||||||
* Add a new build to test when no database table prefix are defined by @j0k3r https://github.com/wallabag/wallabag/pull/6731
|
|
||||||
* Keep escaped table name while migrating by @Glandos https://github.com/wallabag/wallabag/pull/6710
|
|
||||||
* Remove twofactor_auth parameter by @nicosomb https://github.com/wallabag/wallabag/pull/6723
|
|
||||||
* ApiDoc: Add response description to UserRestController by @caspermeijn https://github.com/wallabag/wallabag/pull/6684
|
|
||||||
* ApiDoc: Add response description to WallabagRestController by @caspermeijn https://github.com/wallabag/wallabag/pull/6102
|
|
||||||
* Skip migration if the table was already renamed by @gramakri https://github.com/wallabag/wallabag/pull/6678
|
|
||||||
|
|
||||||
### Meta
|
|
||||||
* Document how to run tests and formatter for new contributors by @caspermeijn https://github.com/wallabag/wallabag/pull/6685
|
|
||||||
* Add link to wallabag ecosystem resources by @nicosomb https://github.com/wallabag/wallabag/pull/6700
|
|
||||||
|
|
||||||
## [2.6.1](https://github.com/wallabag/wallabag/tree/2.6.1)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.0...2.6.1)
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
* Do not autoload fixtures by @j0k3r https://github.com/wallabag/wallabag/pull/6648
|
|
||||||
* Add confirmation alert when deleting articles from list view by @nicosomb https://github.com/wallabag/wallabag/pull/6644
|
|
||||||
|
|
||||||
## [2.6.0](https://github.com/wallabag/wallabag/tree/2.6.0)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.4...2.6.0)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
* Add tag deletion from tags list by @nicosomb https://github.com/wallabag/wallabag/pull/5861
|
|
||||||
* Add support of mass action to tag entries by @kdecherf https://github.com/wallabag/wallabag/pull/5838
|
|
||||||
* Mass action interface by @Simounet https://github.com/wallabag/wallabag/pull/6547
|
|
||||||
* Empty space on the top bar used for more add url toggle clickable target by @Simounet https://github.com/wallabag/wallabag/pull/6612
|
|
||||||
* Add new setting to show / hide articles thumbnails by @nicosomb https://github.com/wallabag/wallabag/pull/6609
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
* Add prefix for tag slugs by @kdecherf https://github.com/wallabag/wallabag/pull/6226
|
|
||||||
* Fix open all external links in new tab in Config by @wyntonfranklin https://github.com/wallabag/wallabag/pull/6256
|
|
||||||
* Fix dark theme for pre HTML tags by @Simounet https://github.com/wallabag/wallabag/pull/6495
|
|
||||||
* Fix dark mode top bar contrast by @Simounet https://github.com/wallabag/wallabag/pull/6510
|
|
||||||
* Dark mode contrast improved by @Simounet https://github.com/wallabag/wallabag/pull/6512
|
|
||||||
* Fix dark mode URL add input color by @Simounet https://github.com/wallabag/wallabag/pull/6525
|
|
||||||
* Fix round reading time in export by @mart-e https://github.com/wallabag/wallabag/pull/6545
|
|
||||||
* Fix images downloading with numeric HTML entity by @Simounet https://github.com/wallabag/wallabag/pull/6563
|
|
||||||
* Fix DownloadImages not following redirections by @Simounet https://github.com/wallabag/wallabag/pull/6562
|
|
||||||
* Fix auto dark theme detection flickering by @Simounet https://github.com/wallabag/wallabag/pull/6584
|
|
||||||
* Fix RSS feed_route not set by @Simounet https://github.com/wallabag/wallabag/pull/6606
|
|
||||||
* Add flash message when we try to add too much tags by @nicosomb https://github.com/wallabag/wallabag/pull/6607
|
|
||||||
* Changed default value for domain_name parameter by @nicosomb https://github.com/wallabag/wallabag/pull/6616
|
|
||||||
* Improved tags display by @Simounet https://github.com/wallabag/wallabag/pull/6613
|
|
||||||
* Fix mousetrap enter issue by @Simounet https://github.com/wallabag/wallabag/pull/6624
|
|
||||||
* Fix duplicate tags creation when assigning search results to tag by @nicosomb https://github.com/wallabag/wallabag/pull/6629
|
|
||||||
|
|
||||||
### Meta
|
|
||||||
* Removed Carrot & Scuttle share by @nicosomb https://github.com/wallabag/wallabag/pull/6047
|
|
||||||
* Remove old, not so maintained and buggy baggy theme by @nicosomb https://github.com/wallabag/wallabag/pull/4332
|
|
||||||
* Remove Scrutinizer badge by @j0k3r https://github.com/wallabag/wallabag/pull/6179
|
|
||||||
* Add mention to unofficial linux client by @imhemish https://github.com/wallabag/wallabag/pull/6203
|
|
||||||
|
|
||||||
### Technical stuff
|
|
||||||
* Remove SensioDistributionBundle by @yguedidi https://github.com/wallabag/wallabag/pull/5761
|
|
||||||
* Back to latest composer version by @yguedidi https://github.com/wallabag/wallabag/pull/5810
|
|
||||||
* Clean composer.lock after SensioDistributionBundle removal by @yguedidi https://github.com/wallabag/wallabag/pull/5839
|
|
||||||
* Remove transitive dependencies by @yguedidi https://github.com/wallabag/wallabag/pull/5784
|
|
||||||
* Register missed commands by @yguedidi https://github.com/wallabag/wallabag/pull/5928
|
|
||||||
* Extend right FOSRestBundle controller class by @yguedidi https://github.com/wallabag/wallabag/pull/5929
|
|
||||||
* Remove PHP-CS-Fixer deprecations by @yguedidi https://github.com/wallabag/wallabag/pull/5914
|
|
||||||
* Upgrade FOSUserBundle to 2.1 by @yguedidi https://github.com/wallabag/wallabag/pull/5782
|
|
||||||
* Add TwigCS by @yguedidi https://github.com/wallabag/wallabag/pull/5759
|
|
||||||
* Use FQCN as service name by @yguedidi https://github.com/wallabag/wallabag/pull/5748
|
|
||||||
* Migrate to new template reference notation by @yguedidi https://github.com/wallabag/wallabag/pull/5758
|
|
||||||
* Migrate from old colon notation to FQCN by @yguedidi https://github.com/wallabag/wallabag/pull/5943
|
|
||||||
* Use autowiring by @yguedidi https://github.com/wallabag/wallabag/pull/5946
|
|
||||||
* Use FQCN to fetch services by @yguedidi https://github.com/wallabag/wallabag/pull/5951
|
|
||||||
* Run tests without memory limit by @yguedidi https://github.com/wallabag/wallabag/pull/5953
|
|
||||||
* Import used classes by @yguedidi https://github.com/wallabag/wallabag/pull/5952
|
|
||||||
* Rework command tests by @yguedidi https://github.com/wallabag/wallabag/pull/5954
|
|
||||||
* Switch to Swagger for api documentation by @caspermeijn https://github.com/wallabag/wallabag/pull/6062
|
|
||||||
* Remove some deprecation by @j0k3r https://github.com/wallabag/wallabag/pull/6085
|
|
||||||
* Remove deprecated options from FOSRest by @j0k3r https://github.com/wallabag/wallabag/pull/6095
|
|
||||||
* Remove LiipThemeBundle by @j0k3r https://github.com/wallabag/wallabag/pull/6097
|
|
||||||
* Upgrade PHPStan and move to level 2 with baseline by @j0k3r https://github.com/wallabag/wallabag/pull/6098
|
|
||||||
* Upgrade to Symfony 4.4 by @j0k3r https://github.com/wallabag/wallabag/pull/6099
|
|
||||||
* Update to FOSUserBundle 3.1 by @j0k3r https://github.com/wallabag/wallabag/pull/6136
|
|
||||||
* Update to scheb/2fa-bundle by @j0k3r https://github.com/wallabag/wallabag/pull/6144
|
|
||||||
* Upgrade to Twig 3 by @j0k3r https://github.com/wallabag/wallabag/pull/6151
|
|
||||||
* Move translations files to /translations by @j0k3r https://github.com/wallabag/wallabag/pull/6153
|
|
||||||
* Fix EventDispatcher & events by @j0k3r https://github.com/wallabag/wallabag/pull/6154
|
|
||||||
* Replace SwiftMailer by Symfony Mailer by @j0k3r https://github.com/wallabag/wallabag/pull/6150
|
|
||||||
* Remove ContainerAwareCommand from commands by @j0k3r https://github.com/wallabag/wallabag/pull/6152
|
|
||||||
* Update all Doctrine deps by @j0k3r https://github.com/wallabag/wallabag/pull/6143
|
|
||||||
* Update PagerFanta by @j0k3r https://github.com/wallabag/wallabag/pull/6145
|
|
||||||
* Move to controller as a service by @j0k3r https://github.com/wallabag/wallabag/pull/6159
|
|
||||||
* Add RabbitMQConsumerTotalProxy to lazy RabbitMQ services for messages by @j0k3r https://github.com/wallabag/wallabag/pull/6166
|
|
||||||
* Properly handle json_array type removal by @j0k3r https://github.com/wallabag/wallabag/pull/6171
|
|
||||||
* Fix database_path in Docker env by @j0k3r https://github.com/wallabag/wallabag/pull/6174
|
|
||||||
* Docker: database_table_prefix may be configured from environment by @fcatt https://github.com/wallabag/wallabag/pull/6196
|
|
||||||
* Update annotations to OpenApi 3 by @caspermeijn https://github.com/wallabag/wallabag/pull/6182
|
|
||||||
* Fix public folder for Symfony 4+ by @kdecherf https://github.com/wallabag/wallabag/pull/6217
|
|
||||||
* Fix API allowed_registration by @caspermeijn https://github.com/wallabag/wallabag/pull/6315
|
|
||||||
* Enable PHP 8.2 in CI by @j0k3r https://github.com/wallabag/wallabag/pull/6469
|
|
||||||
* Fix/build stylelint error by @Simounet https://github.com/wallabag/wallabag/pull/6586
|
|
||||||
|
|
||||||
## [2.5.4](https://github.com/wallabag/wallabag/tree/2.5.4)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.3...2.5.4)
|
|
||||||
|
|
||||||
### Security fixes
|
|
||||||
* Fix adding tag to entries from other people by @j0k3r in https://github.com/wallabag/wallabag/pull/6290
|
|
||||||
* Fix XSS on username on share page by @j0k3r in https://github.com/wallabag/wallabag/pull/6288
|
|
||||||
* Fix CSRF on user deletion by @j0k3r in https://github.com/wallabag/wallabag/pull/6289
|
|
||||||
|
|
||||||
### Meta
|
|
||||||
* Fix release script by @j0k3r in https://github.com/wallabag/wallabag/pull/6275
|
|
||||||
|
|
||||||
## [2.5.3](https://github.com/wallabag/wallabag/tree/2.5.3)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.2...2.5.3)
|
|
||||||
|
|
||||||
### Security fixes
|
|
||||||
* Fix GHSA-qwx8-mxxx-mg96 https://github.com/wallabag/wallabag/commit/0f7460dbab9e29f4f7d2944aca20210f828b6abb by @Kdecherf, thanks to @bAuh0lz
|
|
||||||
* Fix GHSA-mrqx-mjc4-vfh3 https://github.com/wallabag/wallabag/commit/5ac6b6bff9e2e3a87fd88c2904ff3c6aac40722e by @Kdecherf, thanks to @bAuh0lz
|
|
||||||
|
|
||||||
### Meta
|
|
||||||
* Update deps before 2.5.3 by @j0k3r in https://github.com/wallabag/wallabag/pull/6241
|
|
||||||
|
|
||||||
## [2.5.2](https://github.com/wallabag/wallabag/tree/2.5.2)
|
## [2.5.2](https://github.com/wallabag/wallabag/tree/2.5.2)
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.1...2.5.2)
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.1...2.5.2)
|
||||||
|
|
||||||
|
|||||||
@ -36,11 +36,11 @@ build: ## Run webpack
|
|||||||
|
|
||||||
prepare: clean ## Prepare database for testsuite
|
prepare: clean ## Prepare database for testsuite
|
||||||
ifdef DB
|
ifdef DB
|
||||||
cp .env.test.$(DB) .env.test
|
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
||||||
endif
|
endif
|
||||||
-php bin/console doctrine:database:drop --force --env=test
|
-php bin/console doctrine:database:drop --force --env=test
|
||||||
php bin/console doctrine:database:create --env=test
|
php bin/console doctrine:database:create --env=test
|
||||||
php bin/console doctrine:migrations:migrate --no-interaction --env=test -vv
|
php bin/console doctrine:migrations:migrate --no-interaction --env=test
|
||||||
|
|
||||||
fixtures: ## Load fixtures into database
|
fixtures: ## Load fixtures into database
|
||||||
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
# wallabag
|
# wallabag
|
||||||
|
|
||||||

|

|
||||||
|
[](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=master)
|
||||||
[](https://gitter.im/wallabag/wallabag)
|
[](https://gitter.im/wallabag/wallabag)
|
||||||
[](https://liberapay.com/wallabag/donate)
|
[](https://liberapay.com/wallabag/donate)
|
||||||
[](https://hosted.weblate.org/engage/wallabag/?utm_source=widget)
|
[](https://hosted.weblate.org/engage/wallabag/?utm_source=widget)
|
||||||
@ -17,8 +18,6 @@ You can install it on your own server, or you can create an account on [wallabag
|
|||||||
* Android app: [wallabag/android-app](https://github.com/wallabag/android-app)
|
* Android app: [wallabag/android-app](https://github.com/wallabag/android-app)
|
||||||
* iOS app: [wallabag/ios-app](https://github.com/wallabag/ios-app)
|
* iOS app: [wallabag/ios-app](https://github.com/wallabag/ios-app)
|
||||||
* Browser extension: [wallabag/wallabagger](https://github.com/wallabag/wallabagger)
|
* Browser extension: [wallabag/wallabagger](https://github.com/wallabag/wallabagger)
|
||||||
* GNOME (Linux) app: [read-it-later](https://gitlab.gnome.org/World/read-it-later) (not maintained by this project)
|
|
||||||
* All resources about wallabag ecosystem are listed here: https://github.com/wallabag/wallabag/wiki/wallabag-ecosystem
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
|
|||||||
#### Prepare the release
|
#### Prepare the release
|
||||||
|
|
||||||
- Update these files with new information
|
- Update these files with new information
|
||||||
- `config/wallabag.yaml` (`wallabag.version`)
|
- `app/config/wallabag.yml` (`wallabag_core.version`)
|
||||||
- `CHANGELOG.md`
|
- `CHANGELOG.md`
|
||||||
- Create a PR named "Prepare $LAST_WALLABAG_RELEASE release".
|
- Create a PR named "Prepare $LAST_WALLABAG_RELEASE release".
|
||||||
- Wait for test to be ok, merge it.
|
- Wait for test to be ok, merge it.
|
||||||
@ -17,9 +17,10 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
|
|||||||
#### Create a new release on GitHub
|
#### Create a new release on GitHub
|
||||||
|
|
||||||
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `master` branch or any appropriate branch (for instance backports).
|
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `master` branch or any appropriate branch (for instance backports).
|
||||||
- Update [website](https://github.com/wallabag/website) to change MD5 sum and create the release blog post (based on the changelog).
|
- Update nginx config to change the redirect rule for `https://wllbg.org/latest-v2-package` & `http://wllbg.org/latest-v2` (they both redirect to the asset of the GitHub release)
|
||||||
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
|
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
|
||||||
- Put the next patch version suffixed with `-dev` in `config/wallabag.yaml` (`wallabag.version`)
|
- Update wallabag.org website (downloads, MD5 sum, releases and new blog post)
|
||||||
|
- Put the next patch version suffixed with `-dev` in `app/config/wallabag.yml` (`wallabag_core.version`)
|
||||||
- Drink a :beer:!
|
- Drink a :beer:!
|
||||||
|
|
||||||
### Target PHP version
|
### Target PHP version
|
||||||
|
|||||||
7
app/.htaccess
Normal file
7
app/.htaccess
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
Require all denied
|
||||||
|
</IfModule>
|
||||||
|
<IfModule !mod_authz_core.c>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
</IfModule>
|
||||||
7
app/AppCache.php
Normal file
7
app/AppCache.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
|
||||||
|
|
||||||
|
class AppCache extends HttpCache
|
||||||
|
{
|
||||||
|
}
|
||||||
107
app/AppKernel.php
Normal file
107
app/AppKernel.php
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
|
|
||||||
|
class AppKernel extends Kernel
|
||||||
|
{
|
||||||
|
public function registerBundles()
|
||||||
|
{
|
||||||
|
$bundles = [
|
||||||
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||||
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
||||||
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||||
|
new Symfony\Bundle\MonologBundle\MonologBundle(),
|
||||||
|
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
|
||||||
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||||
|
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
|
||||||
|
new FOS\RestBundle\FOSRestBundle(),
|
||||||
|
new FOS\UserBundle\FOSUserBundle(),
|
||||||
|
new JMS\SerializerBundle\JMSSerializerBundle(),
|
||||||
|
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
|
||||||
|
new Nelmio\CorsBundle\NelmioCorsBundle(),
|
||||||
|
new Liip\ThemeBundle\LiipThemeBundle(),
|
||||||
|
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
|
||||||
|
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
|
||||||
|
new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
|
||||||
|
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||||
|
new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
|
||||||
|
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
|
||||||
|
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||||
|
new Craue\ConfigBundle\CraueConfigBundle(),
|
||||||
|
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
|
||||||
|
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
|
||||||
|
new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
|
||||||
|
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
|
||||||
|
new Http\HttplugBundle\HttplugBundle(),
|
||||||
|
new Sentry\SentryBundle\SentryBundle(),
|
||||||
|
|
||||||
|
// wallabag bundles
|
||||||
|
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
||||||
|
new Wallabag\ApiBundle\WallabagApiBundle(),
|
||||||
|
new Wallabag\UserBundle\WallabagUserBundle(),
|
||||||
|
new Wallabag\ImportBundle\WallabagImportBundle(),
|
||||||
|
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
|
||||||
|
];
|
||||||
|
|
||||||
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
||||||
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||||
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||||
|
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
||||||
|
|
||||||
|
if ('test' === $this->getEnvironment()) {
|
||||||
|
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('dev' === $this->getEnvironment()) {
|
||||||
|
$bundles[] = new Symfony\Bundle\MakerBundle\MakerBundle();
|
||||||
|
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $bundles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRootDir()
|
||||||
|
{
|
||||||
|
return __DIR__;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCacheDir()
|
||||||
|
{
|
||||||
|
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLogDir()
|
||||||
|
{
|
||||||
|
return dirname(__DIR__) . '/var/logs';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||||
|
{
|
||||||
|
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
||||||
|
|
||||||
|
$loader->load(function ($container) {
|
||||||
|
if ($container->getParameter('use_webpack_dev_server')) {
|
||||||
|
$container->loadFromExtension('framework', [
|
||||||
|
'assets' => [
|
||||||
|
'base_url' => 'http://localhost:8080/',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
$container->loadFromExtension('framework', [
|
||||||
|
'assets' => [
|
||||||
|
'base_url' => $container->getParameter('domain_name'),
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$loader->load(function (ContainerBuilder $container) {
|
||||||
|
// $container->setParameter('container.autowiring.strict_mode', true);
|
||||||
|
// $container->setParameter('container.dumper.inline_class_loader', true);
|
||||||
|
$container->addObjectResource($this);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initial database structure.
|
* Initial database structure.
|
||||||
*/
|
*/
|
||||||
class Version20160401000000 extends WallabagMigration
|
class Version20160401000000 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ SQL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
||||||
$this->addSql("DROP TABLE {$this->getTable('tagging_rule')}");
|
$this->addSql("DROP TABLE {$this->getTable('tagging_rule')}");
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added foreign keys for account resetting.
|
* Added foreign keys for account resetting.
|
||||||
*/
|
*/
|
||||||
class Version20160410190541 extends WallabagMigration
|
class Version20160410190541 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -24,14 +24,14 @@ class Version20160410190541 extends WallabagMigration
|
|||||||
$sharePublic = $this->container
|
$sharePublic = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
||||||
|
|
||||||
if (false === $sharePublic) {
|
if (false === $sharePublic) {
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$entryTable->dropColumn('uid');
|
$entryTable->dropColumn('uid');
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added name field on wallabag_oauth2_clients.
|
* Added name field on wallabag_oauth2_clients.
|
||||||
*/
|
*/
|
||||||
class Version20160812120952 extends WallabagMigration
|
class Version20160812120952 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
$this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.');
|
$this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.');
|
||||||
@ -31,7 +31,7 @@ class Version20160812120952 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
|
|
||||||
@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added settings for RabbitMQ and Redis imports.
|
* Added settings for RabbitMQ and Redis imports.
|
||||||
*/
|
*/
|
||||||
class Version20160911214952 extends WallabagMigration
|
class Version20160911214952 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$redis = $this->container
|
$redis = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'");
|
||||||
|
|
||||||
if (false === $redis) {
|
if (false === $redis) {
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_redis', 0, 'import')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_redis', 0, 'import')");
|
||||||
@ -24,7 +24,7 @@ class Version20160911214952 extends WallabagMigration
|
|||||||
$rabbitmq = $this->container
|
$rabbitmq = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'");
|
||||||
|
|
||||||
if (false === $rabbitmq) {
|
if (false === $rabbitmq) {
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')");
|
||||||
@ -33,7 +33,7 @@ class Version20160911214952 extends WallabagMigration
|
|||||||
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added pocket_consumer_key field on wallabag_config.
|
* Added pocket_consumer_key field on wallabag_config.
|
||||||
*/
|
*/
|
||||||
class Version20160916201049 extends WallabagMigration
|
class Version20160916201049 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ class Version20160916201049 extends WallabagMigration
|
|||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
$configTable->dropColumn('pocket_consumer_key');
|
$configTable->dropColumn('pocket_consumer_key');
|
||||||
@ -1,17 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added pocket_consumer_key field on wallabag_config.
|
* Added pocket_consumer_key field on wallabag_config.
|
||||||
*/
|
*/
|
||||||
class Version20161001072726 extends WallabagMigration
|
class Version20161001072726 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
|
|
||||||
@ -24,8 +24,9 @@ class Version20161001072726 extends WallabagMigration
|
|||||||
WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||||
);
|
);
|
||||||
|
$query->execute();
|
||||||
|
|
||||||
foreach ($query->fetchAllAssociative() as $fk) {
|
foreach ($query->fetchAll() as $fk) {
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -41,8 +42,9 @@ class Version20161001072726 extends WallabagMigration
|
|||||||
AND conrelid::regclass::text = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
AND conrelid::regclass::text = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||||
AND n.nspname = 'public';"
|
AND n.nspname = 'public';"
|
||||||
);
|
);
|
||||||
|
$query->execute();
|
||||||
|
|
||||||
foreach ($query->fetchAllAssociative() as $fk) {
|
foreach ($query->fetchAll() as $fk) {
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP CONSTRAINT ' . $fk['conname']);
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP CONSTRAINT ' . $fk['conname']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -63,8 +65,9 @@ class Version20161001072726 extends WallabagMigration
|
|||||||
AND COLUMN_NAME = 'entry_id'
|
AND COLUMN_NAME = 'entry_id'
|
||||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||||
);
|
);
|
||||||
|
$query->execute();
|
||||||
|
|
||||||
foreach ($query->fetchAllAssociative() as $fk) {
|
foreach ($query->fetchAll() as $fk) {
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -81,8 +84,9 @@ class Version20161001072726 extends WallabagMigration
|
|||||||
AND n.nspname = 'public'
|
AND n.nspname = 'public'
|
||||||
AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
|
AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
|
||||||
);
|
);
|
||||||
|
$query->execute();
|
||||||
|
|
||||||
foreach ($query->fetchAllAssociative() as $fk) {
|
foreach ($query->fetchAll() as $fk) {
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP CONSTRAINT ' . $fk['conname']);
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP CONSTRAINT ' . $fk['conname']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -91,7 +95,7 @@ class Version20161001072726 extends WallabagMigration
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
throw new SkipMigrationException('Too complex ...');
|
throw new SkipMigrationException('Too complex ...');
|
||||||
}
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converted database to utf8mb4 encoding (for MySQL only).
|
* Converted database to utf8mb4 encoding (for MySQL only).
|
||||||
*/
|
*/
|
||||||
class Version20161022134138 extends WallabagMigration
|
class Version20161022134138 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ class Version20161022134138 extends WallabagMigration
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
|
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
|
||||||
@ -12,7 +12,7 @@ class Version20161024212538 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
private $constraintName = 'IDX_user_oauth_client';
|
private $constraintName = 'IDX_user_oauth_client';
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ class Version20161024212538 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
|
|
||||||
@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added the internal setting to enable/disable downloading pictures.
|
* Added the internal setting to enable/disable downloading pictures.
|
||||||
*/
|
*/
|
||||||
class Version20161031132655 extends WallabagMigration
|
class Version20161031132655 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$images = $this->container
|
$images = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'");
|
||||||
|
|
||||||
$this->skipIf(false !== $images, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $images, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
||||||
}
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added created_at index on entry table.
|
* Added created_at index on entry table.
|
||||||
@ -12,7 +12,7 @@ class Version20161104073720 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
private $indexName = 'IDX_entry_created_at';
|
private $indexName = 'IDX_entry_created_at';
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||||
@ -20,7 +20,7 @@ class Version20161104073720 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['created_at'], $this->indexName);
|
$entryTable->addIndex(['created_at'], $this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added action_mark_as_read field on config table.
|
* Added action_mark_as_read field on config table.
|
||||||
*/
|
*/
|
||||||
class Version20161106113822 extends WallabagMigration
|
class Version20161106113822 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ class Version20161106113822 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
|
|
||||||
@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added the internal setting to share articles to unmark.it.
|
* Added the internal setting to share articles to unmark.it.
|
||||||
*/
|
*/
|
||||||
class Version20161117071626 extends WallabagMigration
|
class Version20161117071626 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$share = $this->container
|
$share = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
|
||||||
|
|
||||||
if (false === $share) {
|
if (false === $share) {
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')");
|
||||||
@ -24,7 +24,7 @@ class Version20161117071626 extends WallabagMigration
|
|||||||
$unmark = $this->container
|
$unmark = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
|
||||||
|
|
||||||
if (false === $unmark) {
|
if (false === $unmark) {
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
|
||||||
@ -33,7 +33,7 @@ class Version20161117071626 extends WallabagMigration
|
|||||||
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add http_status in `entry_table`.
|
* Add http_status in `entry_table`.
|
||||||
*/
|
*/
|
||||||
class Version20161118134328 extends WallabagMigration
|
class Version20161118134328 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ class Version20161118134328 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the restricted_access internal setting for articles with paywall.
|
* Add the restricted_access internal setting for articles with paywall.
|
||||||
*/
|
*/
|
||||||
class Version20161122144743 extends WallabagMigration
|
class Version20161122144743 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$access = $this->container
|
$access = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'");
|
||||||
|
|
||||||
$this->skipIf(false !== $access, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $access, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
||||||
}
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods and properties removed from `FOS\UserBundle\Model\User`.
|
* Methods and properties removed from `FOS\UserBundle\Model\User`.
|
||||||
@ -18,7 +18,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
*/
|
*/
|
||||||
class Version20161122203647 extends WallabagMigration
|
class Version20161122203647 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ class Version20161122203647 extends WallabagMigration
|
|||||||
$userTable->dropColumn('credentials_expired');
|
$userTable->dropColumn('credentials_expired');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added list_mode in user config.
|
* Added list_mode in user config.
|
||||||
*/
|
*/
|
||||||
class Version20161128084725 extends WallabagMigration
|
class Version20161128084725 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
$this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.');
|
$this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.');
|
||||||
@ -18,7 +18,7 @@ class Version20161128084725 extends WallabagMigration
|
|||||||
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
$configTable->dropColumn('list_mode');
|
$configTable->dropColumn('list_mode');
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removed locked, credentials_expire_at and expires_at.
|
* Removed locked, credentials_expire_at and expires_at.
|
||||||
@ -16,7 +16,7 @@ class Version20161128131503 extends WallabagMigration
|
|||||||
'expires_at' => 'datetime',
|
'expires_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class Version20161128131503 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renamed uuid to uid in entry table.
|
* Renamed uuid to uid in entry table.
|
||||||
*/
|
*/
|
||||||
class Version20161214094402 extends WallabagMigration
|
class Version20161214094402 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class Version20161214094402 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added index on wallabag_entry.uid.
|
* Added index on wallabag_entry.uid.
|
||||||
@ -12,7 +12,7 @@ class Version20161214094403 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
private $indexName = 'IDX_entry_uid';
|
private $indexName = 'IDX_entry_uid';
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||||
@ -20,7 +20,7 @@ class Version20161214094403 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['uid'], $this->indexName);
|
$entryTable->addIndex(['uid'], $this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.
|
* Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.
|
||||||
@ -13,7 +13,7 @@ class Version20170127093841 extends WallabagMigration
|
|||||||
private $indexStarredName = 'IDX_entry_starred';
|
private $indexStarredName = 'IDX_entry_starred';
|
||||||
private $indexArchivedName = 'IDX_entry_archived';
|
private $indexArchivedName = 'IDX_entry_archived';
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf($entryTable->hasIndex($this->indexStarredName) && $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
|
$this->skipIf($entryTable->hasIndex($this->indexStarredName) && $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
|
||||||
@ -22,7 +22,7 @@ class Version20170127093841 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf(false === $entryTable->hasIndex($this->indexStarredName) && false === $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
|
$this->skipIf(false === $entryTable->hasIndex($this->indexStarredName) && false === $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.');
|
||||||
@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the share_scuttle internal setting.
|
* Add the share_scuttle internal setting.
|
||||||
*/
|
*/
|
||||||
class Version20170327194233 extends WallabagMigration
|
class Version20170327194233 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$scuttle = $this->container
|
$scuttle = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'");
|
||||||
|
|
||||||
$this->skipIf(false !== $scuttle, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $scuttle, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ class Version20170327194233 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add published_at and published_by in `entry` table.
|
* Add published_at and published_by in `entry` table.
|
||||||
*/
|
*/
|
||||||
class Version20170405182620 extends WallabagMigration
|
class Version20170405182620 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ class Version20170405182620 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove isPublic in Entry Table.
|
* Remove isPublic in Entry Table.
|
||||||
*/
|
*/
|
||||||
class Version20170407200919 extends WallabagMigration
|
class Version20170407200919 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
$this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
||||||
@ -18,7 +18,7 @@ class Version20170407200919 extends WallabagMigration
|
|||||||
$entryTable->dropColumn('is_public');
|
$entryTable->dropColumn('is_public');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
$this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
||||||
@ -1,26 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove download_pictures in craue_config_setting.
|
* Remove download_pictures in craue_config_setting.
|
||||||
*/
|
*/
|
||||||
class Version20170420134133 extends WallabagMigration
|
class Version20170420134133 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$downloadPictures = $this->container
|
$downloadPictures = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'");
|
||||||
|
|
||||||
$this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add site credential table to store username & password for some website (behind authentication or paywall).
|
* Add site credential table to store username & password for some website (behind authentication or paywall).
|
||||||
*/
|
*/
|
||||||
class Version20170501115751 extends WallabagMigration
|
class Version20170501115751 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ class Version20170501115751 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$schema->dropTable($this->getTable('site_credential'));
|
$schema->dropTable($this->getTable('site_credential'));
|
||||||
}
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
|
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
|
||||||
@ -17,7 +17,7 @@ class Version20170510082609 extends WallabagMigration
|
|||||||
'email_canonical',
|
'email_canonical',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class Version20170510082609 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added `headers` field in entry table.
|
* Added `headers` field in entry table.
|
||||||
*/
|
*/
|
||||||
class Version20170511115400 extends WallabagMigration
|
class Version20170511115400 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class Version20170511115400 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,17 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase the length of the "quote" column of "annotation" table.
|
* Increase the length of the "quote" column of "annotation" table.
|
||||||
*/
|
*/
|
||||||
class Version20170511211659 extends WallabagMigration
|
class Version20170511211659 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
@ -62,7 +62,7 @@ EOD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$tableName = $this->getTable('annotation');
|
$tableName = $this->getTable('annotation');
|
||||||
|
|
||||||
@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add api_user_registration in craue_config_setting.
|
* Add api_user_registration in craue_config_setting.
|
||||||
*/
|
*/
|
||||||
class Version20170602075214 extends WallabagMigration
|
class Version20170602075214 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$apiUserRegistration = $this->container
|
$apiUserRegistration = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'");
|
||||||
|
|
||||||
$this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
||||||
}
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove wallabag_url from craue_config_setting.
|
* Remove wallabag_url from craue_config_setting.
|
||||||
@ -11,21 +11,19 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
*/
|
*/
|
||||||
class Version20170606155640 extends WallabagMigration
|
class Version20170606155640 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf(!$schema->hasTable($this->getTable('craue_config_setting')), 'Old migration (table name has changed)');
|
|
||||||
|
|
||||||
$apiUserRegistration = $this->container
|
$apiUserRegistration = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||||
|
|
||||||
$this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.');
|
$this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||||
}
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changed tags to lowercase.
|
* Changed tags to lowercase.
|
||||||
*/
|
*/
|
||||||
class Version20170719231144 extends WallabagMigration
|
class Version20170719231144 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
|
|
||||||
@ -21,12 +21,13 @@ class Version20170719231144 extends WallabagMigration
|
|||||||
GROUP BY LOWER(label)
|
GROUP BY LOWER(label)
|
||||||
HAVING COUNT(*) > 1'
|
HAVING COUNT(*) > 1'
|
||||||
);
|
);
|
||||||
|
$dupTags->execute();
|
||||||
|
|
||||||
foreach ($dupTags->fetchAllAssociative() as $duplicates) {
|
foreach ($dupTags->fetchAll() as $duplicates) {
|
||||||
$label = $duplicates['lower_label'];
|
$label = $duplicates['lower_label'];
|
||||||
|
|
||||||
// Retrieve all duplicate tags for a given tag
|
// Retrieve all duplicate tags for a given tag
|
||||||
$tags = $this->connection->query('
|
$tags = $this->connection->executeQuery('
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM ' . $this->getTable('tag') . '
|
FROM ' . $this->getTable('tag') . '
|
||||||
WHERE LOWER(label) = :label
|
WHERE LOWER(label) = :label
|
||||||
@ -40,7 +41,7 @@ class Version20170719231144 extends WallabagMigration
|
|||||||
$newId = null;
|
$newId = null;
|
||||||
$ids = [];
|
$ids = [];
|
||||||
|
|
||||||
foreach ($tags->fetchAllAssociative() as $tag) {
|
foreach ($tags->fetchAll() as $tag) {
|
||||||
// Ignore the first tag as we use it as the new reference tag
|
// Ignore the first tag as we use it as the new reference tag
|
||||||
if ($first) {
|
if ($first) {
|
||||||
$first = false;
|
$first = false;
|
||||||
@ -85,7 +86,7 @@ class Version20170719231144 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
throw new SkipMigrationException('Too complex ...');
|
throw new SkipMigrationException('Too complex ...');
|
||||||
}
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add starred_at column and set its value to updated_at for is_starred entries.
|
* Add starred_at column and set its value to updated_at for is_starred entries.
|
||||||
*/
|
*/
|
||||||
class Version20170824113337 extends WallabagMigration
|
class Version20170824113337 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class Version20170824113337 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postUp(Schema $schema): void
|
public function postUp(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf(!$entryTable->hasColumn('starred_at'), 'Unable to add starred_at colum');
|
$this->skipIf(!$entryTable->hasColumn('starred_at'), 'Unable to add starred_at colum');
|
||||||
@ -34,7 +34,7 @@ class Version20170824113337 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changed reading_time field to prevent null value.
|
* Changed reading_time field to prevent null value.
|
||||||
*/
|
*/
|
||||||
class Version20171008195606 extends WallabagMigration
|
class Version20171008195606 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class Version20171008195606 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add origin_url column.
|
* Add origin_url column.
|
||||||
*/
|
*/
|
||||||
class Version20171105202000 extends WallabagMigration
|
class Version20171105202000 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class Version20171105202000 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add store_article_headers in craue_config_setting.
|
* Add store_article_headers in craue_config_setting.
|
||||||
*/
|
*/
|
||||||
class Version20171120163128 extends WallabagMigration
|
class Version20171120163128 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$storeArticleHeaders = $this->container
|
$storeArticleHeaders = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'");
|
||||||
|
|
||||||
$this->skipIf(false !== $storeArticleHeaders, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $storeArticleHeaders, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
||||||
}
|
}
|
||||||
@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add shaarli_share_origin_url in craue_config_setting.
|
* Add shaarli_share_origin_url in craue_config_setting.
|
||||||
*/
|
*/
|
||||||
class Version20171125164500 extends WallabagMigration
|
class Version20171125164500 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$shaarliShareOriginUrl = $this->container
|
$shaarliShareOriginUrl = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'");
|
||||||
|
|
||||||
$this->skipIf(false !== $shaarliShareOriginUrl, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $shaarliShareOriginUrl, 'It seems that you already played this migration.');
|
||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
||||||
}
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add archived_at column and set its value to updated_at for is_archived entries.
|
* Add archived_at column and set its value to updated_at for is_archived entries.
|
||||||
*/
|
*/
|
||||||
class Version20180405182455 extends WallabagMigration
|
class Version20180405182455 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class Version20180405182455 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postUp(Schema $schema): void
|
public function postUp(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum');
|
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum');
|
||||||
@ -34,7 +34,7 @@ class Version20180405182455 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix varchar field from vendor to work with utf8mb4.
|
* Fix varchar field from vendor to work with utf8mb4.
|
||||||
*/
|
*/
|
||||||
class Version20181128203230 extends WallabagMigration
|
class Version20181128203230 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ class Version20181128203230 extends WallabagMigration
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)');
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add 2fa OTP stuff.
|
* Add 2fa OTP stuff.
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add updated_at fields to site_credential table.
|
* Add updated_at fields to site_credential table.
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add missing entries in craue_config_setting.
|
* Add missing entries in craue_config_setting.
|
||||||
@ -118,13 +118,13 @@ final class Version20190129120000 extends WallabagMigration
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
foreach ($this->settings as $setting) {
|
foreach ($this->settings as $setting) {
|
||||||
$settingEnabled = $this->container
|
$settingEnabled = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
||||||
|
|
||||||
if (false !== $settingEnabled) {
|
if (false !== $settingEnabled) {
|
||||||
continue;
|
continue;
|
||||||
@ -134,7 +134,7 @@ final class Version20190129120000 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf(true, 'These settings are required and should not be removed.');
|
$this->skipIf(true, 'These settings are required and should not be removed.');
|
||||||
}
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add hashed_url in entry.
|
* Add hashed_url in entry.
|
||||||
*/
|
*/
|
||||||
class Version20190401105353 extends WallabagMigration
|
class Version20190401105353 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ class Version20190401105353 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]);
|
$entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename rss_token & rss_limit to feed_token & feed_limit.
|
* Rename rss_token & rss_limit to feed_token & feed_limit.
|
||||||
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable cascade delete when deleting a user on:
|
* Enable cascade delete when deleting a user on:
|
||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert tab label to utf8mb4_bin (MySQL only).
|
* Convert tab label to utf8mb4_bin (MySQL only).
|
||||||
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added `given_url` & `hashed_given_url` field in entry table.
|
* Added `given_url` & `hashed_given_url` field in entry table.
|
||||||
*/
|
*/
|
||||||
class Version20190601125843 extends WallabagMigration
|
class Version20190601125843 extends WallabagMigration
|
||||||
{
|
{
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ class Version20190601125843 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]);
|
$entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change reading_time field on SQLite to be integer NOT NULL
|
* Change reading_time field on SQLite to be integer NOT NULL
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change reading speed value.
|
* Change reading speed value.
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adding more index to kill some slow queries:
|
* Adding more index to kill some slow queries:
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the internal setting table name.
|
* Change the internal setting table name.
|
||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add tables for the ignore origin rules.
|
* Add tables for the ignore origin rules.
|
||||||
@ -44,11 +44,11 @@ final class Version20190826204730 extends WallabagMigration
|
|||||||
|
|
||||||
public function postUp(Schema $schema): void
|
public function postUp(Schema $schema): void
|
||||||
{
|
{
|
||||||
foreach ($this->container->getParameter('wallabag.default_ignore_origin_instance_rules') as $entity) {
|
foreach ($this->container->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $entity) {
|
||||||
$previous_rule = $this->container
|
$previous_rule = $this->container
|
||||||
->get('doctrine.orm.default_entity_manager')
|
->get('doctrine.orm.default_entity_manager')
|
||||||
->getConnection()
|
->getConnection()
|
||||||
->fetchOne('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
->fetchArray('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
||||||
|
|
||||||
if (false === $previous_rule) {
|
if (false === $previous_rule) {
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
|
$this->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
|
||||||
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove baggy theme.
|
* Remove baggy theme.
|
||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace DoctrineMigrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use App\Doctrine\WallabagMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renamed Piwik to Matomo in configuration.
|
* Renamed Piwik to Matomo in configuration.
|
||||||
@ -2,7 +2,7 @@ settings_changed: Configuración actualizada
|
|||||||
download_pictures: Descargar imágenes en el servidor
|
download_pictures: Descargar imágenes en el servidor
|
||||||
diaspora_url: URL de diaspora*, si el servicio está activado
|
diaspora_url: URL de diaspora*, si el servicio está activado
|
||||||
export_epub: Activar exportación a ePub
|
export_epub: Activar exportación a ePub
|
||||||
export_mobi: Activar exportación a .mobi (deprecado, se eliminará pronto)
|
export_mobi: Activar exportación a .mobi
|
||||||
export_pdf: Activar exportación a PDF
|
export_pdf: Activar exportación a PDF
|
||||||
export_csv: Activar exportación a CSV
|
export_csv: Activar exportación a CSV
|
||||||
export_json: Activar exportación a JSON
|
export_json: Activar exportación a JSON
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user