mirror of
https://github.com/wallabag/wallabag.git
synced 2026-03-22 10:27:41 +01:00
Compare commits
1 Commits
dependabot
...
fix/CodeQL
| Author | SHA1 | Date | |
|---|---|---|---|
| af54ccea8a |
10
.babelrc
Normal file
10
.babelrc
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@ -9,7 +9,7 @@ indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,css,scss}]
|
||||
[*.{js,css}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
@ -18,6 +18,3 @@ indent_style = tab
|
||||
|
||||
[.github/**.yml]
|
||||
indent_size = 2
|
||||
|
||||
[phpstan-baseline.neon]
|
||||
indent_style = tab
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
{
|
||||
"extends": "airbnb-base",
|
||||
"parser": "@babel/eslint-parser",
|
||||
"parserOptions": {
|
||||
"requireConfigFile": false
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
|
||||
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -1,2 +0,0 @@
|
||||
# Migrated rules from dependabot.yml
|
||||
composer.* @Kdecherf @j0k3r @yguedidi
|
||||
28
.github/CONTRIBUTING.md
vendored
28
.github/CONTRIBUTING.md
vendored
@ -7,11 +7,11 @@
|
||||
- Clone the repository
|
||||
- Ensure your Docker daemon is running
|
||||
- Copy `docker/php/env.example` to `docker/php/env` and customize
|
||||
- Launch `docker compose run --rm php composer install` to bootstrap php dependencies
|
||||
- Launch `docker compose run --rm php bin/console wallabag:install` to bootstrap your installation
|
||||
- Launch `docker compose run --rm php yarn install` to bootstrap dependencies for the frontend
|
||||
- Launch `docker compose run --rm php yarn build:dev` to build assets for the frontend
|
||||
- Launch `docker compose up -d` to start the stack
|
||||
- Launch `docker-compose run --rm php composer install` to bootstrap php dependencies
|
||||
- Launch `docker-compose run --rm php bin/console wallabag:install` to bootstrap your installation
|
||||
- Launch `docker-compose run --rm php yarn install` to bootstrap dependencies for the frontend
|
||||
- Launch `docker-compose run --rm php yarn build:dev` to build assets for the frontend
|
||||
- Launch `docker-compose up -d` to start the stack
|
||||
|
||||
You'll then have:
|
||||
- a PHP daemon with standalone web server
|
||||
@ -20,11 +20,11 @@ You'll then have:
|
||||
|
||||
You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
|
||||
|
||||
If you want to test using an other database than SQLite, uncomment the `postgres` or `mariadb` code from the `compose.yaml` file at the root of the repo. Also uncomment related line in the `php` section so the database will be linked to your PHP instance.
|
||||
If you want to test using an other database than SQLite, uncomment the `postgres` or `mariadb` code from the `docker-compose.yml` file at the root of the repo. Also uncomment related line in the `php` section so the database will be linked to your PHP instance.
|
||||
|
||||
### Using your own PHP server
|
||||
|
||||
- Ensure you are running PHP >= 8.2.
|
||||
- Ensure you are running PHP >= 7.4.
|
||||
- Clone the repository
|
||||
- Launch `composer install`
|
||||
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)
|
||||
@ -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
|
||||
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 `make test`.
|
||||
|
||||
To run the PHP formatter run `make fix-cs`.
|
||||
|
||||
To run the PHPStan static analysis run `make phpstan`.
|
||||
|
||||
To run the JS linter run `make lint-js`.
|
||||
|
||||
To run the SCSS linter run `make lint-scss`.
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,5 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Want to ask something?
|
||||
url: https://matrix.to/#/#wallabag:matrix.org
|
||||
about: Use Matrix to ask questions.
|
||||
url: https://gitter.im/wallabag/wallabag
|
||||
about: Use Gitter to ask questions.
|
||||
|
||||
43
.github/dependabot.yml
vendored
43
.github/dependabot.yml
vendored
@ -7,40 +7,33 @@ updates:
|
||||
time: "04:00"
|
||||
timezone: Europe/Paris
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
babel-dependencies:
|
||||
patterns:
|
||||
- "*babel*"
|
||||
fontsource-dependencies:
|
||||
patterns:
|
||||
- "*fontsource*"
|
||||
ignore:
|
||||
- dependency-name: "@materializecss/materialize"
|
||||
- dependency-name: materialize-css
|
||||
versions:
|
||||
- "> 1.2.2"
|
||||
- "> 0.98.2"
|
||||
- package-ecosystem: composer
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
timezone: Europe/Paris
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
symfony-dependencies:
|
||||
patterns:
|
||||
- "symfony/*"
|
||||
twig-dependencies:
|
||||
patterns:
|
||||
- "twig/*"
|
||||
phpstan-dependencies:
|
||||
patterns:
|
||||
- "phpstan/*"
|
||||
pagerfanta-dependencies:
|
||||
patterns:
|
||||
- "pagerfanta/*"
|
||||
reviewers:
|
||||
- j0k3r
|
||||
- tcitworld
|
||||
- Kdecherf
|
||||
labels:
|
||||
- Ready for review
|
||||
ignore:
|
||||
- dependency-name: symfony/*
|
||||
update-types: [ "version-update:semver-major" ]
|
||||
- dependency-name: doctrine/doctrine-migrations-bundle
|
||||
versions:
|
||||
- "> 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
|
||||
directory: "/"
|
||||
schedule:
|
||||
|
||||
44
.github/workflows/assets.yml
vendored
Normal file
44
.github/workflows/assets.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: "Assets"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 2.*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
js:
|
||||
name: "Building assets"
|
||||
runs-on: "ubuntu-20.04"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v3"
|
||||
|
||||
- name: "Install Node"
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "16"
|
||||
|
||||
- name: "Install dependencies with Yarn"
|
||||
run: "yarn install"
|
||||
|
||||
- name: "Build dev assets"
|
||||
run: "yarn run build:dev"
|
||||
|
||||
- name: "Build prod assets"
|
||||
run: "yarn run build:prod"
|
||||
|
||||
- name: "Validate no change were created"
|
||||
run: |
|
||||
GITDIFF=`git diff`
|
||||
if [ "$GITDIFF" == "" ]; then
|
||||
exit 0
|
||||
else
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
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
|
||||
55
.github/workflows/coding-standards.yml
vendored
55
.github/workflows/coding-standards.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "2.**"
|
||||
- 2.*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@ -13,78 +13,39 @@ permissions:
|
||||
jobs:
|
||||
coding-standards:
|
||||
name: "CS Fixer, PHPStan & TwigCS"
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: "ubuntu-20.04"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v6"
|
||||
uses: "actions/checkout@v3"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@v2"
|
||||
with:
|
||||
coverage: "none"
|
||||
php-version: "8.2"
|
||||
php-version: "7.4"
|
||||
tools: cs2pr, pecl
|
||||
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
|
||||
ini-values: "date.timezone=Europe/Paris"
|
||||
env:
|
||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Install Node"
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: 'yarn'
|
||||
|
||||
- name: "Setup MySQL"
|
||||
run: |
|
||||
sudo systemctl start mysql.service
|
||||
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
|
||||
cp app/config/tests/parameters_test.mysql.yml app/config/parameters_test.yml
|
||||
|
||||
- name: "Install dependencies with Composer"
|
||||
id: composer-install
|
||||
uses: "ramsey/composer-install@v3"
|
||||
uses: "ramsey/composer-install@v2"
|
||||
with:
|
||||
composer-options: "--optimize-autoloader --prefer-dist"
|
||||
|
||||
- name: "Install dependencies with Yarn"
|
||||
id: yarn-install
|
||||
run: yarn install
|
||||
|
||||
- name: "Run Composer validate"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "composer validate"
|
||||
|
||||
- name: "Run Composer dependency analyser"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "bin/composer-dependency-analyser"
|
||||
|
||||
- name: "Run PHP CS Fixer"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr"
|
||||
|
||||
- name: "Generate test cache for PHPStan"
|
||||
id: test-cache
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "php bin/console cache:clear --env=test"
|
||||
|
||||
- name: "Install PHPUnit for PHPStan"
|
||||
run: "php bin/simple-phpunit install"
|
||||
|
||||
- name: "Run PHPStan"
|
||||
if: always() && steps.test-cache.outcome == 'success'
|
||||
run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr"
|
||||
|
||||
- name: "Run TwigCS"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr"
|
||||
|
||||
- name: "Run ergebnis/composer-normalize"
|
||||
if: always() && steps.composer-install.outcome == 'success'
|
||||
run: "composer normalize --dry-run --no-check-lock"
|
||||
|
||||
- name: "Run ESLint"
|
||||
if: always() && steps.yarn-install.outcome == 'success'
|
||||
run: "yarn lint:js"
|
||||
|
||||
- name: "Run Stylelint"
|
||||
if: always() && steps.yarn-install.outcome == 'success'
|
||||
run: "yarn lint:scss"
|
||||
|
||||
181
.github/workflows/continuous-integration.yml
vendored
181
.github/workflows/continuous-integration.yml
vendored
@ -5,18 +5,16 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "2.**"
|
||||
- 2.*
|
||||
|
||||
env:
|
||||
# Force disabling the reporting of Doctrine deprecation notices for now
|
||||
DOCTRINE_DEPRECATIONS: none
|
||||
PGPASSWORD: wallabagrocks
|
||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
jobs:
|
||||
phpunit:
|
||||
name: "PHP ${{ matrix.php }} using ${{ matrix.database }}"
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: "ubuntu-20.04"
|
||||
services:
|
||||
rabbitmq:
|
||||
image: rabbitmq:3-alpine
|
||||
@ -31,9 +29,9 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php:
|
||||
- "8.2"
|
||||
- "8.3"
|
||||
- "8.4"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
- "8.1"
|
||||
database:
|
||||
- "sqlite"
|
||||
- "mysql"
|
||||
@ -41,7 +39,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v6"
|
||||
uses: "actions/checkout@v3"
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
@ -54,12 +52,6 @@ jobs:
|
||||
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
|
||||
ini-values: "date.timezone=Europe/Paris"
|
||||
|
||||
- name: "Install Node"
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: 'yarn'
|
||||
|
||||
- name: "Setup MySQL"
|
||||
if: "${{ matrix.database == 'mysql' }}"
|
||||
run: |
|
||||
@ -75,164 +67,15 @@ jobs:
|
||||
pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag
|
||||
|
||||
- name: "Install dependencies with Composer"
|
||||
uses: "ramsey/composer-install@v3"
|
||||
uses: "ramsey/composer-install@v2"
|
||||
with:
|
||||
composer-options: "--optimize-autoloader --prefer-dist"
|
||||
|
||||
- name: "Install dependencies with Yarn"
|
||||
run: yarn install
|
||||
- name: "Prepare database"
|
||||
run: "make prepare DB=${{ matrix.database }}"
|
||||
|
||||
- name: "Build assets with Yarn"
|
||||
run: yarn build:dev
|
||||
|
||||
- name: "Prepare database configuration"
|
||||
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
|
||||
- name: "Prepare fixtures"
|
||||
run: "make fixtures"
|
||||
|
||||
- name: "Run PHPUnit"
|
||||
run: "php bin/phpunit -v"
|
||||
|
||||
phpunit_no_prefix:
|
||||
name: "PHP ${{ matrix.php }} using ${{ matrix.database }} without prefix"
|
||||
runs-on: ubuntu-latest
|
||||
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@v6"
|
||||
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: "Install Node"
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: 'yarn'
|
||||
|
||||
- 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@v3"
|
||||
with:
|
||||
composer-options: "--optimize-autoloader --prefer-dist"
|
||||
|
||||
- name: "Install dependencies with Yarn"
|
||||
run: yarn install
|
||||
|
||||
- name: "Build assets with Yarn"
|
||||
run: yarn build:dev
|
||||
|
||||
- name: "Prepare database configuration"
|
||||
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
|
||||
|
||||
- name: "Run PHPUnit"
|
||||
run: "php bin/phpunit -v"
|
||||
|
||||
phpunit-without-rmq-redis:
|
||||
name: "PHP ${{ matrix.php }} using ${{ matrix.database }} without Rabbit & Redis"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php:
|
||||
- "8.3"
|
||||
database:
|
||||
- "sqlite"
|
||||
- "mysql"
|
||||
- "pgsql"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v6"
|
||||
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: "Install Node"
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: 'yarn'
|
||||
|
||||
- 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@v3"
|
||||
with:
|
||||
composer-options: "--optimize-autoloader --prefer-dist"
|
||||
|
||||
- name: "Install dependencies with Yarn"
|
||||
run: yarn install
|
||||
|
||||
- name: "Build assets with Yarn"
|
||||
run: yarn build:dev
|
||||
|
||||
- name: "Prepare database configuration"
|
||||
run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
|
||||
|
||||
- name: "Run PHPUnit"
|
||||
run: "php bin/phpunit -v"
|
||||
run: "php bin/simple-phpunit -v"
|
||||
|
||||
@ -12,7 +12,7 @@ jobs:
|
||||
steps:
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v2.5.0
|
||||
uses: dependabot/fetch-metadata@v1.3.4
|
||||
with:
|
||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
- name: Approve and merge minor updates
|
||||
|
||||
20
.github/workflows/translations.yml
vendored
20
.github/workflows/translations.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "2.**"
|
||||
- 2.*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@ -13,16 +13,16 @@ permissions:
|
||||
jobs:
|
||||
translations:
|
||||
name: "Translations"
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: "ubuntu-20.04"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php:
|
||||
- "8.2"
|
||||
- "7.4"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v6"
|
||||
uses: "actions/checkout@v3"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@v2"
|
||||
@ -36,9 +36,15 @@ jobs:
|
||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Install dependencies with Composer"
|
||||
uses: "ramsey/composer-install@v3"
|
||||
uses: "ramsey/composer-install@v2"
|
||||
with:
|
||||
composer-options: "--optimize-autoloader --prefer-dist"
|
||||
|
||||
- name: "Validate translations"
|
||||
run: "php bin/console lint:yaml translations -v"
|
||||
- name: "Validate Core translations"
|
||||
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"
|
||||
|
||||
10
.github/workflows/upload-release-package.yml
vendored
10
.github/workflows/upload-release-package.yml
vendored
@ -12,11 +12,11 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
php:
|
||||
- "8.2"
|
||||
- "7.4"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v6"
|
||||
uses: "actions/checkout@v3"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@v2"
|
||||
@ -29,12 +29,6 @@ jobs:
|
||||
env:
|
||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Install Node"
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "yarn"
|
||||
|
||||
- name: Create the package
|
||||
run: make release VERSION=${{ github.event.release.tag_name }}
|
||||
|
||||
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@ -15,7 +15,6 @@
|
||||
.php-cs-fixer.cache
|
||||
.phpunit.result.cache
|
||||
phpunit.xml
|
||||
compose.override.yaml
|
||||
|
||||
# Parameters
|
||||
/app/config/parameters.yml
|
||||
@ -29,7 +28,7 @@ web/uploads/
|
||||
!/web/bundles/.gitkeep
|
||||
/web/assets/images/*
|
||||
!web/assets/images/.gitkeep
|
||||
/web/build/*
|
||||
/web/wallassets/*.dev.js
|
||||
|
||||
# Build
|
||||
/app/build
|
||||
@ -38,7 +37,6 @@ web/uploads/
|
||||
|
||||
# Development
|
||||
docker/php/env
|
||||
docker/php/blackfire
|
||||
|
||||
# Composer PHAR
|
||||
/composer.phar
|
||||
@ -49,7 +47,9 @@ data/db/wallabag*.sqlite
|
||||
# assets stuff
|
||||
node_modules/
|
||||
bin
|
||||
package-lock.json
|
||||
app/Resources/build/
|
||||
!/src/Wallabag/CoreBundle/Resources/public
|
||||
/src/Wallabag/CoreBundle/Resources/public/*
|
||||
|
||||
# Test-generated files
|
||||
admin-export.json
|
||||
@ -58,7 +58,3 @@ specialexport.json
|
||||
|
||||
# Custom CSS file
|
||||
web/custom.css
|
||||
|
||||
.env.local
|
||||
|
||||
yarn-error.log
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
<?php
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
|
||||
return $config
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
'@Symfony:risky' => true,
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short',
|
||||
'syntax' => 'short'
|
||||
],
|
||||
'combine_consecutive_unsets' => true,
|
||||
'heredoc_to_nowdoc' => true,
|
||||
@ -22,23 +21,21 @@ return $config
|
||||
'use',
|
||||
'parenthesis_brace_block',
|
||||
'square_brace_block',
|
||||
'curly_brace_block',
|
||||
'curly_brace_block'
|
||||
],
|
||||
],
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_useless_concat_operator' => false,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'ordered_class_elements' => true,
|
||||
'ordered_imports' => true,
|
||||
'php_unit_strict' => true,
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_separation' => false,
|
||||
// 'psr_autoloading' => true,
|
||||
'strict_comparison' => true,
|
||||
'strict_param' => true,
|
||||
'concat_space' => [
|
||||
'spacing' => 'one',
|
||||
'spacing' => 'one'
|
||||
],
|
||||
])
|
||||
->setFinder(
|
||||
@ -47,7 +44,7 @@ return $config
|
||||
'node_modules',
|
||||
'vendor',
|
||||
'var',
|
||||
'web',
|
||||
'web'
|
||||
])
|
||||
->in(__DIR__)
|
||||
)
|
||||
|
||||
276
CHANGELOG.md
276
CHANGELOG.md
@ -1,281 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## Upcoming changes
|
||||
|
||||
* **[BC BREAK]** Convert 403 errors to 404 errors by @yguedidi in https://github.com/wallabag/wallabag/pull/8075
|
||||
* `wallassets/` folder renamed to `build/`
|
||||
|
||||
## [2.6.13](https://github.com/wallabag/wallabag/tree/2.6.13)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.12...2.6.13)
|
||||
|
||||
### Improvements
|
||||
|
||||
* Add support of Pocket CSV import by @kdecherf and @nicosomb in [https://github.com/wallabag/wallabag/pull/8240](https://github.com/wallabag/wallabag/pull/8240)
|
||||
* Backport Pocket and Shaarli HTML imports from master by @nicosomb in [https://github.com/wallabag/wallabag/pull/8193](https://github.com/wallabag/wallabag/pull/8193)
|
||||
|
||||
### Fixes
|
||||
|
||||
* Avoid non-validated OTP to be enabled #8139 by @j0k3r in [https://github.com/wallabag/wallabag/pull/8139](https://github.com/wallabag/wallabag/pull/8139)
|
||||
|
||||
### Technical stuff
|
||||
|
||||
* Update j0k3r/php-readability:1.2.13 to fix regression (about latin1 instead of UTF-8 used for entries) by @nicosomb [https://github.com/wallabag/wallabag/pull/8194](https://github.com/wallabag/wallabag/pull/8194)
|
||||
|
||||
## [2.6.12](https://github.com/wallabag/wallabag/tree/2.6.12)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.11...2.6.12)
|
||||
|
||||
### Technical stuff
|
||||
|
||||
* Fix changelog by @yguedidi in [https://github.com/wallabag/wallabag/pull/8135](https://github.com/wallabag/wallabag/pull/8135)
|
||||
* Update dependencies by @yguedidi in [https://github.com/wallabag/wallabag/pull/8136](https://github.com/wallabag/wallabag/pull/8136)
|
||||
|
||||
## [2.6.11](https://github.com/wallabag/wallabag/tree/2.6.11)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.10...2.6.11)
|
||||
|
||||
### Security fix
|
||||
* Protect actions with a CSRF token by @yguedidi in https://github.com/wallabag/wallabag/commit/99c8a06594d6ee7480ce4d041ccff3025b353656
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix redirection after action in search results by @nicosomb in [https://github.com/wallabag/wallabag/pull/7827](https://github.com/wallabag/wallabag/pull/7827)
|
||||
* Fix title tag filter by @nicosomb in [https://github.com/wallabag/wallabag/pull/7846](https://github.com/wallabag/wallabag/pull/7846)
|
||||
* Change NB_ELEMENTS in pocket importer to 30 by @j0k3r in [https://github.com/wallabag/wallabag/pull/7993](https://github.com/wallabag/wallabag/pull/7993)
|
||||
* Fix entries counter for annotated entries in the menu by @j0k3r in [https://github.com/wallabag/wallabag/pull/7999](https://github.com/wallabag/wallabag/pull/7999)
|
||||
|
||||
### Technical stuff
|
||||
|
||||
* Prepare 2.6.11 release by @yguedidi in [https://github.com/wallabag/wallabag/pull/8133](https://github.com/wallabag/wallabag/pull/8133)
|
||||
|
||||
## [2.6.10](https://github.com/wallabag/wallabag/tree/2.6.10)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.9...2.6.10)
|
||||
|
||||
### Improvement
|
||||
|
||||
* Add Omnivore import by @nicosomb in https://github.com/wallabag/wallabag/pull/7754
|
||||
|
||||
### Fixes
|
||||
|
||||
* Update site config & tests by @j0k3r in https://github.com/wallabag/wallabag/pull/7582 (fixes "Key provided is shorter
|
||||
than 256 bits, only 240 bits provided" https://github.com/wallabag/wallabag/issues/7531)
|
||||
* Update site config by @yguedidi in https://github.com/wallabag/wallabag/pull/7623
|
||||
* Replace gitter with matrix by @nicosomb in https://github.com/wallabag/wallabag/pull/7753
|
||||
|
||||
## [2.6.9](https://github.com/wallabag/wallabag/tree/2.6.9)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.8...2.6.9)
|
||||
|
||||
### Fixes
|
||||
* Fix same domain pagination by @yguedidi in https://github.com/wallabag/wallabag/pull/7266
|
||||
* Upgrade PHP dependencies by @yguedidi in https://github.com/wallabag/wallabag/pull/7272
|
||||
* Use a proper "how to" for elCurator by @j0k3r in https://github.com/wallabag/wallabag/pull/7323
|
||||
|
||||
## [2.6.8](https://github.com/wallabag/wallabag/tree/2.6.8)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.7...2.6.8)
|
||||
|
||||
### Fixes
|
||||
* Update deps & Node 20 by @j0k3r in https://github.com/wallabag/wallabag/pull/7134
|
||||
* Fix dark mode disabled url 2.6 by @Simounet in https://github.com/wallabag/wallabag/pull/7133
|
||||
* Make database dependent commands lazy by @yguedidi in https://github.com/wallabag/wallabag/pull/7142
|
||||
* Fix docker setup by @yguedidi in https://github.com/wallabag/wallabag/pull/7141
|
||||
* Remove session-based redirection by @yguedidi in https://github.com/wallabag/wallabag/pull/7140
|
||||
|
||||
## [2.6.7](https://github.com/wallabag/wallabag/tree/2.6.7)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.6...2.6.7)
|
||||
|
||||
### Security fix
|
||||
* A user can disable her 2FA unintentionally by @kdecherf in https://github.com/wallabag/wallabag/commit/0cfdddc2eb0aee5ffb69bf499d377d75655ba157
|
||||
|
||||
### Fixes
|
||||
* Fix deprecated null tag parameter by @Simounet in https://github.com/wallabag/wallabag/pull/6985
|
||||
* Full clickable card on mass action by @Simounet in https://github.com/wallabag/wallabag/pull/6991
|
||||
* Add tag form submit button always displayed by @Simounet in https://github.com/wallabag/wallabag/pull/6986
|
||||
|
||||
## [2.6.6](https://github.com/wallabag/wallabag/tree/2.6.6)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.5...2.6.6)
|
||||
|
||||
### Security fix
|
||||
* Force secure cookie on HTTPS connection by @j0k3r in https://github.com/wallabag/wallabag/pull/6924
|
||||
|
||||
### Fixes
|
||||
* Fix checkboxes pointer events issue by @Simounet in https://github.com/wallabag/wallabag/pull/6897
|
||||
* Add Google mailer by @j0k3r in https://github.com/wallabag/wallabag/pull/6899
|
||||
* Improve performance on homepage by @Simounet in https://github.com/wallabag/wallabag/pull/6909
|
||||
* Mass action layout improved by @Simounet in https://github.com/wallabag/wallabag/pull/6912
|
||||
|
||||
## [2.6.5](https://github.com/wallabag/wallabag/tree/2.6.5)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.4...2.6.5)
|
||||
|
||||
### Fixes
|
||||
* "Fix checkboxes pointer-events disabled" by @Simounet https://github.com/wallabag/wallabag/pull/6874
|
||||
* "Fix nav input styles" by @Simounet https://github.com/wallabag/wallabag/pull/6877
|
||||
* "Change domain status filters html types" by @Simounet https://github.com/wallabag/wallabag/pull/6888
|
||||
|
||||
## [2.6.4](https://github.com/wallabag/wallabag/tree/2.6.4)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.3...2.6.4)
|
||||
|
||||
### Fixes
|
||||
* Fix API token generation by @nicosomb https://github.com/wallabag/wallabag/pull/6869
|
||||
* Fix checkboxes which were broken by @nicosomb https://github.com/wallabag/wallabag/pull/6864
|
||||
|
||||
## [2.6.3](https://github.com/wallabag/wallabag/tree/2.6.3)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.2...2.6.3)
|
||||
|
||||
### Security fixes
|
||||
* Replace GET way to POST way to reset data user by @nicosomb https://github.com/wallabag/wallabag/commit/78b0b55c40511e1f22d5bbb4897aa10fca68441c
|
||||
* Replace GET way to POST way to delete API client by @nicosomb https://github.com/wallabag/wallabag/commit/ffcc5c9062fcc8cd922d7d6d65edbe5efae96806
|
||||
|
||||
### Improvement
|
||||
* Add confirmation before reload entry by @nicosomb https://github.com/wallabag/wallabag/pull/6778
|
||||
* Remove external dependencies on howto page by @viktoriussuwandi https://github.com/wallabag/wallabag/pull/6775
|
||||
|
||||
### Fixes
|
||||
* Use Session instead of Referrer for Redirection by @Spoons https://github.com/wallabag/wallabag/pull/6119
|
||||
* Reduce risk of collision for #content by @kdecherf https://github.com/wallabag/wallabag/pull/6829
|
||||
* Update dependencies to fix vulnerabilities by @nicosomb https://github.com/wallabag/wallabag/pull/6783
|
||||
* Fix failing randomly test by @nicosomb https://github.com/wallabag/wallabag/pull/6763
|
||||
|
||||
### Technical stuff
|
||||
* Add check if git is installed by @nicosomb https://github.com/wallabag/wallabag/pull/6788
|
||||
* Replace kernel.root_dir by kernel.project_dir by @yguedidi https://github.com/wallabag/wallabag/pull/6809
|
||||
* Split symfony/symfony by @yguedidi https://github.com/wallabag/wallabag/pull/6817
|
||||
* Make Crawler::extract get an array by @yguedidi https://github.com/wallabag/wallabag/pull/6812
|
||||
* Use PSR-17 and PSR-18 by @yguedidi https://github.com/wallabag/wallabag/pull/6816
|
||||
* Replace Client by KernelBrowser by @yguedidi https://github.com/wallabag/wallabag/pull/6813
|
||||
* Replace Debug component by ErrorHandler component by @yguedidi https://github.com/wallabag/wallabag/pull/6810
|
||||
* Make ImportController extends AbstractController by @yguedidi https://github.com/wallabag/wallabag/pull/6808
|
||||
* Use Twig instead of templating by @yguedidi https://github.com/wallabag/wallabag/pull/6797
|
||||
* Identify platforms by their class by @yguedidi https://github.com/wallabag/wallabag/pull/6799
|
||||
* Move from transchoice to trans by @yguedidi https://github.com/wallabag/wallabag/pull/6800
|
||||
* Replace GetResponseEvent by RequestEvent by @yguedidi https://github.com/wallabag/wallabag/pull/6811
|
||||
* Ensure the kernel is shut down before calling createClient by @yguedidi https://github.com/wallabag/wallabag/pull/6803
|
||||
* Ignore docker-compose.override.yml by @yguedidi https://github.com/wallabag/wallabag/pull/6814
|
||||
* Add composer normalizer by @nicosomb https://github.com/wallabag/wallabag/pull/6762
|
||||
|
||||
## [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)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.1...2.5.2)
|
||||
|
||||
|
||||
49
GNUmakefile
49
GNUmakefile
@ -11,21 +11,12 @@ else
|
||||
override ENV = prod
|
||||
endif
|
||||
|
||||
DOCKER_COMPOSE_RUNNING := $(shell docker compose ps -q | grep -q . && echo 1 || echo 0)
|
||||
|
||||
ifeq ($(DOCKER_COMPOSE_RUNNING), 1)
|
||||
PHP := docker compose run --rm php php
|
||||
PHP_NO_XDEBUG := docker compose run -e XDEBUG_MODE=off --rm php php
|
||||
YARN := docker compose run --rm php yarn
|
||||
else
|
||||
PHP := php
|
||||
PHP_NO_XDEBUG := XDEBUG_MODE=off php
|
||||
YARN := yarn
|
||||
endif
|
||||
|
||||
help: ## Display this help menu
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
clean: ## Clear the application cache
|
||||
rm -rf var/cache/*
|
||||
|
||||
install: ## Install wallabag with the latest version
|
||||
@./scripts/install.sh $(ENV)
|
||||
|
||||
@ -37,29 +28,25 @@ dev: build ## Install the latest dev version
|
||||
@./scripts/dev.sh
|
||||
|
||||
run: ## Run the wallabag built-in server
|
||||
@$(PHP) bin/console server:run --env=dev
|
||||
@php bin/console server:run --env=dev
|
||||
|
||||
build: ## Run webpack
|
||||
@$(YARN) install
|
||||
@$(YARN) build:$(ENV)
|
||||
@yarn install
|
||||
@yarn build:$(ENV)
|
||||
|
||||
test: ## Launch wallabag testsuite
|
||||
@$(PHP_NO_XDEBUG) -dmemory_limit=-1 bin/phpunit -v
|
||||
prepare: clean ## Prepare database for testsuite
|
||||
ifdef DB
|
||||
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
||||
endif
|
||||
-php bin/console doctrine:database:drop --force --env=test
|
||||
php bin/console doctrine:database:create --env=test
|
||||
php bin/console doctrine:migrations:migrate --no-interaction --env=test
|
||||
|
||||
fix-cs: ## Run PHP-CS-Fixer
|
||||
@$(PHP_NO_XDEBUG) bin/php-cs-fixer fix
|
||||
fixtures: ## Load fixtures into database
|
||||
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
||||
|
||||
phpstan: ## Run PHPStan
|
||||
@$(PHP_NO_XDEBUG) bin/phpstan analyse
|
||||
|
||||
phpstan-baseline: ## Generate PHPStan baseline
|
||||
@$(PHP_NO_XDEBUG) bin/phpstan analyse --generate-baseline
|
||||
|
||||
lint-js: ## Run ESLint
|
||||
@$(YARN) lint:js
|
||||
|
||||
lint-scss: ## Run Stylelint
|
||||
@$(YARN) lint:scss
|
||||
test: prepare fixtures ## Launch wallabag testsuite
|
||||
XDEBUG_MODE=off php -dmemory_limit=-1 bin/simple-phpunit -v
|
||||
|
||||
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
|
||||
ifndef VERSION
|
||||
@ -70,6 +57,6 @@ endif
|
||||
deploy: ## Deploy wallabag
|
||||
@bundle exec cap staging deploy
|
||||
|
||||
.PHONY: help install update build test release deploy run dev fix-cs phpstan
|
||||
.PHONY: help clean prepare install fixtures update build test release deploy run dev
|
||||
|
||||
.DEFAULT_GOAL := install
|
||||
|
||||
11
README.md
11
README.md
@ -1,7 +1,8 @@
|
||||
# wallabag
|
||||
|
||||
[](https://github.com/wallabag/wallabag/actions/workflows/continuous-integration.yml?query=branch%3Amaster)
|
||||
[](https://matrix.to/#/#wallabag:matrix.org)
|
||||

|
||||
[](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=master)
|
||||
[](https://gitter.im/wallabag/wallabag)
|
||||
[](https://liberapay.com/wallabag/donate)
|
||||
[](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)
|
||||
* iOS app: [wallabag/ios-app](https://github.com/wallabag/ios-app)
|
||||
* 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
|
||||
|
||||
@ -55,10 +54,6 @@ To learn more about developing wallabag, please refer to the [contribution guide
|
||||
|
||||
Content extraction relies on [Graby](https://github.com/j0k3r/graby), [php-readability](https://github.com/j0k3r/php-readability) and [ftr-site-config](https://github.com/fivefilters/ftr-site-config).
|
||||
|
||||
## Sponsors
|
||||
|
||||
<img src="https://api.blackfire.io/blackfire-logo.png" alt="Blackfire" width="200" />
|
||||
|
||||
## License
|
||||
Copyright © 2013-current Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
|
||||
#### Prepare the release
|
||||
|
||||
- Update these files with new information
|
||||
- `app/config/wallabag.yml` (`wallabag.version`)
|
||||
- `app/config/wallabag.yml` (`wallabag_core.version`)
|
||||
- `CHANGELOG.md`
|
||||
- Create a PR named "Prepare $LAST_WALLABAG_RELEASE release".
|
||||
- Wait for test to be ok, merge it.
|
||||
@ -17,21 +17,22 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
|
||||
#### 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).
|
||||
- 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)
|
||||
- Put the next patch version suffixed with `-dev` in `app/config/wallabag.yml` (`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:!
|
||||
|
||||
### Target PHP version
|
||||
`composer.lock` is _always_ built for a particular version, by default the one it is generated (with `composer update`).
|
||||
|
||||
If the PHP version used to generate the .lock isn't a widely available one (like latest PHP versions), a more common one should
|
||||
If the PHP version used to generate the .lock isn't a widely available one (like PHP 8), a more common one should
|
||||
be locally specified in `composer.lock`:
|
||||
|
||||
```json
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "8.2.27",
|
||||
"php": "7.4.29",
|
||||
"ext-something": "4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,91 +1,73 @@
|
||||
<?php
|
||||
|
||||
use BabDev\PagerfantaBundle\BabDevPagerfantaBundle;
|
||||
use Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle;
|
||||
use Craue\ConfigBundle\CraueConfigBundle;
|
||||
use DAMA\DoctrineTestBundle\DAMADoctrineTestBundle;
|
||||
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
|
||||
use Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle;
|
||||
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
|
||||
use FOS\JsRoutingBundle\FOSJsRoutingBundle;
|
||||
use FOS\OAuthServerBundle\FOSOAuthServerBundle;
|
||||
use FOS\RestBundle\FOSRestBundle;
|
||||
use FOS\UserBundle\FOSUserBundle;
|
||||
use JMS\SerializerBundle\JMSSerializerBundle;
|
||||
use KPhoen\RulerZBundle\KPhoenRulerZBundle;
|
||||
use Nelmio\ApiDocBundle\NelmioApiDocBundle;
|
||||
use Nelmio\CorsBundle\NelmioCorsBundle;
|
||||
use OldSound\RabbitMqBundle\OldSoundRabbitMqBundle;
|
||||
use Scheb\TwoFactorBundle\SchebTwoFactorBundle;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle;
|
||||
use Sentry\SentryBundle\SentryBundle;
|
||||
use Spiriit\Bundle\FormFilterBundle\SpiriitFormFilterBundle;
|
||||
use Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle;
|
||||
use Symfony\Bundle\DebugBundle\DebugBundle;
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\MakerBundle\MakerBundle;
|
||||
use Symfony\Bundle\MonologBundle\MonologBundle;
|
||||
use Symfony\Bundle\SecurityBundle\SecurityBundle;
|
||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||
use Symfony\Bundle\WebProfilerBundle\WebProfilerBundle;
|
||||
use Symfony\Bundle\WebServerBundle\WebServerBundle;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
|
||||
use Twig\Extra\TwigExtraBundle\TwigExtraBundle;
|
||||
use Wallabag\Import\ImportCompilerPass;
|
||||
|
||||
class AppKernel extends Kernel
|
||||
{
|
||||
public function registerBundles()
|
||||
{
|
||||
$bundles = [
|
||||
new FrameworkBundle(),
|
||||
new SecurityBundle(),
|
||||
new TwigBundle(),
|
||||
new MonologBundle(),
|
||||
new DoctrineBundle(),
|
||||
new SensioFrameworkExtraBundle(),
|
||||
new FOSRestBundle(),
|
||||
new FOSUserBundle(),
|
||||
new JMSSerializerBundle(),
|
||||
new NelmioApiDocBundle(),
|
||||
new NelmioCorsBundle(),
|
||||
new BazingaHateoasBundle(),
|
||||
new SpiriitFormFilterBundle(),
|
||||
new FOSOAuthServerBundle(),
|
||||
new StofDoctrineExtensionsBundle(),
|
||||
new SchebTwoFactorBundle(),
|
||||
new KPhoenRulerZBundle(),
|
||||
new DoctrineMigrationsBundle(),
|
||||
new CraueConfigBundle(),
|
||||
new BabDevPagerfantaBundle(),
|
||||
new FOSJsRoutingBundle(),
|
||||
new OldSoundRabbitMqBundle(),
|
||||
new SentryBundle(),
|
||||
new TwigExtraBundle(),
|
||||
new WebpackEncoreBundle(),
|
||||
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 DebugBundle();
|
||||
$bundles[] = new WebProfilerBundle();
|
||||
$bundles[] = new DoctrineFixturesBundle();
|
||||
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
||||
|
||||
if ('test' === $this->getEnvironment()) {
|
||||
$bundles[] = new DAMADoctrineTestBundle();
|
||||
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
||||
}
|
||||
|
||||
if ('dev' === $this->getEnvironment()) {
|
||||
$bundles[] = new MakerBundle();
|
||||
$bundles[] = new WebServerBundle();
|
||||
$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();
|
||||
@ -98,85 +80,28 @@ class AppKernel extends Kernel
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
$loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
|
||||
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
||||
|
||||
$loader->load(function (ContainerBuilder $container): void {
|
||||
$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);
|
||||
});
|
||||
|
||||
$loader->load(function (ContainerBuilder $container): void {
|
||||
$this->processDatabaseParameters($container);
|
||||
$this->defineRedisUrlEnvVar($container);
|
||||
$this->defineRabbitMqUrlEnvVar($container);
|
||||
});
|
||||
}
|
||||
|
||||
protected function build(ContainerBuilder $container)
|
||||
{
|
||||
$container->addCompilerPass(new ImportCompilerPass());
|
||||
}
|
||||
|
||||
private function processDatabaseParameters(ContainerBuilder $container)
|
||||
{
|
||||
$scheme = match ($container->getParameter('database_driver')) {
|
||||
'pdo_mysql' => 'mysql',
|
||||
'pdo_pgsql' => 'pgsql',
|
||||
'pdo_sqlite' => 'sqlite',
|
||||
default => throw new RuntimeException('Unsupported database driver: ' . $container->getParameter('database_driver')),
|
||||
};
|
||||
|
||||
$container->setParameter('database_scheme', $scheme);
|
||||
|
||||
if ('sqlite' === $scheme) {
|
||||
$container->setParameter('database_name', $container->getParameter('database_path'));
|
||||
}
|
||||
|
||||
$container->setParameter('database_user', (string) $container->getParameter('database_user'));
|
||||
$container->setParameter('database_password', (string) $container->getParameter('database_password'));
|
||||
$container->setParameter('database_port', (string) $container->getParameter('database_port'));
|
||||
$container->setParameter('database_socket', (string) $container->getParameter('database_socket'));
|
||||
}
|
||||
|
||||
private function defineRedisUrlEnvVar(ContainerBuilder $container)
|
||||
{
|
||||
$scheme = $container->getParameter('redis_scheme');
|
||||
$host = $container->getParameter('redis_host');
|
||||
$port = $container->getParameter('redis_port');
|
||||
$path = $container->getParameter('redis_path');
|
||||
$password = $container->getParameter('redis_password');
|
||||
|
||||
$url = $scheme . '://';
|
||||
|
||||
if ($password) {
|
||||
$url .= $password . '@';
|
||||
}
|
||||
|
||||
$url .= $host;
|
||||
|
||||
if ($port) {
|
||||
$url .= ':' . $port;
|
||||
}
|
||||
|
||||
$url .= '/' . ltrim($path, '/');
|
||||
|
||||
$container->setParameter('env(REDIS_URL)', $url);
|
||||
}
|
||||
|
||||
private function defineRabbitMqUrlEnvVar(ContainerBuilder $container)
|
||||
{
|
||||
$host = $container->getParameter('rabbitmq_host');
|
||||
$port = $container->getParameter('rabbitmq_port');
|
||||
$user = $container->getParameter('rabbitmq_user');
|
||||
$password = $container->getParameter('rabbitmq_password');
|
||||
|
||||
$url = 'amqp://' . $user . ':' . $password . '@' . $host;
|
||||
|
||||
if ($port) {
|
||||
$url .= ':' . $port;
|
||||
}
|
||||
|
||||
$container->setParameter('env(RABBITMQ_URL)', $url);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,25 +2,20 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Initial database structure.
|
||||
*/
|
||||
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');
|
||||
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
|
||||
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name);
|
||||
@ -63,7 +58,7 @@ SQL
|
||||
}
|
||||
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('entry')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
@ -96,7 +91,7 @@ SQL
|
||||
$this->addSql($query);
|
||||
}
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
|
||||
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name);
|
||||
@ -169,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('tagging_rule')}");
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added foreign keys for account resetting.
|
||||
*/
|
||||
class Version20160410190541 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
@ -21,15 +21,17 @@ class Version20160410190541 extends WallabagMigration
|
||||
'length' => 23,
|
||||
]);
|
||||
|
||||
$sharePublic = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
||||
$sharePublic = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
||||
|
||||
if (false === $sharePublic) {
|
||||
$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->dropColumn('uid');
|
||||
50
app/DoctrineMigrations/Version20160812120952.php
Normal file
50
app/DoctrineMigrations/Version20160812120952.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added name field on wallabag_oauth2_clients.
|
||||
*/
|
||||
class Version20160812120952 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
$this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.');
|
||||
|
||||
if ('sqlite' === $this->connection->getDatabasePlatform()->getName()) {
|
||||
// Can't use $clientsTable->addColumn('name', 'blob');
|
||||
// because of the error:
|
||||
// SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL
|
||||
$databaseTablePrefix = $this->container->getParameter('database_table_prefix');
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $databaseTablePrefix . 'oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types FROM ' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('DROP TABLE ' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('CREATE TABLE ' . $databaseTablePrefix . 'oauth2_clients (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, name CLOB NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $databaseTablePrefix . 'user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('INSERT INTO ' . $databaseTablePrefix . 'oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types) SELECT id, random_id, redirect_uris, secret, allowed_grant_types FROM __temp__' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('DROP TABLE __temp__' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $databaseTablePrefix . 'oauth2_clients (user_id)');
|
||||
} else {
|
||||
$clientsTable->addColumn('name', 'blob');
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
|
||||
if ('sqlite' === $this->connection->getDatabasePlatform()->getName()) {
|
||||
$databaseTablePrefix = $this->container->getParameter('database_table_prefix');
|
||||
$this->addSql('DROP INDEX IDX_635D765EA76ED395');
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $databaseTablePrefix . 'oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types FROM ' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('DROP TABLE ' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('CREATE TABLE ' . $databaseTablePrefix . 'oauth2_clients (id INTEGER NOT NULL, random_id VARCHAR(255) NOT NULL, secret VARCHAR(255) NOT NULL, redirect_uris CLOB NOT NULL COLLATE BINARY, allowed_grant_types CLOB NOT NULL COLLATE BINARY, PRIMARY KEY(id))');
|
||||
$this->addSql('INSERT INTO ' . $databaseTablePrefix . 'oauth2_clients (id, random_id, redirect_uris, secret, allowed_grant_types) SELECT id, random_id, redirect_uris, secret, allowed_grant_types FROM __temp__' . $databaseTablePrefix . 'oauth2_clients');
|
||||
$this->addSql('DROP TABLE __temp__' . $databaseTablePrefix . 'oauth2_clients');
|
||||
} else {
|
||||
$clientsTable->dropColumn('name');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,24 +3,28 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added settings for RabbitMQ and Redis imports.
|
||||
*/
|
||||
class Version20160911214952 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$redis = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'");
|
||||
$redis = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'");
|
||||
|
||||
if (false === $redis) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_redis', 0, 'import')");
|
||||
}
|
||||
|
||||
$rabbitmq = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'");
|
||||
$rabbitmq = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'");
|
||||
|
||||
if (false === $rabbitmq) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')");
|
||||
@ -29,7 +33,7 @@ class Version20160911214952 extends WallabagMigration
|
||||
$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_rabbitmq';");
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added pocket_consumer_key field on wallabag_config.
|
||||
*/
|
||||
class Version20160916201049 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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';");
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$configTable->dropColumn('pocket_consumer_key');
|
||||
@ -2,45 +2,37 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\Exception\SkipMigration;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added pocket_consumer_key field on wallabag_config.
|
||||
*/
|
||||
class Version20161001072726 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
if ($platform instanceof SqlitePlatform) {
|
||||
$this->write('Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
// remove all FK from entry_tag
|
||||
switch (true) {
|
||||
case $platform instanceof MySQLPlatform:
|
||||
$query = $this->connection->executeQuery("
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'mysql':
|
||||
$query = $this->connection->query("
|
||||
SELECT CONSTRAINT_NAME
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||
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']);
|
||||
}
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
// http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
|
||||
$query = $this->connection->executeQuery("
|
||||
$query = $this->connection->query("
|
||||
SELECT conrelid::regclass AS table_from
|
||||
,conname
|
||||
,pg_get_constraintdef(c.oid)
|
||||
@ -50,8 +42,9 @@ class Version20161001072726 extends WallabagMigration
|
||||
AND conrelid::regclass::text = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
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']);
|
||||
}
|
||||
break;
|
||||
@ -62,9 +55,9 @@ class Version20161001072726 extends WallabagMigration
|
||||
|
||||
// remove entry FK from annotation
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof MySQLPlatform:
|
||||
$query = $this->connection->executeQuery("
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'mysql':
|
||||
$query = $this->connection->query("
|
||||
SELECT CONSTRAINT_NAME
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE TABLE_NAME = '" . $this->getTable('annotation', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
@ -72,14 +65,15 @@ class Version20161001072726 extends WallabagMigration
|
||||
AND COLUMN_NAME = 'entry_id'
|
||||
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']);
|
||||
}
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
// http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
|
||||
$query = $this->connection->executeQuery("
|
||||
$query = $this->connection->query("
|
||||
SELECT conrelid::regclass AS table_from
|
||||
,conname
|
||||
,pg_get_constraintdef(c.oid)
|
||||
@ -90,8 +84,9 @@ class Version20161001072726 extends WallabagMigration
|
||||
AND n.nspname = 'public'
|
||||
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']);
|
||||
}
|
||||
break;
|
||||
@ -100,8 +95,8 @@ 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');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
throw new SkipMigration('Too complex ...');
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
}
|
||||
@ -2,22 +2,17 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Converted database to utf8mb4 encoding (for MySQL only).
|
||||
*/
|
||||
class Version20161022134138 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
|
||||
|
||||
@ -43,13 +38,9 @@ class Version20161022134138 extends WallabagMigration
|
||||
$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)
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
|
||||
@ -13,15 +12,11 @@ class Version20161024212538 extends WallabagMigration
|
||||
{
|
||||
private $constraintName = 'IDX_user_oauth_client';
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
|
||||
if ($clientsTable->hasColumn('user_id')) {
|
||||
$this->write('It seems that you already played this migration.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf($clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.');
|
||||
|
||||
$clientsTable->addColumn('user_id', 'integer', ['notnull' => false]);
|
||||
|
||||
@ -34,19 +29,15 @@ class Version20161024212538 extends WallabagMigration
|
||||
);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||
|
||||
if ($clientsTable->hasColumn('user_id')) {
|
||||
$this->write('It seems that you already played this migration.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf(!$clientsTable->hasColumn('user_id'), 'It seems that you already played this migration.');
|
||||
|
||||
$clientsTable->dropColumn('user_id', 'integer');
|
||||
|
||||
if (!$this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) {
|
||||
$clientsTable->removeForeignKey($this->constraintName);
|
||||
}
|
||||
}
|
||||
@ -3,24 +3,26 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added the internal setting to enable/disable downloading pictures.
|
||||
*/
|
||||
class Version20161031132655 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$images = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'");
|
||||
$images = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->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->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';");
|
||||
}
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added created_at index on entry table.
|
||||
@ -12,7 +12,7 @@ class Version20161104073720 extends WallabagMigration
|
||||
{
|
||||
private $indexName = 'IDX_entry_created_at';
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$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);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added action_mark_as_read field on config table.
|
||||
*/
|
||||
class Version20161106113822 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
|
||||
@ -3,24 +3,28 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added the internal setting to share articles to unmark.it.
|
||||
*/
|
||||
class Version20161117071626 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$share = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
|
||||
$share = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'");
|
||||
|
||||
if (false === $share) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')");
|
||||
}
|
||||
|
||||
$unmark = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
|
||||
$unmark = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'");
|
||||
|
||||
if (false === $unmark) {
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
|
||||
@ -29,7 +33,7 @@ class Version20161117071626 extends WallabagMigration
|
||||
$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 = 'unmark_url';");
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add http_status in `entry_table`.
|
||||
*/
|
||||
class Version20161118134328 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
|
||||
@ -3,24 +3,26 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add the restricted_access internal setting for articles with paywall.
|
||||
*/
|
||||
class Version20161122144743 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$access = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'");
|
||||
$access = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->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->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';");
|
||||
}
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Methods and properties removed from `FOS\UserBundle\Model\User`.
|
||||
@ -18,7 +18,7 @@ use Wallabag\Doctrine\WallabagMigration;
|
||||
*/
|
||||
class Version20161122203647 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$userTable = $schema->getTable($this->getTable('user'));
|
||||
|
||||
@ -28,7 +28,7 @@ class Version20161122203647 extends WallabagMigration
|
||||
$userTable->dropColumn('credentials_expired');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$userTable = $schema->getTable($this->getTable('user'));
|
||||
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added list_mode in user config.
|
||||
*/
|
||||
class Version20161128084725 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$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]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$configTable->dropColumn('list_mode');
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Removed locked, credentials_expire_at and expires_at.
|
||||
@ -16,7 +16,7 @@ class Version20161128131503 extends WallabagMigration
|
||||
'expires_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
|
||||
@ -2,65 +2,50 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Renamed uuid to uid in entry table.
|
||||
*/
|
||||
class Version20161214094402 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
if ($entryTable->hasColumn('uid')) {
|
||||
$this->write('It seems that you already played this migration.');
|
||||
$this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM ' . $this->getTable('entry'));
|
||||
$this->addSql('DROP TABLE ' . $this->getTable('entry'));
|
||||
$this->addSql('CREATE TABLE ' . $this->getTable('entry') . ' (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT "0", PRIMARY KEY(id));');
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('entry') . ' (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry;');
|
||||
$this->addSql('DROP TABLE __temp__wallabag_entry');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uuid uid VARCHAR(23)');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uuid TO uid');
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
if ($entryTable->hasColumn('uuid')) {
|
||||
$this->write('It seems that you already played this migration.');
|
||||
$this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uid uuid VARCHAR(23)');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid');
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added index on wallabag_entry.uid.
|
||||
@ -12,7 +12,7 @@ class Version20161214094403 extends WallabagMigration
|
||||
{
|
||||
private $indexName = 'IDX_entry_uid';
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$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);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* 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 $indexArchivedName = 'IDX_entry_archived';
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$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);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$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.');
|
||||
@ -3,17 +3,19 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add the share_scuttle internal setting.
|
||||
*/
|
||||
class Version20170327194233 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$scuttle = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'");
|
||||
$scuttle = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'");
|
||||
|
||||
$this->skipIf(false !== $scuttle, 'It seems that you already played this migration.');
|
||||
|
||||
@ -21,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')");
|
||||
}
|
||||
|
||||
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 = 'scuttle_url';");
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add published_at and published_by in `entry` table.
|
||||
*/
|
||||
class Version20170405182620 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove isPublic in Entry Table.
|
||||
*/
|
||||
class Version20170407200919 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$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');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
$this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
|
||||
@ -3,22 +3,24 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove download_pictures in craue_config_setting.
|
||||
*/
|
||||
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';");
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$downloadPictures = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'");
|
||||
$downloadPictures = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'");
|
||||
|
||||
$this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.');
|
||||
|
||||
@ -2,16 +2,15 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add site credential table to store username & password for some website (behind authentication or paywall).
|
||||
*/
|
||||
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.');
|
||||
|
||||
@ -26,13 +25,13 @@ class Version20170501115751 extends WallabagMigration
|
||||
$table->setPrimaryKey(['id']);
|
||||
$table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user');
|
||||
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
||||
$schema->dropSequence('site_credential_id_seq');
|
||||
$schema->createSequence('site_credential_id_seq');
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$schema->dropTable($this->getTable('site_credential'));
|
||||
}
|
||||
@ -2,9 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
|
||||
@ -18,26 +17,18 @@ class Version20170510082609 extends WallabagMigration
|
||||
'email_canonical',
|
||||
];
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
foreach ($this->fields as $field) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;');
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
foreach ($this->fields as $field) {
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;');
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added `headers` field in entry table.
|
||||
*/
|
||||
class Version20170511115400 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
|
||||
@ -2,24 +2,19 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\Exception\SkipMigration;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Increase the length of the "quote" column of "annotation" table.
|
||||
*/
|
||||
class Version20170511211659 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$annotationTableName = $this->getTable('annotation', true);
|
||||
$userTableName = $this->getTable('user', true);
|
||||
$entryTableName = $this->getTable('entry', true);
|
||||
@ -27,12 +22,12 @@ class Version20170511211659 extends WallabagMigration
|
||||
$this->addSql(<<<EOD
|
||||
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
||||
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||
FROM {$annotationTableName}
|
||||
FROM ${annotationTableName}
|
||||
EOD
|
||||
);
|
||||
$this->addSql('DROP TABLE ' . $annotationTableName);
|
||||
$this->addSql(<<<EOD
|
||||
CREATE TABLE {$annotationTableName}
|
||||
CREATE TABLE ${annotationTableName}
|
||||
(
|
||||
id INTEGER PRIMARY KEY NOT NULL,
|
||||
user_id INTEGER DEFAULT NULL,
|
||||
@ -42,45 +37,43 @@ CREATE TABLE {$annotationTableName}
|
||||
updated_at DATETIME NOT NULL,
|
||||
quote CLOB NOT NULL,
|
||||
ranges CLOB NOT NULL,
|
||||
CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES {$userTableName} (id),
|
||||
CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES {$entryTableName} (id) ON DELETE CASCADE
|
||||
CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES ${userTableName} (id),
|
||||
CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES ${entryTableName} (id) ON DELETE CASCADE
|
||||
);
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON {$annotationTableName} (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON {$annotationTableName} (entry_id);
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON ${annotationTableName} (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON ${annotationTableName} (entry_id);
|
||||
EOD
|
||||
);
|
||||
|
||||
$this->addSql(<<<EOD
|
||||
INSERT INTO {$annotationTableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
|
||||
INSERT INTO ${annotationTableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
|
||||
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||
FROM __temp__wallabag_annotation;
|
||||
EOD
|
||||
);
|
||||
$this->addSql('DROP TABLE __temp__wallabag_annotation');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$tableName = $this->getTable('annotation');
|
||||
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
throw new SkipMigration('Too complex ...');
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote VARCHAR(255) NOT NULL');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE VARCHAR(255)');
|
||||
break;
|
||||
}
|
||||
@ -3,24 +3,26 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add api_user_registration in craue_config_setting.
|
||||
*/
|
||||
class Version20170602075214 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$apiUserRegistration = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'");
|
||||
$apiUserRegistration = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->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->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';");
|
||||
}
|
||||
30
app/DoctrineMigrations/Version20170606155640.php
Normal file
30
app/DoctrineMigrations/Version20170606155640.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove wallabag_url from craue_config_setting.
|
||||
* It has been moved into the parameters.yml.
|
||||
*/
|
||||
class Version20170606155640 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$apiUserRegistration = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->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->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||
}
|
||||
}
|
||||
@ -2,32 +2,28 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Changed tags to lowercase.
|
||||
*/
|
||||
class Version20170719231144 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
$this->write('Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
// Find tags which need to be merged
|
||||
$dupTags = $this->connection->executeQuery('
|
||||
$dupTags = $this->connection->query('
|
||||
SELECT LOWER(label) AS lower_label
|
||||
FROM ' . $this->getTable('tag') . '
|
||||
GROUP BY LOWER(label)
|
||||
HAVING COUNT(*) > 1'
|
||||
);
|
||||
$dupTags->execute();
|
||||
|
||||
foreach ($dupTags->fetchAllAssociative() as $duplicates) {
|
||||
foreach ($dupTags->fetchAll() as $duplicates) {
|
||||
$label = $duplicates['lower_label'];
|
||||
|
||||
// Retrieve all duplicate tags for a given tag
|
||||
@ -37,7 +33,7 @@ class Version20170719231144 extends WallabagMigration
|
||||
WHERE LOWER(label) = :label
|
||||
ORDER BY id ASC',
|
||||
[
|
||||
'label' => $label,
|
||||
'label' => $label,
|
||||
]
|
||||
);
|
||||
|
||||
@ -45,7 +41,7 @@ class Version20170719231144 extends WallabagMigration
|
||||
$newId = null;
|
||||
$ids = [];
|
||||
|
||||
foreach ($tags->fetchAllAssociative() as $tag) {
|
||||
foreach ($tags->fetchAll() as $tag) {
|
||||
// Ignore the first tag as we use it as the new reference tag
|
||||
if ($first) {
|
||||
$first = false;
|
||||
@ -90,7 +86,7 @@ class Version20170719231144 extends WallabagMigration
|
||||
);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add starred_at column and set its value to updated_at for is_starred entries.
|
||||
*/
|
||||
class Version20170824113337 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
$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'));
|
||||
|
||||
@ -2,54 +2,39 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Changed reading_time field to prevent null value.
|
||||
*/
|
||||
class Version20171008195606 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
if ($platform instanceof SqlitePlatform) {
|
||||
$this->write('Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof MySQLPlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'mysql':
|
||||
$this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time SET NOT NULL;');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
if ($platform instanceof SqlitePlatform) {
|
||||
$this->write('Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof MySQLPlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11);');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time DROP NOT NULL;');
|
||||
break;
|
||||
}
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add origin_url column.
|
||||
*/
|
||||
class Version20171105202000 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
|
||||
@ -3,24 +3,26 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add store_article_headers in craue_config_setting.
|
||||
*/
|
||||
class Version20171120163128 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$storeArticleHeaders = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'");
|
||||
$storeArticleHeaders = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->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->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';");
|
||||
}
|
||||
@ -3,24 +3,26 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add shaarli_share_origin_url in craue_config_setting.
|
||||
*/
|
||||
class Version20171125164500 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$shaarliShareOriginUrl = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'");
|
||||
$shaarliShareOriginUrl = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->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->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';");
|
||||
}
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add archived_at column and set its value to updated_at for is_archived entries.
|
||||
*/
|
||||
class Version20180405182455 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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'));
|
||||
$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'));
|
||||
|
||||
@ -2,22 +2,17 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Fix varchar field from vendor to work with utf8mb4.
|
||||
*/
|
||||
class Version20181128203230 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration can only be applied on \'mysql\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(191)');
|
||||
@ -30,13 +25,9 @@ class Version20181128203230 extends WallabagMigration
|
||||
$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)
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration can only be applied on \'mysql\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(255)');
|
||||
@ -2,11 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add 2fa OTP stuff.
|
||||
@ -15,10 +12,8 @@ final class Version20181202073750 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
|
||||
$this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
|
||||
$this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
|
||||
@ -33,13 +28,13 @@ final class Version20181202073750 extends WallabagMigration
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $this->getTable('user', true) . ' (email_canonical)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $this->getTable('user', true) . ' (username_canonical)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE twoFactorAuthentication emailTwoFactor BOOLEAN NOT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\'');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN twofactorauthentication TO emailTwoFactor');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
|
||||
@ -50,10 +45,8 @@ final class Version20181202073750 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
|
||||
$this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
|
||||
$this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
|
||||
@ -66,13 +59,13 @@ final class Version20181202073750 extends WallabagMigration
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "' . $this->getTable('user', true) . '" (email_canonical)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "' . $this->getTable('user', true) . '" (confirmation_token)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP googleAuthenticatorSecret');
|
||||
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` CHANGE emailtwofactor twoFactorAuthentication BOOLEAN NOT NULL');
|
||||
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` ADD trusted TEXT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP backupCodes');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP googleAuthenticatorSecret');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN emailTwoFactor TO twofactorauthentication');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD trusted TEXT DEFAULT NULL');
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add updated_at fields to site_credential table.
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add missing entries in craue_config_setting.
|
||||
@ -118,11 +118,13 @@ final class Version20190129120000 extends WallabagMigration
|
||||
],
|
||||
];
|
||||
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
foreach ($this->settings as $setting) {
|
||||
$settingEnabled = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
||||
$settingEnabled = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
||||
|
||||
if (false !== $settingEnabled) {
|
||||
continue;
|
||||
@ -132,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.');
|
||||
}
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add hashed_url in entry.
|
||||
*/
|
||||
class Version20190401105353 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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]]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Rename rss_token & rss_limit to feed_token & feed_limit.
|
||||
@ -15,10 +12,8 @@ final class Version20190425115043 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM ' . $this->getTable('config', true));
|
||||
$this->addSql('DROP TABLE ' . $this->getTable('config', true));
|
||||
@ -27,11 +22,11 @@ final class Version20190425115043 extends WallabagMigration
|
||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON ' . $this->getTable('config', true) . ' (user_id)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_token feed_token VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_limit feed_limit INT DEFAULT NULL');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_token TO feed_token');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_limit TO feed_limit');
|
||||
break;
|
||||
@ -40,10 +35,8 @@ final class Version20190425115043 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM "' . $this->getTable('config', true) . '"');
|
||||
$this->addSql('DROP TABLE "' . $this->getTable('config', true) . '"');
|
||||
@ -52,11 +45,11 @@ final class Version20190425115043 extends WallabagMigration
|
||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "' . $this->getTable('config', true) . '" (user_id)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_token rss_token');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_limit rss_limit');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_token TO rss_token');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_limit TO rss_limit');
|
||||
break;
|
||||
@ -2,12 +2,9 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\Exception\SkipMigration;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Enable cascade delete when deleting a user on:
|
||||
@ -20,10 +17,8 @@ final class Version20190510141130 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX IDX_368A4209A76ED395');
|
||||
$this->addSql('DROP INDEX IDX_368A420919EB6921');
|
||||
$this->addSql('DROP INDEX UNIQ_368A42095F37A13B');
|
||||
@ -65,7 +60,7 @@ final class Version20190510141130 extends WallabagMigration
|
||||
$this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)');
|
||||
$this->addSql('CREATE INDEX IDX_EE52E3FA19EB6921 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (client_id)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
|
||||
|
||||
@ -80,7 +75,7 @@ final class Version20190510141130 extends WallabagMigration
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
|
||||
@ -98,6 +93,6 @@ final class Version20190510141130 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
throw new SkipMigration('Too complex ...');
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
}
|
||||
@ -4,9 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Convert tab label to utf8mb4_bin (MySQL only).
|
||||
@ -15,11 +14,7 @@ final class Version20190511165128 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
|
||||
@ -27,11 +22,7 @@ final class Version20190511165128 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$this->write('This migration only apply to MySQL');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||
@ -3,14 +3,14 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added `given_url` & `hashed_given_url` field in entry table.
|
||||
*/
|
||||
class Version20190601125843 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$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]]);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Change reading_time field on SQLite to be integer NOT NULL
|
||||
@ -15,11 +14,7 @@ final class Version20190619093534 extends WallabagMigration
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
if (!$this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
$this->write('Migration can only be executed safely on \'sqlite\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.');
|
||||
|
||||
$this->addSql('UPDATE ' . $this->getTable('entry', true) . ' SET reading_time = 0 WHERE reading_time IS NULL;');
|
||||
|
||||
@ -47,11 +42,7 @@ final class Version20190619093534 extends WallabagMigration
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
if (!$this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
$this->write('Migration can only be executed safely on \'sqlite\'.');
|
||||
|
||||
return;
|
||||
}
|
||||
$this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.');
|
||||
|
||||
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
||||
$this->addSql('DROP INDEX created_at');
|
||||
@ -3,7 +3,7 @@
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Change reading speed value.
|
||||
@ -2,11 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Adding more index to kill some slow queries:
|
||||
@ -21,10 +18,8 @@ final class Version20190806130304 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX uid');
|
||||
$this->addSql('DROP INDEX created_at');
|
||||
$this->addSql('DROP INDEX hashed_url_user_id');
|
||||
@ -49,7 +44,7 @@ final class Version20190806130304 extends WallabagMigration
|
||||
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag', true) . ' (label)');
|
||||
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config', true) . ' (feed_token)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language VARCHAR(20) DEFAULT NULL');
|
||||
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
|
||||
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
|
||||
@ -58,7 +53,7 @@ final class Version20190806130304 extends WallabagMigration
|
||||
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label (255))');
|
||||
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token (255))');
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)');
|
||||
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
|
||||
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
|
||||
@ -72,10 +67,8 @@ final class Version20190806130304 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
||||
$this->addSql('DROP INDEX created_at');
|
||||
$this->addSql('DROP INDEX uid');
|
||||
@ -100,7 +93,7 @@ final class Version20190806130304 extends WallabagMigration
|
||||
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
|
||||
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language LONGTEXT DEFAULT NULL');
|
||||
$this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
|
||||
$this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
|
||||
@ -109,7 +102,7 @@ final class Version20190806130304 extends WallabagMigration
|
||||
$this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
|
||||
$this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT');
|
||||
$this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
|
||||
$this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
|
||||
@ -2,11 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Change the internal setting table name.
|
||||
@ -15,16 +12,14 @@ final class Version20190808124957 extends WallabagMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting', true) . ' RENAME TO ' . $this->getTable('internal_setting', true));
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting'));
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting'));
|
||||
break;
|
||||
}
|
||||
@ -32,16 +27,14 @@ final class Version20190808124957 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$platform = $this->connection->getDatabasePlatform();
|
||||
|
||||
switch (true) {
|
||||
case $platform instanceof SqlitePlatform:
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting', true) . ' RENAME TO ' . $this->getTable('craue_config_setting', true));
|
||||
break;
|
||||
case $platform instanceof MySQLPlatform:
|
||||
case 'mysql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting'));
|
||||
break;
|
||||
case $platform instanceof PostgreSQLPlatform:
|
||||
case 'postgresql':
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting'));
|
||||
break;
|
||||
}
|
||||
@ -4,9 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add tables for the ignore origin rules.
|
||||
@ -24,7 +23,7 @@ final class Version20190826204730 extends WallabagMigration
|
||||
$userTable->setPrimaryKey(['id']);
|
||||
$userTable->addForeignKeyConstraint($this->getTable('config'), ['config_id'], ['id'], [], 'fk_config');
|
||||
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
||||
$schema->dropSequence('ignore_origin_user_rule_id_seq');
|
||||
$schema->createSequence('ignore_origin_user_rule_id_seq');
|
||||
}
|
||||
@ -36,7 +35,7 @@ final class Version20190826204730 extends WallabagMigration
|
||||
$instanceTable->addColumn('rule', 'string', ['length' => 255]);
|
||||
$instanceTable->setPrimaryKey(['id']);
|
||||
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
||||
$schema->dropSequence('ignore_origin_instance_rule_id_seq');
|
||||
$schema->createSequence('ignore_origin_instance_rule_id_seq');
|
||||
}
|
||||
@ -45,12 +44,14 @@ final class Version20190826204730 extends WallabagMigration
|
||||
|
||||
public function postUp(Schema $schema): void
|
||||
{
|
||||
foreach ($this->defaultIgnoreOriginInstanceRules as $entity) {
|
||||
$previous_rule = $this->connection
|
||||
->fetchOne('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
||||
foreach ($this->container->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $entity) {
|
||||
$previous_rule = $this->container
|
||||
->get('doctrine.orm.default_entity_manager')
|
||||
->getConnection()
|
||||
->fetchArray('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
||||
|
||||
if (false === $previous_rule) {
|
||||
$this->connection->executeQuery('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'] . "');");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\Exception\SkipMigration;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove baggy theme.
|
||||
@ -18,6 +18,6 @@ final class Version20200414120227 extends WallabagMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
throw new SkipMigration('Not possible ... ');
|
||||
throw new SkipMigrationException('Not possible ... ');
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\Doctrine\WallabagMigration;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Renamed Piwik to Matomo in configuration.
|
||||
@ -12,6 +12,7 @@ export_epub: Povolit export do ePub
|
||||
export_json: Povolit export do JSON
|
||||
export_csv: Povolit export do CSV
|
||||
export_pdf: Povolit export do PDF
|
||||
export_mobi: Povolit export do .mobi
|
||||
diaspora_url: Adresa URL diaspora*, pokud je služba povolena
|
||||
download_pictures: Stáhnout obrázky na váš server
|
||||
settings_changed: Konfigurace byla aktualizována
|
||||
@ -21,6 +22,8 @@ api_user_registration: Zapnout registraci uživatelů prostřednictvím API
|
||||
restricted_access: Povolit ověřování pro placené webové stránky
|
||||
download_images_enabled: Stahovat obrázky místně
|
||||
share_public: Povolit veřejné adresy URL pro položky
|
||||
demo_mode_username: Ukázkový uživatel
|
||||
demo_mode_enabled: Povolit ukázkový režim (Používá se pouze pro veřejnou ukázku Wallabag)
|
||||
matomo_site_id: ID vaší webové stránky na Matomo
|
||||
matomo_host: Hostitel vaší webové stránky na Matomo (bez http:// nebo https://)
|
||||
modify_settings: použít
|
||||
@ -32,4 +35,3 @@ wallabag_support_url: Adresa URL pro podporu Wallabag
|
||||
show_printlink: Zobrazit odkaz pro vytištění obsahu
|
||||
import_with_redis: Povolit Redis pro asynchronní import dat
|
||||
import_with_rabbitmq: Povolit RabbitMQ pro asynchronní import dat
|
||||
share_linkding: Povolit sdílení na Linkding
|
||||
@ -1,6 +1,7 @@
|
||||
download_pictures: Download billeder på din server
|
||||
diaspora_url: diaspora* URL, hvis tjenesten er aktiv
|
||||
export_epub: Aktiver eksport til ePub
|
||||
export_mobi: Aktiver eksport til .mobi
|
||||
export_pdf: Aktiver eksport til PDF
|
||||
export_csv: Aktiver eksport til CSV
|
||||
export_json: Aktiver eksport til JSON
|
||||
@ -23,3 +24,5 @@ modify_settings: "Gem ændring"
|
||||
matomo_host: Hosting af din side hos Matomo (uden http:// eller https://)
|
||||
matomo_site_id: ID for din side hos Matomo
|
||||
matomo_enabled: Aktiver Matomo
|
||||
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
|
||||
demo_mode_username: "Demobruger"
|
||||
@ -1,7 +1,8 @@
|
||||
settings_changed: Konfiguration aktualisiert
|
||||
download_pictures: Bilder auf deinen Server herunterladen
|
||||
download_pictures: Bilder auf den Server herunterladen
|
||||
diaspora_url: diaspora*-URL, sofern der Service aktiviert ist
|
||||
export_epub: ePUB-Export aktivieren
|
||||
export_mobi: mobi-Export aktivieren
|
||||
export_pdf: PDF-Export aktivieren
|
||||
export_csv: CSV-Export aktivieren
|
||||
export_json: JSON-Export aktivieren
|
||||
@ -18,6 +19,7 @@ share_twitter: Freigabe für Twitter aktivieren
|
||||
share_unmark: Freigabe für Unmark.it aktivieren
|
||||
show_printlink: Link anzeigen, um den Inhalt auszudrucken
|
||||
wallabag_support_url: Support-URL für wallabag
|
||||
wallabag_url: URL von *deiner* wallabag-Instanz
|
||||
entry: Artikel
|
||||
export: Export
|
||||
import: Import
|
||||
@ -26,10 +28,13 @@ modify_settings: Übernehmen
|
||||
matomo_host: Host deiner Webseite in Matomo (ohne http:// oder https://)
|
||||
matomo_site_id: ID deiner Webseite in Matomo
|
||||
matomo_enabled: Matomo aktivieren
|
||||
demo_mode_enabled: Demo-Modus aktivieren? (Wird nur für die öffentliche Wallabag-Demo
|
||||
verwendet)
|
||||
demo_mode_username: Test-Benutzer
|
||||
share_public: Öffentliche URLs für Einträge zulassen
|
||||
download_images_enabled: Bilder lokal herunterladen
|
||||
restricted_access: Authentifizierung für Webseiten mit Paywall aktivieren
|
||||
api_user_registration: Registrierung eines Benutzers über die API ermöglichen
|
||||
store_article_headers: Speichern von HTTP-Headern für jeden Artikel aktivieren
|
||||
shaarli_share_origin_url: Original-URL mit Shaarli teilen, wenn der Service aktiviert ist
|
||||
share_linkding: Freigabe für Linkding aktivieren
|
||||
shaarli_share_origin_url: Original-URL mit Shaarli teilen, wenn der Service aktiviert
|
||||
ist
|
||||
@ -4,6 +4,8 @@ api_user_registration: Ενεργοποίηση εγγραφής χρήστη μ
|
||||
restricted_access: Ενεργοποίηση επαλήθευσης για ιστοσελίδες με paywall
|
||||
download_images_enabled: Λήψη εικόνων τοπικά
|
||||
share_public: Να επιτρέπονται URL για τα άρθρα
|
||||
demo_mode_username: Χρήστης demo
|
||||
demo_mode_enabled: Ενεργοποίηση λειτουργίας demo; (Χρησιμοποιείται μόνο για το δημόσιο demo του wallabag)
|
||||
matomo_enabled: Ενεργοποίηση Matomo
|
||||
matomo_site_id: ID της ιστοσελίδας σας στο Matomo
|
||||
matomo_host: Διεύθυνση της ιστοσελίδας σας στο Matomo (χωρίς http:// ή https://)
|
||||
@ -28,8 +30,8 @@ export_txt: Ενεργοποίηση εξαγωγής TXT
|
||||
export_json: Ενεργοποίηση εξαγωγής JSON
|
||||
export_csv: Ενεργοποίηση εξαγωγής CSV
|
||||
export_pdf: Ενεργοποίηση εξαγωγής PDF
|
||||
export_mobi: Ενεργοποίηση εξαγωγής .mobi
|
||||
export_epub: Ενεργοποίηση εξαγωγής ePub
|
||||
diaspora_url: URL του diaspora*, αν είναι ενεργοποιημένη η υπηρεσία
|
||||
download_pictures: Λήψη των εικόνων στον διακομιστή σας
|
||||
settings_changed: Η ρύθμιση παραμέτρων ενημερώθηκε
|
||||
share_linkding: Ενεργοποίηση κοινοποίησης στο LinkedIn
|
||||
@ -2,6 +2,7 @@ settings_changed: Configuration updated
|
||||
download_pictures: Download pictures onto your server
|
||||
diaspora_url: diaspora* URL, if the service is enabled
|
||||
export_epub: Enable ePub export
|
||||
export_mobi: Enable .mobi export (deprecated, will be removed soon)
|
||||
export_pdf: Enable PDF export
|
||||
export_csv: Enable CSV export
|
||||
export_json: Enable JSON export
|
||||
@ -16,7 +17,6 @@ share_mail: Enable share by e-mail
|
||||
share_shaarli: Enable sharing to Shaarli
|
||||
share_twitter: Enable sharing to Twitter
|
||||
share_unmark: Enable sharing to Unmark.it
|
||||
share_linkding: Enable sharing to Linkding
|
||||
show_printlink: Display a link to print content
|
||||
wallabag_support_url: Support URL for wallabag
|
||||
entry: article
|
||||
@ -27,6 +27,8 @@ modify_settings: apply
|
||||
matomo_host: Host of your website in Matomo (without http:// or https://)
|
||||
matomo_site_id: ID of your website in Matomo
|
||||
matomo_enabled: Enable Matomo
|
||||
demo_mode_enabled: Enable demo mode? (Only used for the public wallabag demo)
|
||||
demo_mode_username: Demo user
|
||||
share_public: Allow public URLs for entries
|
||||
download_images_enabled: Download images locally
|
||||
restricted_access: Enable authentication for paywalled websites
|
||||
@ -2,6 +2,7 @@ settings_changed: Configuración actualizada
|
||||
download_pictures: Descargar imágenes en el servidor
|
||||
diaspora_url: URL de diaspora*, si el servicio está activado
|
||||
export_epub: Activar exportación a ePub
|
||||
export_mobi: Activar exportación a .mobi
|
||||
export_pdf: Activar exportación a PDF
|
||||
export_csv: Activar exportación a CSV
|
||||
export_json: Activar exportación a JSON
|
||||
@ -26,10 +27,11 @@ modify_settings: "guardar"
|
||||
matomo_host: Host de tu website en Matomo (sin http:// o https://)
|
||||
matomo_site_id: ID de tu website en Matomo
|
||||
matomo_enabled: Activar Matomo
|
||||
demo_mode_enabled: "Activar modo demo (sólo usado en la demo pública de wallabag)"
|
||||
demo_mode_username: "Nombre de usuario demo"
|
||||
share_public: Permitir URLs públicas para los artículos
|
||||
download_images_enabled: Descargar imágenes localmente
|
||||
restricted_access: Activar autenticación para websites con paywall
|
||||
api_user_registration: Permitir el registro de usuarios utilizando el API
|
||||
shaarli_share_origin_url: Activar compartir en Shaarli, si el servicio está habilitado
|
||||
store_article_headers: Activar si wallabag almacena encabezados HTTP para cada artículo
|
||||
share_linkding: Habilitar compartir con Linkding
|
||||
@ -0,0 +1,23 @@
|
||||
download_pictures: تصاویر را در کارگزار خودتان باربگیرید
|
||||
diaspora_url: نشانی Diaspora، اگر فعال بود
|
||||
export_epub: فعالسازی برونسپاری به ePub
|
||||
export_mobi: فعالسازی برونسپاری به mobi
|
||||
export_pdf: فعالسازی برونسپاری به PDF
|
||||
export_csv: فعالسازی برونسپاری به CSV
|
||||
export_json: فعالسازی برونسپاری به JSON
|
||||
export_txt: فعالسازی برونسپاری به TXT
|
||||
export_xml: فعالسازی برونسپاری به XML
|
||||
shaarli_url: نشانی Shaarli، اگر فعال بود
|
||||
unmark_url: نشانی Unmark، اگر فعال بود
|
||||
share_diaspora: فعالسازی همرسانی به Diaspora
|
||||
share_mail: فعالسازی همرسانی با ایمیل
|
||||
share_shaarli: فعالسازی همرسانی به Shaarli
|
||||
share_twitter: فعالسازی همرسانی به Twitter
|
||||
share_unmark: فعالسازی همرسانی به Unmark.it
|
||||
show_printlink: نمایش پیوندی برای چاپ مطلب
|
||||
wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag
|
||||
entry: "مقاله"
|
||||
export: "برونسپاری"
|
||||
import: "درونریزی"
|
||||
misc: "غیره"
|
||||
modify_settings: "اعمال"
|
||||
@ -2,6 +2,7 @@ settings_changed: Configuration mise à jour
|
||||
download_pictures: Télécharger les images sur le serveur
|
||||
diaspora_url: URL de diaspora*, si le service est activé
|
||||
export_epub: Activer l'export ePub
|
||||
export_mobi: Activer l'export .mobi (déprécié, sera supprimé prochainement)
|
||||
export_pdf: Activer l'export PDF
|
||||
export_csv: Activer l'export CSV
|
||||
export_json: Activer l'export JSON
|
||||
@ -26,10 +27,11 @@ modify_settings: appliquer
|
||||
matomo_host: URL de votre site dans Matomo (sans http:// ou https://)
|
||||
matomo_site_id: ID de votre site dans Matomo
|
||||
matomo_enabled: Activer Matomo
|
||||
demo_mode_enabled: Activer le mode démo ? (Utiliser uniquement pour la démo publique de wallabag)
|
||||
demo_mode_username: Utilisateur de la démo
|
||||
share_public: Autoriser les URL publiques pour les articles
|
||||
download_images_enabled: Télécharger les images en local
|
||||
restricted_access: Activer l'authentification pour les sites avec paywall
|
||||
api_user_registration: Activer la création de compte depuis l'API
|
||||
store_article_headers: Activer le stockage des en-têtes HTTP de chaque article
|
||||
shaarli_share_origin_url: Activer le partage de l'adresse d'origine vers Shaarli, si le service est activé
|
||||
share_linkding: Activer le partage à Linkding
|
||||
@ -4,6 +4,8 @@ api_user_registration: Activar rexistro de usuarias a través da API
|
||||
restricted_access: Activar autenticación para sitios web con acceso de pagamento
|
||||
download_images_enabled: Descargar imaxes localmente
|
||||
share_public: Permitir URLs públicos para entradas
|
||||
demo_mode_username: Usuaria Demo
|
||||
demo_mode_enabled: Activar modo demostración? (Só se usa na demo pública de wallabag)
|
||||
matomo_enabled: Activar Matomo
|
||||
matomo_site_id: ID do teu sitio web en Matomo
|
||||
matomo_host: Servidor do teu sitio web en Matomo (sen http:// ou https://)
|
||||
@ -12,7 +14,7 @@ misc: varios
|
||||
import: importar
|
||||
export: exportar
|
||||
entry: artigo
|
||||
wallabag_support_url: URL de apoio a wallabag
|
||||
wallabag_support_url: URL de axuda de wallabag
|
||||
show_printlink: Mostrar unha ligazón para imprimir o contido
|
||||
share_unmark: Activar a compartición en Unmark.it
|
||||
share_twitter: Activar a compartición en Twitter
|
||||
@ -28,8 +30,8 @@ export_txt: Activar exportación TXT
|
||||
export_json: Activar exportación JSON
|
||||
export_csv: Activar exportación CSV
|
||||
export_pdf: Activar exportación PDF
|
||||
export_mobi: Activar exportación .mobi (xa non se usa, vai ser eliminada)
|
||||
export_epub: Activar exportación ePub
|
||||
diaspora_url: URL de diaspora*, se o servizo está activo
|
||||
download_pictures: Descargar imaxes no teu servidor
|
||||
settings_changed: Configuración actualizada
|
||||
share_linkding: Activar compartir en Linkding
|
||||
@ -19,6 +19,7 @@ matomo_enabled: Aktiviraj Matomo
|
||||
import_with_redis: Aktiviraj Redis za asinkroni uvoz podataka
|
||||
restricted_access: Aktiviraj autentifikaciju za naplatne web-stranice
|
||||
export_mobi: Aktiviraj .mobi izvoz (zastarjelo, uskoro će se ukloniti)
|
||||
demo_mode_enabled: Aktivirati demo modus? (Koristi se samo za javnu wallabag demonstraciju)
|
||||
diaspora_url: diaspora* URL, ako je usluga aktivirana
|
||||
import_with_rabbitmq: Aktiviraj RabbitMQ za asinkroni uvoz podataka
|
||||
api_user_registration: Aktiviraj korisničku registraciju putem sučelja
|
||||
@ -33,6 +34,6 @@ misc: razno
|
||||
wallabag_support_url: URL podrške za wallabag
|
||||
export_xml: Aktiviraj XML izvoz
|
||||
show_printlink: Za ispis sadržaja, prikaži poveznicu
|
||||
demo_mode_username: Demo korisnik
|
||||
import: uvezi
|
||||
share_public: Dozvoli javne URL-ove za zapise
|
||||
share_linkding: Aktiviraj dijeljenje na Linkding
|
||||
@ -2,6 +2,7 @@ settings_changed: Beállítások frissítve
|
||||
download_pictures: Képek letöltése a kiszolgálóra
|
||||
diaspora_url: diaspora* URL, ha a szolgáltatás engedélyezett
|
||||
export_epub: ePub-ba exportálás engedélyezése
|
||||
export_mobi: .mobi-ba exportálás engedélyezése
|
||||
export_pdf: PDF-be exportálás engedélyezése
|
||||
export_csv: CSV-be exportálás engedélyezése
|
||||
export_json: JSON-ba exportálás engedélyezése
|
||||
@ -26,6 +27,9 @@ modify_settings: alkalmaz
|
||||
piwik_host: Weboldalának hosztja a Piwik-en (http:// vagy https:// nélkül)
|
||||
piwik_site_id: Weboldalának azonosítója (ID-je) a Piwik-en
|
||||
piwik_enabled: Piwik engedélyezése
|
||||
demo_mode_enabled: Engedélyezi a bemutató (demó) módot? (Csak a nyilvános wallabag
|
||||
demóhoz használva)
|
||||
demo_mode_username: Demó felhasználó
|
||||
share_public: Nyilvános URL-ek engedélyezése a bejegyzésekhez
|
||||
download_images_enabled: Képek letöltése helyileg
|
||||
restricted_access: Hitelesítés engedélyezése paywalled weboldalakhoz
|
||||
@ -2,6 +2,7 @@ export_txt: Aktifkan pengeksporan TXT
|
||||
export_json: Aktifkan pengeksporan JSON
|
||||
export_csv: Aktifkan pengeksporan CSV
|
||||
export_pdf: Aktifkan pengeksporan PDF
|
||||
export_mobi: Aktifkan pengeksporan .mobi
|
||||
export_epub: Aktifkan pengeksporan ePub
|
||||
diaspora_url: URL diaspora*, jika layanan diaktifkan
|
||||
settings_changed: Konfigurasi diperbarui
|
||||
@ -10,9 +11,11 @@ shaarli_share_origin_url: Aktifkan berbagi URL asal ke Shaarli, jika layanan dia
|
||||
share_public: Izinkan URL publik untuk entri
|
||||
restricted_access: Aktifkan otentikasi untuk situs web berbayar
|
||||
share_twitter: Aktifkan berbagi ke Twitter
|
||||
demo_mode_enabled: Aktifkan mode demo? (Hanya digunakan untuk demo wallabag publik)
|
||||
download_images_enabled: Unduh gambar secara lokal
|
||||
store_article_headers: Aktifkan jika wallabag menyimpan header HTTP untuk setiap artikel
|
||||
api_user_registration: Aktifkan pendaftaran pengguna melalui API
|
||||
demo_mode_username: Pengguna demo
|
||||
download_pictures: Unduh gambar ke server Anda
|
||||
export_xml: Aktifkan ekspor XML
|
||||
import_with_rabbitmq: Aktifkan RabbitMQ untuk mengimpor data secara asinkron
|
||||
@ -1,6 +1,7 @@
|
||||
download_pictures: Scarica le immagini sul tuo server
|
||||
diaspora_url: URL di diaspora*, se il servizio è abilitato
|
||||
export_epub: Abilita esportazione ePub
|
||||
export_mobi: Abilita esportazione .mobi (deprecato, verrà rimosso presto)
|
||||
export_pdf: Abilita esportazione PDF
|
||||
export_csv: Abilita esportazione CSV
|
||||
export_json: Abilita esportazione JSON
|
||||
@ -15,15 +16,15 @@ share_twitter: Abilita la condivisione con Twitter
|
||||
share_unmark: Abilita la condivisione con Unmark.it
|
||||
show_printlink: Mostra un collegamento per stampare il contenuto
|
||||
wallabag_support_url: URL di supporto per wallabag
|
||||
entry: "articolo"
|
||||
entry: "contenuto"
|
||||
export: "esporta"
|
||||
import: "importa"
|
||||
misc: "varie"
|
||||
misc: "misc"
|
||||
modify_settings: "applica"
|
||||
matomo_host: Host del tuo sito in Matomo (senza http:// o https://)
|
||||
matomo_site_id: ID del tuo sito in Matomo
|
||||
matomo_enabled: Abilita Matomo
|
||||
demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
|
||||
demo_mode_username: "Utente Demo"
|
||||
api_user_registration: Abilita la registrazione dell'utente attraverso l'API
|
||||
settings_changed: Configurazione aggiornata
|
||||
download_images_enabled: Scarica immagini localmente
|
||||
restricted_access: Abilita autenticazione nei siti con paywall
|
||||
@ -2,6 +2,7 @@ settings_changed: 設定を更新しました
|
||||
download_pictures: サーバー上の画像をダウンロード
|
||||
diaspora_url: diaspora* URL、サービスが有効になっている場合
|
||||
export_epub: ePub のエクスポートを有効にする
|
||||
export_mobi: .mobi のエクスポートを有効にする(非推奨、近日中に削除されます)
|
||||
export_pdf: PDF のエクスポートを有効にする
|
||||
export_csv: CSV のエクスポートを有効にする
|
||||
export_json: JSON のエクスポートを有効にする
|
||||
@ -26,6 +27,8 @@ modify_settings: 適用
|
||||
matomo_host: Matomo のウェブサイトのホスト (http:// および https:// なし)
|
||||
matomo_site_id: Matomo でのあなたのウェブサイトの ID
|
||||
matomo_enabled: Matomo を有効にする
|
||||
demo_mode_enabled: デモモードを有効にしますか? (公開 wallabag デモでのみ使用)
|
||||
demo_mode_username: デモユーザー
|
||||
share_public: エントリの公開 URL を許可する
|
||||
download_images_enabled: 画像をローカルにダウンロード
|
||||
restricted_access: ペイウォールのあるウェブサイトへの認証を有効にする
|
||||
@ -5,6 +5,8 @@ api_user_registration: API를 통해 사용자 등록 활성화
|
||||
restricted_access: 유료 웹 사이트에 대한 인증 활성화
|
||||
download_images_enabled: 이미지를 로컬로 다운로드
|
||||
share_public: 항목의 공개 URL 허용
|
||||
demo_mode_username: 데모 사용자
|
||||
demo_mode_enabled: 데모 모드를 사용 하시겠습니까? (공개 Wallabag 데모에만 사용됨)
|
||||
matomo_enabled: Matomo 활성화
|
||||
matomo_site_id: Matomo 웹 사이트 ID
|
||||
matomo_host: Matomo 웹 사이트의 호스트 (http:// 또는 https:// 없음)
|
||||
@ -30,5 +32,6 @@ export_txt: TXT 내보내기 활성화
|
||||
export_json: JSON 내보내기 활성화
|
||||
export_csv: CSV 내보내기 활성화
|
||||
export_pdf: PDF 내보내기 활성화
|
||||
export_mobi: .mobi 내보내기 활성화
|
||||
export_epub: ePub 내보내기 활성화
|
||||
settings_changed: 설정을 업데이트했습니다
|
||||
@ -2,6 +2,7 @@ settings_changed: Oppsett oppdatert
|
||||
download_pictures: Last ned bilder til tjeneren din
|
||||
diaspora_url: diaspora*-nettadresse, hvis tjenesten er avskrudd
|
||||
export_epub: Skru på ePub-eksport
|
||||
export_mobi: Skru på .mobi-eksport
|
||||
export_pdf: Skru på PDF-eksport
|
||||
export_csv: Skru på CSV-eksport
|
||||
export_json: Skru på JSON-eksport
|
||||
@ -25,6 +26,8 @@ modify_settings: bruk
|
||||
piwik_host: Vertskap for din nettside hos Piwik (uten http:// eller https://)
|
||||
piwik_site_id: ID for din nettside hos Piwik
|
||||
piwik_enabled: Skru på Piwik
|
||||
demo_mode_enabled: Skru på demo-modus? (Kun brukt for offentlig wallabag-demo)
|
||||
demo_mode_username: Demo-bruker
|
||||
share_public: Tillat offentlige nettadresser for oppføringer
|
||||
download_images_enabled: Last ned bilder lokalt
|
||||
restricted_access: Skru på identitetsbekreftelse for nettsider med betalingsmur
|
||||
@ -3,9 +3,11 @@ store_article_headers: Schakel het opslaan van HTTP headers voor ieder artikel i
|
||||
api_user_registration: Schakel gebruikersregistratie via API in
|
||||
restricted_access: Schakel authenticatie voor betaalde websites in
|
||||
download_images_enabled: Download afbeelding lokaal
|
||||
demo_mode_username: Demo gebruiker
|
||||
demo_mode_enabled: Schakel demo modus in? (Gebruik dit alleen voor de publieke wallabag demo)
|
||||
matomo_enabled: Schakel Matomo in
|
||||
matomo_site_id: ID van uw Matomo website
|
||||
matomo_host: Adres van jouw Matomo website (zonder http:// of https://)
|
||||
matomo_host: Adres van uw Matomo website (zonder http:// of https://)
|
||||
modify_settings: bevestig
|
||||
misc: overig
|
||||
import: importeer
|
||||
@ -28,9 +30,9 @@ export_txt: Schakel TXT-export in
|
||||
export_json: Schakel JSON-export in
|
||||
export_csv: Schakel CSV-export in
|
||||
export_pdf: Schakel PDF-export in
|
||||
export_mobi: Schakel .mobi-export in
|
||||
export_epub: Schakel ePub-export in
|
||||
download_pictures: Download foto's naar jouw server
|
||||
settings_changed: Instellingen bijgewerkt
|
||||
diaspora_url: diaspora* URL, als de dienst is aangezet
|
||||
share_public: Sta openbare URL's toe voor artikelen
|
||||
share_linkding: Sta delen met Linkding toe
|
||||
share_public: Sta openbare URL's toe voor items
|
||||
@ -2,6 +2,7 @@ settings_changed: Configuracion mesa a jorn
|
||||
download_pictures: Telecargar los imatges sul servidor
|
||||
diaspora_url: URL de diaspora*, se lo servici diaspora* es activat
|
||||
export_epub: Activar l'expòrt ePub
|
||||
export_mobi: Activar l'expòrt .mobi
|
||||
export_pdf: Activar l'expòrt PDF
|
||||
export_csv: Activar l'expòrt CSV
|
||||
export_json: Activar l'expòrt JSON
|
||||
@ -27,10 +28,11 @@ modify_settings: "aplicar"
|
||||
matomo_host: URL de vòstre site dins Matomo (sense http:// o https://)
|
||||
matomo_site_id: ID de vòstre site dins Matomo
|
||||
matomo_enabled: Activar Matomo
|
||||
demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
|
||||
demo_mode_username: "Utilizaire de la demostracion"
|
||||
share_public: Autorizar una URL publica pels articles
|
||||
download_images_enabled: Telecargar los imatges en local
|
||||
restricted_access: Activar l'autenticacion pels sites amb peatge
|
||||
api_user_registration: Autorizar los utilizaires a se marcar amb l'API
|
||||
store_article_headers: Activar se wallabag garda las entèstas HTTP per cada article
|
||||
shaarli_share_origin_url: Activar lo partatge de l’url amb Shaarli, se lo servici es activat
|
||||
share_linkding: Activar lo partiment amb Linkding
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user