forked from wallabag/wallabag
Compare commits
1 Commits
feature/rs
...
2.3.5
| Author | SHA1 | Date | |
|---|---|---|---|
| e292e181b5 |
@ -13,5 +13,5 @@ insert_final_newline = true
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[*akefile]
|
[Makefile]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|||||||
32
.github/CONTRIBUTING.md
vendored
32
.github/CONTRIBUTING.md
vendored
@ -1,41 +1,11 @@
|
|||||||
# How to contribute
|
# How to contribute
|
||||||
|
|
||||||
## Test it locally
|
|
||||||
|
|
||||||
### Using Docker
|
|
||||||
|
|
||||||
- Clone the repository
|
|
||||||
- Ensure your Docker daemon is running
|
|
||||||
- Launch `docker-compose up`
|
|
||||||
|
|
||||||
You'll then have:
|
|
||||||
- a web server (nginx)
|
|
||||||
- a PHP daemon (using FPM)
|
|
||||||
- a Redis database (to handle imports)
|
|
||||||
- a SQLite database to store articles
|
|
||||||
|
|
||||||
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 `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 > 7.1.
|
|
||||||
- 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)
|
|
||||||
- Then `php bin/console wallabag:install`
|
|
||||||
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)
|
|
||||||
- Run `php bin/console server:run`
|
|
||||||
|
|
||||||
You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
|
|
||||||
|
|
||||||
## You found a bug
|
## You found a bug
|
||||||
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).
|
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).
|
||||||
|
|
||||||
To fix the bug quickly, we need some infos: please answer to the questions in the issue form.
|
To fix the bug quickly, we need some infos: please answer to the questions in the issue form.
|
||||||
|
|
||||||
If you have the skills, look for errors into PHP, server and application logs (see `var/logs`).
|
If you have the skills, look for errors into php, server and application (see `var/logs`) logs.
|
||||||
|
|
||||||
Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like.
|
Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like.
|
||||||
|
|
||||||
|
|||||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1,2 +0,0 @@
|
|||||||
# github: [nicosomb, j0k3r, tcitworld, Kdecherf]
|
|
||||||
liberapay: wallabag
|
|
||||||
7
.gitignore
vendored
7
.gitignore
vendored
@ -32,7 +32,6 @@ web/uploads/
|
|||||||
# Build
|
# Build
|
||||||
/app/build
|
/app/build
|
||||||
/build
|
/build
|
||||||
/coverage
|
|
||||||
|
|
||||||
# Composer PHAR
|
# Composer PHAR
|
||||||
/composer.phar
|
/composer.phar
|
||||||
@ -44,6 +43,9 @@ data/db/wallabag*.sqlite
|
|||||||
docker/logs/
|
docker/logs/
|
||||||
docker/data/
|
docker/data/
|
||||||
|
|
||||||
|
# To avoid crazy stuff on some PR, we must manually FORCE ADD IT on each new release
|
||||||
|
composer.lock
|
||||||
|
|
||||||
# assets stuff
|
# assets stuff
|
||||||
node_modules/
|
node_modules/
|
||||||
bin
|
bin
|
||||||
@ -55,6 +57,3 @@ app/Resources/build/
|
|||||||
admin-export.json
|
admin-export.json
|
||||||
specialexport.json
|
specialexport.json
|
||||||
/data/site-credentials-secret-key.txt
|
/data/site-credentials-secret-key.txt
|
||||||
|
|
||||||
# Custom CSS file
|
|
||||||
web/custom.css
|
|
||||||
|
|||||||
65
.travis.yml
65
.travis.yml
@ -1,31 +1,31 @@
|
|||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- mysql
|
|
||||||
- postgresql
|
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
# used for HHVM
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- tidy
|
||||||
|
|
||||||
# cache vendor dirs
|
# cache vendor dirs
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.composer/cache/files
|
- vendor
|
||||||
|
- $HOME/.composer/cache
|
||||||
- node_modules
|
- node_modules
|
||||||
- $HOME/.npm
|
- $HOME/.npm
|
||||||
- $HOME/.yarn-cache
|
- $HOME/.yarn-cache
|
||||||
|
|
||||||
if: |
|
|
||||||
type = pull_request OR \
|
|
||||||
branch = master
|
|
||||||
|
|
||||||
php:
|
php:
|
||||||
|
- 5.6
|
||||||
|
- 7.0
|
||||||
- 7.1
|
- 7.1
|
||||||
- 7.2
|
- 7.2
|
||||||
- 7.3
|
- nightly
|
||||||
- 7.4
|
|
||||||
|
|
||||||
node_js:
|
node_js:
|
||||||
- "5"
|
- "5"
|
||||||
@ -35,11 +35,13 @@ env:
|
|||||||
- DB=pgsql
|
- DB=pgsql
|
||||||
- DB=sqlite
|
- DB=sqlite
|
||||||
|
|
||||||
jobs:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- php: 7.3
|
- php: 7.0
|
||||||
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
||||||
|
allow_failures:
|
||||||
|
- php: nightly
|
||||||
|
|
||||||
# exclude v1 branches
|
# exclude v1 branches
|
||||||
branches:
|
branches:
|
||||||
@ -48,30 +50,39 @@ branches:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
|
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
|
||||||
- PHP=$TRAVIS_PHP_VERSION
|
|
||||||
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
|
||||||
- phpenv config-rm xdebug.ini || echo "xdebug not available"
|
|
||||||
- composer self-update --no-progress
|
|
||||||
# install imagick
|
|
||||||
- pear config-set preferred_state beta
|
|
||||||
- pecl channel-update pecl.php.net
|
|
||||||
- yes | pecl install imagick
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
|
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
|
||||||
- if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
|
- if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
|
||||||
- if [[ $ASSETS = build ]]; then yarn install; fi;
|
- if [[ $ASSETS = build ]]; then yarn install; fi;
|
||||||
- composer install -o --no-interaction --no-progress --prefer-dist --no-suggest
|
|
||||||
- php bin/simple-phpunit install
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- make prepare DB=$DB
|
- PHP=$TRAVIS_PHP_VERSION
|
||||||
- make fixtures
|
- if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
||||||
|
# xdebug isn't enable for PHP 7.1
|
||||||
|
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
||||||
|
- composer self-update --no-progress
|
||||||
|
- if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
||||||
|
# increase swap to avoid "proc_open(): fork failed - Cannot allocate memory"
|
||||||
|
# this should be removed when no more PHP 5 build will be defined
|
||||||
|
- sudo swapon -s
|
||||||
|
- sudo fallocate -l 4G /swapfile
|
||||||
|
- sudo chmod 600 /swapfile
|
||||||
|
- sudo mkswap /swapfile
|
||||||
|
- sudo swapon /swapfile
|
||||||
|
- sudo swapon -s
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- travis_wait bash composer update -o --no-interaction --no-progress --prefer-dist
|
||||||
|
- echo "travis_fold:start:prepare"
|
||||||
|
- make prepare DB=$DB
|
||||||
|
- echo "travis_fold:end:prepare"
|
||||||
|
|
||||||
|
- echo "travis_fold:start:fixtures"
|
||||||
|
- php bin/console doctrine:fixtures:load --no-interaction --env=test
|
||||||
|
- echo "travis_fold:end:fixtures"
|
||||||
|
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
||||||
# PHPStan needs PHPUnit to be installed and cache app to be generated
|
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then php bin/phpstan analyse src tests --no-progress --level 1 ; fi;
|
|
||||||
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
|
||||||
|
|||||||
26
.zappr.yaml
Normal file
26
.zappr.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# see https://zappr.opensource.zalan.do/
|
||||||
|
autobranch: false
|
||||||
|
commit: false
|
||||||
|
approvals:
|
||||||
|
minimum: 1
|
||||||
|
ignore: pr_opener
|
||||||
|
pattern: "^(:\\+1:|👍)$"
|
||||||
|
veto:
|
||||||
|
pattern: "^(:\\-1:|👎)$"
|
||||||
|
from:
|
||||||
|
orgs:
|
||||||
|
- wallabag
|
||||||
|
collaborators: true
|
||||||
|
specification:
|
||||||
|
title:
|
||||||
|
minimum-length:
|
||||||
|
enabled: true
|
||||||
|
length: 8
|
||||||
|
body:
|
||||||
|
minimum-length:
|
||||||
|
enabled: true
|
||||||
|
length: 8
|
||||||
|
contains-url: false
|
||||||
|
contains-issue-number: false
|
||||||
|
template:
|
||||||
|
differs-from-body: true
|
||||||
48
CHANGELOG.md
48
CHANGELOG.md
@ -1,53 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [2.3.8](https://github.com/wallabag/wallabag/tree/2.3.8)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.7...2.3.8)
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
|
|
||||||
- Jump to 2.3.8-dev [#3897](https://github.com/wallabag/wallabag/pull/3897)
|
|
||||||
- material: fix left padding on non-entry pages [#3901](https://github.com/wallabag/wallabag/pull/3901)
|
|
||||||
- Make dev/install/update script posix compatible [#3860](https://github.com/wallabag/wallabag/pull/3860)
|
|
||||||
- epub: fix exception when articles have the same title [#3908](https://github.com/wallabag/wallabag/pull/3908)
|
|
||||||
- Fix PHP warning [#3909](https://github.com/wallabag/wallabag/pull/3909)
|
|
||||||
- Add ability to match many domains for credentials [#3937](https://github.com/wallabag/wallabag/pull/3937)
|
|
||||||
- material: add metadata to list view [#3942](https://github.com/wallabag/wallabag/pull/3942)
|
|
||||||
- Enable no-referrer on img tags, enable strict-origin-when-cross-origin by default [#3943](https://github.com/wallabag/wallabag/pull/3943)
|
|
||||||
- Remove preview picture from share view page#3922
|
|
||||||
- Fix Intl Locale issue [#3964](https://github.com/wallabag/wallabag/pull/3964)
|
|
||||||
|
|
||||||
## [2.3.7](https://github.com/wallabag/wallabag/tree/2.3.7)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.6...2.3.7)
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
|
|
||||||
- Jump to 2.3.7-dev [#3837](https://github.com/wallabag/wallabag/pull/3837)
|
|
||||||
- Fix bad order parameter in the API [#3841](https://github.com/wallabag/wallabag/pull/3841)
|
|
||||||
- Update composer.json to add php-tidy (ext-tidy) [#3853](https://github.com/wallabag/wallabag/pull/3853)
|
|
||||||
- Add dedicated email for site config issue [#3861](https://github.com/wallabag/wallabag/pull/3861)
|
|
||||||
- Fix read & starred status in Pocket import [#3819](https://github.com/wallabag/wallabag/pull/3819)
|
|
||||||
- Fix broken 2 factor auth logo image [#3869](https://github.com/wallabag/wallabag/pull/3869)
|
|
||||||
- Fix CORS for API [#3882](https://github.com/wallabag/wallabag/pull/3882)
|
|
||||||
- Add support of expect parameter to change return object when deleting entry [#3887](https://github.com/wallabag/wallabag/pull/3887)
|
|
||||||
- epub export: fix missing cover image, only for exports of one article [#3886](https://github.com/wallabag/wallabag/pull/3886)
|
|
||||||
- Allow optional --ignore-root-warning [#3885](https://github.com/wallabag/wallabag/pull/3885)
|
|
||||||
- material: fix left padding of content on medium screens [#3893](https://github.com/wallabag/wallabag/pull/3893)
|
|
||||||
- material: hide creation date from card actions on specific sizes [#3894](https://github.com/wallabag/wallabag/pull/3894)
|
|
||||||
|
|
||||||
## [2.3.6](https://github.com/wallabag/wallabag/tree/2.3.6)
|
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.5...2.3.6)
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
|
|
||||||
- Jump to 2.3.6-dev and update release process [#3814](https://github.com/wallabag/wallabag/pull/3814)
|
|
||||||
- Fix tag API leak [#3823](https://github.com/wallabag/wallabag/pull/3823)
|
|
||||||
- Validate imported entry to avoid error on import [#3816](https://github.com/wallabag/wallabag/pull/3816)
|
|
||||||
- Fix incorrect reading time calculation for entries with CJK characters [#3820](https://github.com/wallabag/wallabag/pull/3820)
|
|
||||||
- EntriesExport/epub: replace epub identifier with unique urn [#3827](https://github.com/wallabag/wallabag/pull/3827)
|
|
||||||
- Fix settings field inverted [#3833](https://github.com/wallabag/wallabag/pull/3833)
|
|
||||||
- Cast client id to avoid PG error [#3831](https://github.com/wallabag/wallabag/pull/3831)
|
|
||||||
- Rework of EPUB/PDF exports [#3826](https://github.com/wallabag/wallabag/pull/3826)
|
|
||||||
|
|
||||||
## [2.3.5](https://github.com/wallabag/wallabag/tree/2.3.5)
|
## [2.3.5](https://github.com/wallabag/wallabag/tree/2.3.5)
|
||||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.4...2.3.5)
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.4...2.3.5)
|
||||||
|
|
||||||
|
|||||||
@ -1,76 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as
|
|
||||||
contributors and maintainers pledge to making participation in our project and
|
|
||||||
our community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
||||||
level of experience, education, socio-economic status, nationality, personal
|
|
||||||
appearance, race, religion, or sexual identity and orientation.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment
|
|
||||||
include:
|
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
|
||||||
* Being respectful of differing viewpoints and experiences
|
|
||||||
* Gracefully accepting constructive criticism
|
|
||||||
* Focusing on what is best for the community
|
|
||||||
* Showing empathy towards other community members
|
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
||||||
advances
|
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or electronic
|
|
||||||
address, without explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Our Responsibilities
|
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable
|
|
||||||
behavior and are expected to take appropriate and fair corrective action in
|
|
||||||
response to any instances of unacceptable behavior.
|
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or
|
|
||||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
||||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
||||||
permanently any contributor for other behaviors that they deem inappropriate,
|
|
||||||
threatening, offensive, or harmful.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces
|
|
||||||
when an individual is representing the project or its community. Examples of
|
|
||||||
representing a project or community include using an official project e-mail
|
|
||||||
address, posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event. Representation of a project may be
|
|
||||||
further defined and clarified by project maintainers.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported by contacting the project team at hello@wallabag.org. All
|
|
||||||
complaints will be reviewed and investigated and will result in a response that
|
|
||||||
is deemed necessary and appropriate to the circumstances. The project team is
|
|
||||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
||||||
Further details of specific enforcement policies may be posted separately.
|
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
||||||
faith may face temporary or permanent repercussions as determined by other
|
|
||||||
members of the project's leadership.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
||||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see
|
|
||||||
https://www.contributor-covenant.org/faq
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2013-current Nicolas Lœuillet
|
Copyright (c) 2013-2017 Nicolas Lœuillet
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
15
Capfile
Normal file
15
Capfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
set :deploy_config_path, 'app/config/capistrano/deploy.rb'
|
||||||
|
set :stage_config_path, 'app/config/capistrano/deploy'
|
||||||
|
|
||||||
|
# Load DSL and set up stages
|
||||||
|
require 'capistrano/setup'
|
||||||
|
|
||||||
|
# Include default deployment tasks
|
||||||
|
require 'capistrano/deploy'
|
||||||
|
|
||||||
|
require 'capistrano/composer'
|
||||||
|
require 'capistrano/file-permissions'
|
||||||
|
require 'capistrano/symfony'
|
||||||
|
|
||||||
|
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
||||||
|
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
||||||
13
GNUmakefile
13
GNUmakefile
@ -2,14 +2,7 @@ SHELL=bash
|
|||||||
TMP_FOLDER=/tmp
|
TMP_FOLDER=/tmp
|
||||||
RELEASE_FOLDER=wllbg-release
|
RELEASE_FOLDER=wllbg-release
|
||||||
|
|
||||||
# ensure the ENV variable is well defined
|
ENV ?= prod
|
||||||
AVAILABLE_ENV := prod dev test
|
|
||||||
ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),)
|
|
||||||
# all good
|
|
||||||
else
|
|
||||||
# not good, force it to "prod"
|
|
||||||
override ENV = prod
|
|
||||||
endif
|
|
||||||
|
|
||||||
help: ## Display this help menu
|
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}'
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
@ -23,15 +16,13 @@ install: ## Install wallabag with the latest version
|
|||||||
update: ## Update the wallabag installation to the latest version
|
update: ## Update the wallabag installation to the latest version
|
||||||
@./scripts/update.sh $(ENV)
|
@./scripts/update.sh $(ENV)
|
||||||
|
|
||||||
dev: ENV=dev
|
dev: ## Install the latest dev version
|
||||||
dev: build ## Install the latest dev version
|
|
||||||
@./scripts/dev.sh
|
@./scripts/dev.sh
|
||||||
|
|
||||||
run: ## Run the wallabag built-in server
|
run: ## Run the wallabag built-in server
|
||||||
@php bin/console server:run --env=dev
|
@php bin/console server:run --env=dev
|
||||||
|
|
||||||
build: ## Run webpack
|
build: ## Run webpack
|
||||||
@npm install
|
|
||||||
@npm run build:$(ENV)
|
@npm run build:$(ENV)
|
||||||
|
|
||||||
prepare: clean ## Prepare database for testsuite
|
prepare: clean ## Prepare database for testsuite
|
||||||
|
|||||||
6
Gemfile
Normal file
6
Gemfile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem 'capistrano', '~> 3.4'
|
||||||
|
gem 'capistrano-composer'
|
||||||
|
gem 'capistrano-symfony', '~> 1.0.0.rc1'
|
||||||
|
gem 'capistrano-file-permissions'
|
||||||
37
Gemfile.lock
Normal file
37
Gemfile.lock
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
capistrano (3.4.0)
|
||||||
|
i18n
|
||||||
|
rake (>= 10.0.0)
|
||||||
|
sshkit (~> 1.3)
|
||||||
|
capistrano-composer (0.0.6)
|
||||||
|
capistrano (>= 3.0.0.pre)
|
||||||
|
capistrano-file-permissions (1.0.0)
|
||||||
|
capistrano (~> 3.0)
|
||||||
|
capistrano-symfony (1.0.0.rc1)
|
||||||
|
capistrano (~> 3.1)
|
||||||
|
capistrano-composer (~> 0.0.3)
|
||||||
|
capistrano-file-permissions (~> 1.0)
|
||||||
|
colorize (0.7.7)
|
||||||
|
i18n (0.7.0)
|
||||||
|
net-scp (1.2.1)
|
||||||
|
net-ssh (>= 2.6.5)
|
||||||
|
net-ssh (2.9.2)
|
||||||
|
rake (10.4.2)
|
||||||
|
sshkit (1.7.1)
|
||||||
|
colorize (>= 0.7.0)
|
||||||
|
net-scp (>= 1.1.2)
|
||||||
|
net-ssh (>= 2.8.0)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
capistrano (~> 3.4)
|
||||||
|
capistrano-composer
|
||||||
|
capistrano-file-permissions
|
||||||
|
capistrano-symfony (~> 1.0.0.rc1)
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
1.13.5
|
||||||
@ -19,10 +19,10 @@ Then you can install wallabag by executing the following commands:
|
|||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/wallabag/wallabag.git
|
git clone https://github.com/wallabag/wallabag.git
|
||||||
cd wallabag && make install
|
cd wallabag && make install
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag.
|
Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag.
|
||||||
|
|
||||||
# Run on YunoHost
|
# Run on YunoHost
|
||||||
[](https://install-app.yunohost.org/?app=wallabag2)
|
[](https://install-app.yunohost.org/?app=wallabag2)
|
||||||
@ -30,6 +30,6 @@ Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/v
|
|||||||
Wallabag app for [YunoHost](https://yunohost.org). See [here](https://github.com/YunoHost-Apps/wallabag2_ynh)
|
Wallabag app for [YunoHost](https://yunohost.org). See [here](https://github.com/YunoHost-Apps/wallabag2_ynh)
|
||||||
|
|
||||||
# License
|
# License
|
||||||
Copyright © 2013-current Nicolas Lœuillet <nicolas@loeuillet.org>
|
Copyright © 2013-2018 Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||||
This work is free. You can redistribute it and/or modify it under the
|
This work is free. You can redistribute it and/or modify it under the
|
||||||
terms of the MIT License. See the COPYING file for more details.
|
terms of the MIT License. See the COPYING file for more details.
|
||||||
|
|||||||
@ -22,42 +22,58 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
|
|||||||
git checkout master
|
git checkout master
|
||||||
git pull origin master
|
git pull origin master
|
||||||
git checkout -b release-$LAST_WALLABAG_RELEASE
|
git checkout -b release-$LAST_WALLABAG_RELEASE
|
||||||
composer up
|
SYMFONY_ENV=prod composer up --no-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
- Update `.travis.yml` file and replace the composer line with this one:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
script:
|
||||||
|
- - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
||||||
|
+ - travis_wait bash composer update -o --no-interaction --no-progress --prefer-dist
|
||||||
```
|
```
|
||||||
|
|
||||||
- Then continue with these commands:
|
- Then continue with these commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
git add composer.lock
|
git add --force composer.lock .travis.yml
|
||||||
git commit -m "Release wallabag $LAST_WALLABAG_RELEASE"
|
git commit -m "Release wallabag $LAST_WALLABAG_RELEASE"
|
||||||
git push origin release-$LAST_WALLABAG_RELEASE
|
git push origin release-$LAST_WALLABAG_RELEASE
|
||||||
```
|
```
|
||||||
|
|
||||||
- Create a new pull request with this title `Release wallabag $LAST_WALLABAG_RELEASE`. This pull request is used to launch builds on Travis-CI.
|
- Create a new pull request with this title `DON'T MERGE Release wallabag $LAST_WALLABAG_RELEASE`. This pull request is used to launch builds on Travis-CI.
|
||||||
- Once PR is green, merge it and delete the branch.
|
- Run these command to create the package:
|
||||||
- Run this command to create the package:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
make release VERSION=$LAST_WALLABAG_RELEASE
|
make release VERSION=$LAST_WALLABAG_RELEASE
|
||||||
```
|
```
|
||||||
|
|
||||||
- [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). You have to upload the package (generated previously).
|
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `release-$LAST_WALLABAG_RELEASE` branch. You have to upload the package (generated previously).
|
||||||
- Update the URL shortener (used on `wllbg.org` to update links like `https://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
|
- Close the previously created pull request (**DO NOT MERGE IT**) and delete the `release-$LAST_WALLABAG_RELEASE` branch.
|
||||||
|
- Update the URL shortener (used on `wllbg.org` to generate links like `https://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
|
||||||
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
|
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
|
||||||
- Update wallabag.org website (downloads, MD5 sum, releases and new blog post)
|
- 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`)
|
- Put the next patch version suffixed with `-dev` in `app/config/config.yml` (`wallabag_core.version`)
|
||||||
- Drink a :beer:!
|
- Drink a :beer:!
|
||||||
|
|
||||||
|
### `composer.lock`
|
||||||
|
A release tag must contain a `composer.lock` file. It sets which dependencies were available at the time a release was done,
|
||||||
|
making it easier to fix issues after the release. It also speeds up `composer install` on stable versions a LOT, by skipping the
|
||||||
|
dependencies resolution part.
|
||||||
|
|
||||||
|
Since `composer.lock` is ignored by default, either it must be removed from `.gitignore` _in the release branch_,
|
||||||
|
or it must be added using `git add --force composer.lock`.
|
||||||
|
|
||||||
### Target PHP version
|
### Target PHP version
|
||||||
`composer.lock` is _always_ built for a particular version, by default the one it is generated (with `composer update`).
|
`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 PHP 8), a more common one should
|
If the PHP version used to generate the .lock isn't a widely available one (like PHP 7), a more common one should
|
||||||
be locally specified in `composer.lock`:
|
be locally specified in `composer.lock`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.1.3",
|
"php": "5.5.9",
|
||||||
"ext-something": "4.0"
|
"ext-something": "4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
||||||
use Symfony\Component\HttpKernel\Kernel;
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
|
|
||||||
class AppKernel extends Kernel
|
class AppKernel extends Kernel
|
||||||
@ -33,9 +32,6 @@ class AppKernel extends Kernel
|
|||||||
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
||||||
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
|
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
|
||||||
new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
|
new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
|
||||||
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
|
|
||||||
new Http\HttplugBundle\HttplugBundle(),
|
|
||||||
new Sentry\SentryBundle\SentryBundle(),
|
|
||||||
|
|
||||||
// wallabag bundles
|
// wallabag bundles
|
||||||
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
||||||
@ -43,32 +39,25 @@ class AppKernel extends Kernel
|
|||||||
new Wallabag\UserBundle\WallabagUserBundle(),
|
new Wallabag\UserBundle\WallabagUserBundle(),
|
||||||
new Wallabag\ImportBundle\WallabagImportBundle(),
|
new Wallabag\ImportBundle\WallabagImportBundle(),
|
||||||
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
|
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
|
||||||
|
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
||||||
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||||
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||||
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
||||||
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
||||||
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
||||||
|
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||||
|
|
||||||
if ('test' === $this->getEnvironment()) {
|
if ('test' === $this->getEnvironment()) {
|
||||||
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('dev' === $this->getEnvironment()) {
|
|
||||||
$bundles[] = new Symfony\Bundle\MakerBundle\MakerBundle();
|
|
||||||
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $bundles;
|
return $bundles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRootDir()
|
|
||||||
{
|
|
||||||
return __DIR__;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCacheDir()
|
public function getCacheDir()
|
||||||
{
|
{
|
||||||
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
||||||
@ -81,8 +70,7 @@ class AppKernel extends Kernel
|
|||||||
|
|
||||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||||
{
|
{
|
||||||
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
$loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
|
||||||
|
|
||||||
$loader->load(function ($container) {
|
$loader->load(function ($container) {
|
||||||
if ($container->getParameter('use_webpack_dev_server')) {
|
if ($container->getParameter('use_webpack_dev_server')) {
|
||||||
$container->loadFromExtension('framework', [
|
$container->loadFromExtension('framework', [
|
||||||
@ -98,11 +86,5 @@ class AppKernel extends Kernel
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$loader->load(function (ContainerBuilder $container) {
|
|
||||||
// $container->setParameter('container.autowiring.strict_mode', true);
|
|
||||||
// $container->setParameter('container.dumper.inline_class_loader', true);
|
|
||||||
$container->addObjectResource($this);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20160401000000 extends WallabagMigration
|
class Version20160401000000 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
||||||
@ -164,6 +167,9 @@ SQL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20160410190541 extends WallabagMigration
|
class Version20160410190541 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -31,6 +34,9 @@ class Version20160410190541 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20160812120952 extends WallabagMigration
|
class Version20160812120952 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
@ -31,6 +34,9 @@ class Version20160812120952 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20160911214952 extends WallabagMigration
|
class Version20160911214952 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$redis = $this->container
|
$redis = $this->container
|
||||||
@ -33,6 +36,9 @@ class Version20160911214952 extends WallabagMigration
|
|||||||
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20160916201049 extends WallabagMigration
|
class Version20160916201049 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -20,6 +23,9 @@ class Version20160916201049 extends WallabagMigration
|
|||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
|
|||||||
@ -11,6 +11,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161001072726 extends WallabagMigration
|
class Version20161001072726 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -95,6 +98,9 @@ class Version20161001072726 extends WallabagMigration
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
throw new SkipMigrationException('Too complex ...');
|
throw new SkipMigrationException('Too complex ...');
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161022134138 extends WallabagMigration
|
class Version20161022134138 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
@ -38,6 +41,9 @@ class Version20161022134138 extends WallabagMigration
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|||||||
@ -12,6 +12,9 @@ class Version20161024212538 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
private $constraintName = 'IDX_user_oauth_client';
|
private $constraintName = 'IDX_user_oauth_client';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
@ -29,6 +32,9 @@ class Version20161024212538 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161031132655 extends WallabagMigration
|
class Version20161031132655 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$images = $this->container
|
$images = $this->container
|
||||||
@ -22,6 +25,9 @@ class Version20161031132655 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
||||||
|
|||||||
@ -12,6 +12,9 @@ class Version20161104073720 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
private $indexName = 'IDX_entry_created_at';
|
private $indexName = 'IDX_entry_created_at';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -20,6 +23,9 @@ class Version20161104073720 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['created_at'], $this->indexName);
|
$entryTable->addIndex(['created_at'], $this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161106113822 extends WallabagMigration
|
class Version20161106113822 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -22,6 +25,9 @@ class Version20161106113822 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161117071626 extends WallabagMigration
|
class Version20161117071626 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$share = $this->container
|
$share = $this->container
|
||||||
@ -33,6 +36,9 @@ class Version20161117071626 extends WallabagMigration
|
|||||||
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161118134328 extends WallabagMigration
|
class Version20161118134328 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -22,6 +25,9 @@ class Version20161118134328 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161122144743 extends WallabagMigration
|
class Version20161122144743 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$access = $this->container
|
$access = $this->container
|
||||||
@ -22,6 +25,9 @@ class Version20161122144743 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
||||||
|
|||||||
@ -18,6 +18,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161122203647 extends WallabagMigration
|
class Version20161122203647 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
@ -28,6 +31,9 @@ class Version20161122203647 extends WallabagMigration
|
|||||||
$userTable->dropColumn('credentials_expired');
|
$userTable->dropColumn('credentials_expired');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161128084725 extends WallabagMigration
|
class Version20161128084725 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -18,6 +21,9 @@ class Version20161128084725 extends WallabagMigration
|
|||||||
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
|
|||||||
@ -16,6 +16,9 @@ class Version20161128131503 extends WallabagMigration
|
|||||||
'expires_at' => 'datetime',
|
'expires_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
@ -26,6 +29,9 @@ class Version20161128131503 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20161214094402 extends WallabagMigration
|
class Version20161214094402 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -32,6 +35,9 @@ class Version20161214094402 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -12,6 +12,9 @@ class Version20161214094403 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
private $indexName = 'IDX_entry_uid';
|
private $indexName = 'IDX_entry_uid';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -20,6 +23,9 @@ class Version20161214094403 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['uid'], $this->indexName);
|
$entryTable->addIndex(['uid'], $this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -13,6 +13,9 @@ class Version20170127093841 extends WallabagMigration
|
|||||||
private $indexStarredName = 'IDX_entry_starred';
|
private $indexStarredName = 'IDX_entry_starred';
|
||||||
private $indexArchivedName = 'IDX_entry_archived';
|
private $indexArchivedName = 'IDX_entry_archived';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -22,6 +25,9 @@ class Version20170127093841 extends WallabagMigration
|
|||||||
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170327194233 extends WallabagMigration
|
class Version20170327194233 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$scuttle = $this->container
|
$scuttle = $this->container
|
||||||
@ -23,6 +26,9 @@ class Version20170327194233 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170405182620 extends WallabagMigration
|
class Version20170405182620 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -27,6 +30,9 @@ class Version20170405182620 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170407200919 extends WallabagMigration
|
class Version20170407200919 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -18,6 +21,9 @@ class Version20170407200919 extends WallabagMigration
|
|||||||
$entryTable->dropColumn('is_public');
|
$entryTable->dropColumn('is_public');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,11 +10,17 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170420134133 extends WallabagMigration
|
class Version20170420134133 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$downloadPictures = $this->container
|
$downloadPictures = $this->container
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170501115751 extends WallabagMigration
|
class Version20170501115751 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
||||||
@ -31,6 +34,9 @@ class Version20170501115751 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$schema->dropTable($this->getTable('site_credential'));
|
$schema->dropTable($this->getTable('site_credential'));
|
||||||
|
|||||||
@ -17,6 +17,9 @@ class Version20170510082609 extends WallabagMigration
|
|||||||
'email_canonical',
|
'email_canonical',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
@ -26,6 +29,9 @@ class Version20170510082609 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170511115400 extends WallabagMigration
|
class Version20170511115400 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -21,6 +24,9 @@ class Version20170511115400 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -13,21 +13,19 @@ class Version20170511211659 extends WallabagMigration
|
|||||||
{
|
{
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
|
$tableName = $this->getTable('annotation');
|
||||||
|
|
||||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
$annotationTableName = $this->getTable('annotation', true);
|
|
||||||
$userTableName = $this->getTable('user', true);
|
|
||||||
$entryTableName = $this->getTable('entry', true);
|
|
||||||
|
|
||||||
$this->addSql(<<<EOD
|
$this->addSql(<<<EOD
|
||||||
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
||||||
SELECT 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 ${annotationTableName}
|
FROM ${tableName}
|
||||||
EOD
|
EOD
|
||||||
);
|
);
|
||||||
$this->addSql('DROP TABLE ' . $annotationTableName);
|
$this->addSql('DROP TABLE ' . $tableName);
|
||||||
$this->addSql(<<<EOD
|
$this->addSql(<<<EOD
|
||||||
CREATE TABLE ${annotationTableName}
|
CREATE TABLE ${tableName}
|
||||||
(
|
(
|
||||||
id INTEGER PRIMARY KEY NOT NULL,
|
id INTEGER PRIMARY KEY NOT NULL,
|
||||||
user_id INTEGER DEFAULT NULL,
|
user_id INTEGER DEFAULT NULL,
|
||||||
@ -37,16 +35,16 @@ CREATE TABLE ${annotationTableName}
|
|||||||
updated_at DATETIME NOT NULL,
|
updated_at DATETIME NOT NULL,
|
||||||
quote CLOB NOT NULL,
|
quote CLOB NOT NULL,
|
||||||
ranges CLOB NOT NULL,
|
ranges CLOB NOT NULL,
|
||||||
CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES ${userTableName} (id),
|
CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES wallabag_user (id),
|
||||||
CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES ${entryTableName} (id) ON DELETE CASCADE
|
CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
CREATE INDEX IDX_A7AED006A76ED395 ON ${annotationTableName} (user_id);
|
CREATE INDEX IDX_A7AED006A76ED395 ON wallabag_annotation (user_id);
|
||||||
CREATE INDEX IDX_A7AED006BA364942 ON ${annotationTableName} (entry_id);
|
CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id);
|
||||||
EOD
|
EOD
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->addSql(<<<EOD
|
$this->addSql(<<<EOD
|
||||||
INSERT INTO ${annotationTableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
|
INSERT INTO ${tableName} (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
|
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||||
FROM __temp__wallabag_annotation;
|
FROM __temp__wallabag_annotation;
|
||||||
EOD
|
EOD
|
||||||
@ -54,10 +52,10 @@ EOD
|
|||||||
$this->addSql('DROP TABLE __temp__wallabag_annotation');
|
$this->addSql('DROP TABLE __temp__wallabag_annotation');
|
||||||
break;
|
break;
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL');
|
$this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote TEXT NOT NULL');
|
||||||
break;
|
break;
|
||||||
case 'postgresql':
|
case 'postgresql':
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT');
|
$this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE TEXT');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170602075214 extends WallabagMigration
|
class Version20170602075214 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$apiUserRegistration = $this->container
|
$apiUserRegistration = $this->container
|
||||||
@ -22,6 +25,9 @@ class Version20170602075214 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
||||||
|
|||||||
@ -11,6 +11,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170606155640 extends WallabagMigration
|
class Version20170606155640 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$apiUserRegistration = $this->container
|
$apiUserRegistration = $this->container
|
||||||
@ -23,6 +26,9 @@ class Version20170606155640 extends WallabagMigration
|
|||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170719231144 extends WallabagMigration
|
class Version20170719231144 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -86,6 +89,9 @@ class Version20170719231144 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
throw new SkipMigrationException('Too complex ...');
|
throw new SkipMigrationException('Too complex ...');
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20170824113337 extends WallabagMigration
|
class Version20170824113337 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -34,6 +37,9 @@ class Version20170824113337 extends WallabagMigration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20171008195606 extends WallabagMigration
|
class Version20171008195606 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -26,6 +29,9 @@ class Version20171008195606 extends WallabagMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20171105202000 extends WallabagMigration
|
class Version20171105202000 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -21,6 +24,9 @@ class Version20171105202000 extends WallabagMigration
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20171120163128 extends WallabagMigration
|
class Version20171120163128 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$storeArticleHeaders = $this->container
|
$storeArticleHeaders = $this->container
|
||||||
@ -22,6 +25,9 @@ class Version20171120163128 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
||||||
|
|||||||
@ -10,6 +10,9 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|||||||
*/
|
*/
|
||||||
class Version20171125164500 extends WallabagMigration
|
class Version20171125164500 extends WallabagMigration
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$shaarliShareOriginUrl = $this->container
|
$shaarliShareOriginUrl = $this->container
|
||||||
@ -22,6 +25,9 @@ class Version20171125164500 extends WallabagMigration
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Schema $schema
|
||||||
|
*/
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add archived_at column and set its value to updated_at for is_archived entries.
|
|
||||||
*/
|
|
||||||
class Version20180405182455 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
|
|
||||||
$this->skipIf($entryTable->hasColumn('archived_at'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$entryTable->addColumn('archived_at', 'datetime', [
|
|
||||||
'notnull' => false,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function postUp(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum');
|
|
||||||
|
|
||||||
$this->connection->executeQuery(
|
|
||||||
'UPDATE ' . $this->getTable('entry') . ' SET archived_at = updated_at WHERE is_archived = :is_archived',
|
|
||||||
[
|
|
||||||
'is_archived' => true,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
|
|
||||||
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$entryTable->dropColumn('archived_at');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fix varchar field from vendor to work with utf8mb4.
|
|
||||||
*/
|
|
||||||
class Version20181128203230 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema)
|
|
||||||
{
|
|
||||||
$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)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(191) NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(191)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(191)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(191)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(191)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema)
|
|
||||||
{
|
|
||||||
$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)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(255) NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(255)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(255)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(255)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(255)');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(255)');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add 2fa OTP stuff.
|
|
||||||
*/
|
|
||||||
final class Version20181202073750 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
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');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM ' . $this->getTable('user', true) . '');
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('user', true) . '');
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('user', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL COLLATE BINARY, username_canonical VARCHAR(180) NOT NULL COLLATE BINARY, email VARCHAR(180) NOT NULL COLLATE BINARY, email_canonical VARCHAR(180) NOT NULL COLLATE BINARY, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, emailTwoFactor BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array)
|
|
||||||
, googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json_array)
|
|
||||||
)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('user', true) . ' (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM __temp__' . $this->getTable('user', true) . '');
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $this->getTable('user', true) . ' (confirmation_token)');
|
|
||||||
$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 '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 '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');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes TEXT DEFAULT NULL');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
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');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor FROM "' . $this->getTable('user', true) . '"');
|
|
||||||
$this->addSql('DROP TABLE "' . $this->getTable('user', true) . '"');
|
|
||||||
$this->addSql('CREATE TABLE "' . $this->getTable('user', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, salt VARCHAR(255) NOT NULL COLLATE BINARY, confirmation_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, roles CLOB NOT NULL COLLATE BINARY, trusted CLOB DEFAULT NULL COLLATE BINARY)');
|
|
||||||
$this->addSql('INSERT INTO "' . $this->getTable('user', true) . '" (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor FROM __temp__' . $this->getTable('user', true) . '');
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
|
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON "' . $this->getTable('user', true) . '" (username_canonical)');
|
|
||||||
$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 '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 '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');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP backupCodes');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add updated_at fields to site_credential table.
|
|
||||||
*/
|
|
||||||
final class Version20190117131816 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
$siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
|
|
||||||
|
|
||||||
$this->skipIf($siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$siteCredentialTable->addColumn('updated_at', 'datetime', [
|
|
||||||
'notnull' => false,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
|
|
||||||
|
|
||||||
$this->skipIf(!$siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$siteCredentialTable->dropColumn('updated_at');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,141 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add missing entries in craue_config_setting.
|
|
||||||
*/
|
|
||||||
final class Version20190129120000 extends WallabagMigration
|
|
||||||
{
|
|
||||||
private $settings = [
|
|
||||||
[
|
|
||||||
'name' => 'carrot',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'share_diaspora',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'diaspora_url',
|
|
||||||
'value' => 'http://diasporapod.com',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'share_shaarli',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'shaarli_url',
|
|
||||||
'value' => 'http://myshaarli.com',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'share_mail',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'share_twitter',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'show_printlink',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'entry',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_epub',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_mobi',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_pdf',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_csv',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_json',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_txt',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'export_xml',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'export',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'piwik_enabled',
|
|
||||||
'value' => '0',
|
|
||||||
'section' => 'analytics',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'piwik_host',
|
|
||||||
'value' => 'v2.wallabag.org',
|
|
||||||
'section' => 'analytics',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'piwik_site_id',
|
|
||||||
'value' => '1',
|
|
||||||
'section' => 'analytics',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'demo_mode_enabled',
|
|
||||||
'value' => '0',
|
|
||||||
'section' => 'misc',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'demo_mode_username',
|
|
||||||
'value' => 'wallabag',
|
|
||||||
'section' => 'misc',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'wallabag_support_url',
|
|
||||||
'value' => 'https://www.wallabag.org/pages/support.html',
|
|
||||||
'section' => 'misc',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
public function up(Schema $schema)
|
|
||||||
{
|
|
||||||
foreach ($this->settings as $setting) {
|
|
||||||
$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;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('" . $setting['name'] . "', '" . $setting['value'] . "', '" . $setting['section'] . "');");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema)
|
|
||||||
{
|
|
||||||
$this->skipIf(true, 'These settings are required and should not be removed.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add hashed_url in entry.
|
|
||||||
*/
|
|
||||||
class Version20190401105353 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
|
|
||||||
$this->skipIf($entryTable->hasColumn('hashed_url'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$entryTable->addColumn('hashed_url', 'text', [
|
|
||||||
'length' => 40,
|
|
||||||
'notnull' => false,
|
|
||||||
]);
|
|
||||||
|
|
||||||
$entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
|
|
||||||
$this->skipIf(!$entryTable->hasColumn('hashed_url'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$entryTable->dropIndex('hashed_url_user_id');
|
|
||||||
$entryTable->dropColumn('hashed_url');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rename rss_token & rss_limit to feed_token & feed_limit.
|
|
||||||
*/
|
|
||||||
final class Version20190425115043 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
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));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('config', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL COLLATE BINARY, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL COLLATE BINARY, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, feed_token VARCHAR(255) DEFAULT NULL, feed_limit INTEGER DEFAULT NULL, CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('user', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('config', true) . ' (id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) 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 __temp__' . $this->getTable('config', true));
|
|
||||||
$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 '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 '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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
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) . '"');
|
|
||||||
$this->addSql('CREATE TABLE "' . $this->getTable('config', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL)');
|
|
||||||
$this->addSql('INSERT INTO "' . $this->getTable('config', true) . '" (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) 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 __temp__' . $this->getTable('config', true));
|
|
||||||
$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 '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 '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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable cascade delete when deleting a user on:
|
|
||||||
* - oauth2_access_tokens
|
|
||||||
* - oauth2_clients
|
|
||||||
* - oauth2_refresh_tokens
|
|
||||||
* - oauth2_auth_codes.
|
|
||||||
*/
|
|
||||||
final class Version20190510141130 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
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');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_access_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_access_tokens', true));
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_access_tokens', true));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_access_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_access_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_access_tokens', true));
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_access_tokens', true));
|
|
||||||
$this->addSql('CREATE INDEX IDX_368A4209A76ED395 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (user_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_368A420919EB6921 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (client_id)');
|
|
||||||
|
|
||||||
$this->addSql('DROP INDEX IDX_635D765EA76ED395');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_clients', true) . ' AS SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM ' . $this->getTable('oauth2_clients', true));
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_clients', true));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_clients', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, name CLOB NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_clients', true) . ' (id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name) SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM __temp__' . $this->getTable('oauth2_clients', true));
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_clients', true));
|
|
||||||
$this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $this->getTable('oauth2_clients', true) . ' (user_id)');
|
|
||||||
|
|
||||||
$this->addSql('DROP INDEX IDX_20C9FB24A76ED395');
|
|
||||||
$this->addSql('DROP INDEX IDX_20C9FB2419EB6921');
|
|
||||||
$this->addSql('DROP INDEX UNIQ_20C9FB245F37A13B');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_refresh_tokens', true));
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_refresh_tokens', true));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_refresh_tokens', true));
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true));
|
|
||||||
$this->addSql('CREATE INDEX IDX_20C9FB24A76ED395 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (user_id)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_20C9FB2419EB6921 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (client_id)');
|
|
||||||
|
|
||||||
$this->addSql('DROP INDEX IDX_EE52E3FAA76ED395');
|
|
||||||
$this->addSql('DROP INDEX IDX_EE52E3FA19EB6921');
|
|
||||||
$this->addSql('DROP INDEX UNIQ_EE52E3FA5F37A13B');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_auth_codes', true) . ' AS SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM ' . $this->getTable('oauth2_auth_codes', true));
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_auth_codes', true));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_auth_codes', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, redirect_uri CLOB NOT NULL COLLATE BINARY, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_auth_codes', true) . ' (id, client_id, user_id, token, redirect_uri, expires_at, scope) SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM __temp__' . $this->getTable('oauth2_auth_codes', true));
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_auth_codes', true));
|
|
||||||
$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 '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');
|
|
||||||
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP FOREIGN KEY IDX_user_oauth_client');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id)');
|
|
||||||
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP FOREIGN KEY FK_20C9FB24A76ED395');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
|
|
||||||
|
|
||||||
$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 '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');
|
|
||||||
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP CONSTRAINT idx_user_oauth_client');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP CONSTRAINT FK_20C9FB24A76ED395');
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP CONSTRAINT 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 NOT DEFERRABLE INITIALLY IMMEDIATE');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
throw new SkipMigrationException('Too complex ...');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert tab label to utf8mb4_bin (MySQL only).
|
|
||||||
*/
|
|
||||||
final class Version20190511165128 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
$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;');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$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;');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Added `given_url` & `hashed_given_url` field in entry table.
|
|
||||||
*/
|
|
||||||
class Version20190601125843 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
|
|
||||||
if (!$entryTable->hasColumn('given_url')) {
|
|
||||||
$entryTable->addColumn('given_url', 'text', [
|
|
||||||
'notnull' => false,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$entryTable->hasColumn('hashed_given_url')) {
|
|
||||||
$entryTable->addColumn('hashed_given_url', 'text', [
|
|
||||||
'length' => 40,
|
|
||||||
'notnull' => false,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 40 = length of sha1 field hashed_given_url
|
|
||||||
$entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema)
|
|
||||||
{
|
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
|
||||||
|
|
||||||
if ($entryTable->hasColumn('given_url')) {
|
|
||||||
$entryTable->dropColumn('given_url');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($entryTable->hasColumn('hashed_given_url')) {
|
|
||||||
$entryTable->dropColumn('hashed_given_url');
|
|
||||||
}
|
|
||||||
|
|
||||||
$entryTable->dropIndex('hashed_given_url_user_id');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Change reading_time field on SQLite to be integer NOT NULL
|
|
||||||
* It was forgotten in a previous migration (Version20171008195606.php).
|
|
||||||
*/
|
|
||||||
final class Version20190619093534 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
|
||||||
$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;');
|
|
||||||
|
|
||||||
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
|
||||||
$this->addSql('DROP INDEX IDX_entry_uid');
|
|
||||||
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
|
||||||
$this->addSql('DROP INDEX IDX_entry_created_at');
|
|
||||||
$this->addSql('DROP INDEX IDX_entry_starred');
|
|
||||||
$this->addSql('DROP INDEX IDX_entry_archived');
|
|
||||||
$this->addSql('DROP INDEX hashed_url_user_id');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('entry', true) . ' AS SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url FROM ' . $this->getTable('entry', true) . '');
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('entry', true) . '');
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, 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, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, uid VARCHAR(23) DEFAULT NULL COLLATE BINARY, http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, origin_url CLOB DEFAULT NULL COLLATE BINARY, archived_at DATETIME DEFAULT NULL, given_url CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER NOT NULL, published_by CLOB DEFAULT NULL --(DC2Type:array)
|
|
||||||
, headers CLOB DEFAULT NULL --(DC2Type:array)
|
|
||||||
, hashed_url VARCHAR(40) DEFAULT NULL, hashed_given_url VARCHAR(40) DEFAULT NULL, CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('user', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url) SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url FROM __temp__' . $this->getTable('entry', true) . '');
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('entry', true) . '');
|
|
||||||
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
|
|
||||||
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
|
|
||||||
$this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
|
|
||||||
$this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
// this down() migration is auto-generated, please modify it to your needs
|
|
||||||
$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');
|
|
||||||
$this->addSql('DROP INDEX uid');
|
|
||||||
$this->addSql('DROP INDEX hashed_url_user_id');
|
|
||||||
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('entry', true) . ' AS SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM "' . $this->getTable('entry', true) . '"');
|
|
||||||
$this->addSql('DROP TABLE "' . $this->getTable('entry', true) . '"');
|
|
||||||
$this->addSql('CREATE TABLE "' . $this->getTable('entry', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, origin_url CLOB DEFAULT NULL, given_url CLOB DEFAULT NULL, is_archived BOOLEAN NOT NULL, archived_at DATETIME DEFAULT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, mimetype CLOB DEFAULT NULL, language CLOB DEFAULT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, http_status VARCHAR(3) DEFAULT NULL, hashed_url CLOB DEFAULT NULL COLLATE BINARY, hashed_given_url CLOB DEFAULT NULL COLLATE BINARY, published_by CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, headers CLOB DEFAULT NULL COLLATE BINARY)');
|
|
||||||
$this->addSql('INSERT INTO "' . $this->getTable('entry', true) . '" (id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers) SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM __temp__' . $this->getTable('entry', true) . '');
|
|
||||||
$this->addSql('DROP TABLE __temp__' . $this->getTable('entry', true) . '');
|
|
||||||
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON "' . $this->getTable('entry', true) . '" (user_id)');
|
|
||||||
$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)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_entry_starred ON "' . $this->getTable('entry', true) . '" (is_starred)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_entry_archived ON "' . $this->getTable('entry', true) . '" (is_archived)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_entry_uid ON "' . $this->getTable('entry', true) . '" (uid)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_entry_created_at ON "' . $this->getTable('entry', true) . '" (created_at)');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Change reading speed value.
|
|
||||||
*/
|
|
||||||
final class Version20190708122957 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('config', true) . ' SET reading_speed = reading_speed*200');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('config', true) . ' SET reading_speed = reading_speed/200');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,116 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adding more index to kill some slow queries:
|
|
||||||
* - user_language
|
|
||||||
* - user_archived
|
|
||||||
* - user_created
|
|
||||||
* - user_starred
|
|
||||||
* - tag_label
|
|
||||||
* - config_feed_token.
|
|
||||||
*/
|
|
||||||
final class Version20190806130304 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
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');
|
|
||||||
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
|
||||||
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url FROM ' . $this->getTable('entry', true));
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('entry', true));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, 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, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, uid VARCHAR(23) DEFAULT NULL COLLATE BINARY, http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, origin_url CLOB DEFAULT NULL COLLATE BINARY, archived_at DATETIME DEFAULT NULL, given_url CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER NOT NULL, published_by CLOB DEFAULT NULL COLLATE BINARY --(DC2Type:array)
|
|
||||||
, headers CLOB DEFAULT NULL COLLATE BINARY --(DC2Type:array)
|
|
||||||
, hashed_url VARCHAR(40) DEFAULT NULL COLLATE BINARY, hashed_given_url VARCHAR(40) DEFAULT NULL COLLATE BINARY, language VARCHAR(20) DEFAULT NULL, CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url) SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url FROM __temp__wallabag_entry');
|
|
||||||
$this->addSql('DROP TABLE __temp__wallabag_entry');
|
|
||||||
$this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
|
|
||||||
$this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
|
|
||||||
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
|
|
||||||
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
|
|
||||||
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
|
|
||||||
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry', true) . ' (language, user_id)');
|
|
||||||
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry', true) . ' (user_id, is_archived, archived_at)');
|
|
||||||
$this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry', true) . ' (user_id, created_at)');
|
|
||||||
$this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry', true) . ' (user_id, is_starred, starred_at)');
|
|
||||||
$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 '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)');
|
|
||||||
$this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry') . ' (user_id, created_at)');
|
|
||||||
$this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)');
|
|
||||||
$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 '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)');
|
|
||||||
$this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry') . ' (user_id, created_at)');
|
|
||||||
$this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)');
|
|
||||||
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label)');
|
|
||||||
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token)');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
|
||||||
case 'sqlite':
|
|
||||||
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
|
||||||
$this->addSql('DROP INDEX created_at');
|
|
||||||
$this->addSql('DROP INDEX uid');
|
|
||||||
$this->addSql('DROP INDEX hashed_url_user_id');
|
|
||||||
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
|
||||||
$this->addSql('DROP INDEX user_language');
|
|
||||||
$this->addSql('DROP INDEX user_archived');
|
|
||||||
$this->addSql('DROP INDEX user_created');
|
|
||||||
$this->addSql('DROP INDEX user_starred');
|
|
||||||
$this->addSql('DROP INDEX tag_label');
|
|
||||||
$this->addSql('DROP INDEX config_feed_token');
|
|
||||||
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM ' . $this->getTable('entry', true));
|
|
||||||
$this->addSql('DROP TABLE ' . $this->getTable('entry', true));
|
|
||||||
$this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, hashed_url VARCHAR(40) DEFAULT NULL, origin_url CLOB DEFAULT NULL, given_url CLOB DEFAULT NULL, hashed_given_url VARCHAR(40) DEFAULT NULL, is_archived BOOLEAN NOT NULL, archived_at DATETIME DEFAULT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, published_at DATETIME DEFAULT NULL, published_by CLOB DEFAULT NULL --(DC2Type:array)
|
|
||||||
, starred_at DATETIME DEFAULT NULL, mimetype CLOB DEFAULT NULL, reading_time INTEGER NOT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, http_status VARCHAR(3) DEFAULT NULL, headers CLOB DEFAULT NULL --(DC2Type:array)
|
|
||||||
, language CLOB DEFAULT NULL COLLATE BINARY)');
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers) SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM __temp__wallabag_entry');
|
|
||||||
$this->addSql('DROP TABLE __temp__wallabag_entry');
|
|
||||||
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
|
|
||||||
$this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
|
|
||||||
$this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
|
|
||||||
$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 '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'));
|
|
||||||
$this->addSql('DROP INDEX user_created ON ' . $this->getTable('entry'));
|
|
||||||
$this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry'));
|
|
||||||
$this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
|
|
||||||
$this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
|
|
||||||
break;
|
|
||||||
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'));
|
|
||||||
$this->addSql('DROP INDEX user_created ON ' . $this->getTable('entry'));
|
|
||||||
$this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry'));
|
|
||||||
$this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
|
|
||||||
$this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Change the internal setting table name.
|
|
||||||
*/
|
|
||||||
final class Version20190808124957 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
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 'mysql':
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting'));
|
|
||||||
break;
|
|
||||||
case 'postgresql':
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting'));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
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 'mysql':
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting'));
|
|
||||||
break;
|
|
||||||
case 'postgresql':
|
|
||||||
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting'));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add tables for the ignore origin rules.
|
|
||||||
*/
|
|
||||||
final class Version20190826204730 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
if (false === $schema->hasTable($this->getTable('ignore_origin_user_rule'))) {
|
|
||||||
$userTable = $schema->createTable($this->getTable('ignore_origin_user_rule', true));
|
|
||||||
$userTable->addColumn('id', 'integer', ['autoincrement' => true]);
|
|
||||||
$userTable->addColumn('config_id', 'integer');
|
|
||||||
$userTable->addColumn('rule', 'string', ['length' => 255]);
|
|
||||||
$userTable->addIndex(['config_id'], 'idx_config');
|
|
||||||
$userTable->setPrimaryKey(['id']);
|
|
||||||
$userTable->addForeignKeyConstraint($this->getTable('config'), ['config_id'], ['id'], [], 'fk_config');
|
|
||||||
|
|
||||||
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
|
||||||
$schema->dropSequence('ignore_origin_user_rule_id_seq');
|
|
||||||
$schema->createSequence('ignore_origin_user_rule_id_seq');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (false === $schema->hasTable($this->getTable('ignore_origin_instance_rule'))) {
|
|
||||||
$instanceTable = $schema->createTable($this->getTable('ignore_origin_instance_rule', true));
|
|
||||||
$instanceTable->addColumn('id', 'integer', ['autoincrement' => true]);
|
|
||||||
$instanceTable->addColumn('rule', 'string', ['length' => 255]);
|
|
||||||
$instanceTable->setPrimaryKey(['id']);
|
|
||||||
|
|
||||||
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
|
||||||
$schema->dropSequence('ignore_origin_instance_rule_id_seq');
|
|
||||||
$schema->createSequence('ignore_origin_instance_rule_id_seq');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function postUp(Schema $schema): void
|
|
||||||
{
|
|
||||||
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->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$schema->dropTable($this->getTable('ignore_origin_user_rule'));
|
|
||||||
$schema->dropTable($this->getTable('ignore_origin_instance_rule'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Application\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renamed Piwik to Matomo in configuration.
|
|
||||||
*/
|
|
||||||
final class Version20200428072628 extends WallabagMigration
|
|
||||||
{
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_enabled' where name = 'piwik_enabled';");
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_host' where name = 'piwik_host';");
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_site_id' where name = 'piwik_site_id';");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_enabled' where name = 'matomo_enabled';");
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_host' where name = 'matomo_host';");
|
|
||||||
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_site_id' where name = 'matomo_site_id';");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -27,9 +27,9 @@ export: "eksport"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "Gem ændring"
|
modify_settings: "Gem ændring"
|
||||||
matomo_host: Hosting af din side hos Matomo (uden http:// eller https://)
|
piwik_host: Hosting af din side hos Piwik (uden http:// eller https://)
|
||||||
matomo_site_id: ID for din side hos Matomo
|
piwik_site_id: ID for din side hos Piwik
|
||||||
matomo_enabled: Aktiver Matomo
|
piwik_enabled: Aktiver Piwik
|
||||||
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
|
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
|
||||||
demo_mode_username: "Demobruger"
|
demo_mode_username: "Demobruger"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: 'Export'
|
|||||||
import: 'Import'
|
import: 'Import'
|
||||||
misc: 'Verschiedenes'
|
misc: 'Verschiedenes'
|
||||||
modify_settings: 'Übernehmen'
|
modify_settings: 'Übernehmen'
|
||||||
matomo_host: 'Host deiner Webseite in Matomo (ohne http:// oder https://)'
|
piwik_host: 'Host deiner Webseite in Piwik (ohne http:// oder https://)'
|
||||||
matomo_site_id: 'ID deiner Webseite in Matomo'
|
piwik_site_id: 'ID deiner Webseite in Piwik'
|
||||||
matomo_enabled: 'Matomo aktivieren'
|
piwik_enabled: 'Piwik aktivieren'
|
||||||
demo_mode_enabled: 'Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)'
|
demo_mode_enabled: 'Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)'
|
||||||
demo_mode_username: 'Test-Benutzer'
|
demo_mode_username: 'Test-Benutzer'
|
||||||
share_public: 'Erlaube eine öffentliche URL für Einträge'
|
share_public: 'Erlaube eine öffentliche URL für Einträge'
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "export"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "apply"
|
modify_settings: "apply"
|
||||||
matomo_host: Host of your website in Matomo (without http:// or https://)
|
piwik_host: Host of your website in Piwik (without http:// or https://)
|
||||||
matomo_site_id: ID of your website in Matomo
|
piwik_site_id: ID of your website in Piwik
|
||||||
matomo_enabled: Enable Matomo
|
piwik_enabled: Enable Piwik
|
||||||
demo_mode_enabled: "Enable demo mode? (Only used for the public wallabag demo)"
|
demo_mode_enabled: "Enable demo mode? (Only used for the public wallabag demo)"
|
||||||
demo_mode_username: "Demo user"
|
demo_mode_username: "Demo user"
|
||||||
share_public: Allow public URL for entries
|
share_public: Allow public URL for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "exportar"
|
|||||||
import: "importar"
|
import: "importar"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "guardar"
|
modify_settings: "guardar"
|
||||||
matomo_host: Host de tu website en Matomo (sin http:// o https://)
|
piwik_host: Host de tu website en Piwik (sin http:// o https://)
|
||||||
matomo_site_id: ID de tu website en Matomo
|
piwik_site_id: ID de tu website en Piwik
|
||||||
matomo_enabled: Activar Matomo
|
piwik_enabled: Activar Piwik
|
||||||
demo_mode_enabled: "Activar modo demo (sólo usado en la demo pública de wallabag)"
|
demo_mode_enabled: "Activar modo demo (sólo usado en la demo pública de wallabag)"
|
||||||
demo_mode_username: "Nombre de usuario demo"
|
demo_mode_username: "Nombre de usuario demo"
|
||||||
share_public: Permitir URL pública para los artículos
|
share_public: Permitir URL pública para los artículos
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "برونسپاری"
|
|||||||
import: "درونریزی"
|
import: "درونریزی"
|
||||||
misc: "غیره"
|
misc: "غیره"
|
||||||
modify_settings: "اعمال"
|
modify_settings: "اعمال"
|
||||||
# matomo_host: Host of your website in Matomo (without http:// or https://)
|
# piwik_host: Host of your website in Piwik (without http:// or https://)
|
||||||
# matomo_site_id: ID of your website in Matomo
|
# piwik_site_id: ID of your website in Piwik
|
||||||
# matomo_enabled: Enable Matomo
|
# piwik_enabled: Enable Piwik
|
||||||
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
# demo_mode_username: "Demo user"
|
# demo_mode_username: "Demo user"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "export"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "divers"
|
misc: "divers"
|
||||||
modify_settings: "appliquer"
|
modify_settings: "appliquer"
|
||||||
matomo_host: URL de votre site dans Matomo (sans http:// ou https://)
|
piwik_host: URL de votre site dans Piwik (sans http:// ou https://)
|
||||||
matomo_site_id: ID de votre site dans Matomo
|
piwik_site_id: ID de votre site dans Piwik
|
||||||
matomo_enabled: Activer Matomo
|
piwik_enabled: Activer Piwik
|
||||||
demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
|
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"
|
demo_mode_username: "Utilisateur de la démo"
|
||||||
share_public: Autoriser une URL publique pour les articles
|
share_public: Autoriser une URL publique pour les articles
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "esporta"
|
|||||||
import: "importa"
|
import: "importa"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "applica"
|
modify_settings: "applica"
|
||||||
matomo_host: Host del tuo sito in Matomo (senza http:// o https://)
|
piwik_host: Host del tuo sito in Piwik (senza http:// o https://)
|
||||||
matomo_site_id: ID del tuo sito in Matomo
|
piwik_site_id: ID del tuo sito in Piwik
|
||||||
matomo_enabled: Abilita Matomo
|
piwik_enabled: Abilita Piwik
|
||||||
demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
|
demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
|
||||||
demo_mode_username: "Utente Demo"
|
demo_mode_username: "Utente Demo"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -1,40 +0,0 @@
|
|||||||
settings_changed: 構成が更新されました
|
|
||||||
download_pictures: 画像をあなたのサーバにダウンロード
|
|
||||||
carrot: Carrot への共有を有効にする
|
|
||||||
diaspora_url: diaspora* URL、サービスが有効な場合
|
|
||||||
export_epub: ePub 形式でのエクスポートを有効にする
|
|
||||||
export_mobi: .mobi 形式でのエクスポートを有効にする
|
|
||||||
export_pdf: PDF 形式でのエクスポートを有効にする
|
|
||||||
export_csv: CSV 形式でのエクスポートを有効にする
|
|
||||||
export_json: JSON 形式でのエクスポートを有効にする
|
|
||||||
export_txt: TXT 形式でのエクスポートを有効にする
|
|
||||||
export_xml: XML 形式でのエクスポートを有効にする
|
|
||||||
import_with_rabbitmq: データを非同期的にインポートする RabbitMQ を有効にする
|
|
||||||
import_with_redis: データを非同期的にインポートする Redis を有効にする
|
|
||||||
shaarli_url: Shaarli URL、サービスが有効な場合
|
|
||||||
scuttle_url: Scuttle URL、サービスが有効な場合
|
|
||||||
unmark_url: Unmark URL、サービスが有効な場合
|
|
||||||
share_diaspora: diaspora* への共有を有効にする
|
|
||||||
share_mail: 電子メールでの共有を有効にする
|
|
||||||
share_shaarli: Shaarli への共有を有効にする
|
|
||||||
share_scuttle: Scuttle への共有を有効にする
|
|
||||||
share_twitter: Twitter への共有を有効にする
|
|
||||||
share_unmark: Unmark.it への共有を有効にする
|
|
||||||
show_printlink: コンテンツを印刷するためのリンクを表示する
|
|
||||||
wallabag_support_url: Wallabag のサポート URL
|
|
||||||
entry: "記事"
|
|
||||||
export: "エクスポート"
|
|
||||||
import: "インポート"
|
|
||||||
misc: "misc"
|
|
||||||
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: ペイウォールウェブサイトの認証を有効にする
|
|
||||||
api_user_registration: API を使用してユーザーを登録できるようにする
|
|
||||||
store_article_headers: 各記事の HTTP ヘッダーを Wallabag が格納する場合に有効にする
|
|
||||||
shaarli_share_origin_url: サービスが有効になっている場合、Shaarli へのオリジン URL の共有を有効にする
|
|
||||||
@ -27,9 +27,9 @@ export: "expòrt"
|
|||||||
import: "impòrt"
|
import: "impòrt"
|
||||||
misc: "divèrs"
|
misc: "divèrs"
|
||||||
modify_settings: "aplicar"
|
modify_settings: "aplicar"
|
||||||
matomo_host: URL de vòstre site dins Matomo (sense http:// o https://)
|
piwik_host: URL de vòstre site dins Piwik (sense http:// o https://)
|
||||||
matomo_site_id: ID de vòstre site dins Matomo
|
piwik_site_id: ID de vòstre site dins Piwik
|
||||||
matomo_enabled: Activar Matomo
|
piwik_enabled: Activar Piwik
|
||||||
demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
|
demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
|
||||||
demo_mode_username: "Utilizaire de la demostracion"
|
demo_mode_username: "Utilizaire de la demostracion"
|
||||||
share_public: Autorizar una URL publica pels articles
|
share_public: Autorizar una URL publica pels articles
|
||||||
|
|||||||
@ -26,9 +26,9 @@ export: "eksport"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "różne"
|
misc: "różne"
|
||||||
modify_settings: "zatwierdź"
|
modify_settings: "zatwierdź"
|
||||||
matomo_host: Host twojej strony Matomo (bez http:// lub https://)
|
piwik_host: Host twojej strony Piwik (bez http:// lub https://)
|
||||||
matomo_site_id: ID twojej strony Matomo
|
piwik_site_id: ID twojej strony Piwik
|
||||||
matomo_enabled: Włacz Matomo
|
piwik_enabled: Włacz Piwik
|
||||||
demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
|
demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
|
||||||
demo_mode_username: "Użytkownik Demonstracyjny"
|
demo_mode_username: "Użytkownik Demonstracyjny"
|
||||||
share_public: Zezwalaj na publiczny adres url dla wpisow
|
share_public: Zezwalaj na publiczny adres url dla wpisow
|
||||||
|
|||||||
@ -28,9 +28,9 @@ export: "exportar"
|
|||||||
import: "importar"
|
import: "importar"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "aplicar"
|
modify_settings: "aplicar"
|
||||||
matomo_host: Host de seu website Matomo
|
piwik_host: Host de seu website Piwik
|
||||||
matomo_site_id: ID de seu website Matomo
|
piwik_site_id: ID de seu website Piwik
|
||||||
matomo_enabled: Habilitar Matomo
|
piwik_enabled: Habilitar Piwik
|
||||||
demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)"
|
demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)"
|
||||||
demo_mode_username: "Usuário demo"
|
demo_mode_username: "Usuário demo"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "exportă"
|
|||||||
import: "importă"
|
import: "importă"
|
||||||
misc: "diverse"
|
misc: "diverse"
|
||||||
modify_settings: "aplică"
|
modify_settings: "aplică"
|
||||||
# matomo_host: Host of your website in Matomo (without http:// or https://)
|
# piwik_host: Host of your website in Piwik (without http:// or https://)
|
||||||
# matomo_site_id: ID of your website in Matomo
|
# piwik_site_id: ID of your website in Piwik
|
||||||
# matomo_enabled: Enable Matomo
|
# piwik_enabled: Enable Piwik
|
||||||
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
# demo_mode_username: "Demo user"
|
# demo_mode_username: "Demo user"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "экспорт"
|
|||||||
import: "импорт"
|
import: "импорт"
|
||||||
misc: "разное"
|
misc: "разное"
|
||||||
modify_settings: "применить"
|
modify_settings: "применить"
|
||||||
matomo_host: "Ссылка на Ваш сайт на Matomo (с http:// или https://)"
|
piwik_host: "Ссылка на Ваш сайт на Piwik (с http:// или https://)"
|
||||||
matomo_site_id: "ID Вашего сайта на Matomo"
|
piwik_site_id: "ID Вашего сайта на Piwik"
|
||||||
matomo_enabled: "Включить Matomo"
|
piwik_enabled: "Включить Piwik"
|
||||||
demo_mode_enabled: "Включить демо режим ? (только для публичной демонстрации wallabag)"
|
demo_mode_enabled: "Включить демо режим ? (только для публичной демонстрации wallabag)"
|
||||||
demo_mode_username: "Демо пользователь"
|
demo_mode_username: "Демо пользователь"
|
||||||
share_public: "Разрешить публичные ссылки на записи"
|
share_public: "Разрешить публичные ссылки на записи"
|
||||||
|
|||||||
@ -25,9 +25,9 @@ export: "นำข้อมูลออก"
|
|||||||
import: "นำเข้าข้อมูล"
|
import: "นำเข้าข้อมูล"
|
||||||
misc: "เบ็ดเตล็ด"
|
misc: "เบ็ดเตล็ด"
|
||||||
modify_settings: "ปรับใช้"
|
modify_settings: "ปรับใช้"
|
||||||
matomo_host: โฮสบนเว็บไซต์ของคุณใน Matomo (ยกเว้น http:// หรือ https://)
|
piwik_host: โฮสบนเว็บไซต์ของคุณใน Piwik (ยกเว้น http:// หรือ https://)
|
||||||
matomo_site_id: ไอดีบนเว็บไซต์ของคุณใน Matomo
|
piwik_site_id: ไอดีบนเว็บไซต์ของคุณใน Piwik
|
||||||
matomo_enabled: เปิดการใช้ Matomo
|
piwik_enabled: เปิดการใช้ Piwik
|
||||||
demo_mode_enabled: "เปิดการใช้งานโหมดเดโม ? (เฉพาะการใช้สำหรับเดโมสาธารณะของ wallabag)"
|
demo_mode_enabled: "เปิดการใช้งานโหมดเดโม ? (เฉพาะการใช้สำหรับเดโมสาธารณะของ wallabag)"
|
||||||
demo_mode_username: "ผู้ใช้ส่วนเดโม"
|
demo_mode_username: "ผู้ใช้ส่วนเดโม"
|
||||||
share_public: ยอมรับ URL สาธารณะจากการเข้าถึงข้อมูล
|
share_public: ยอมรับ URL สาธารณะจากการเข้าถึงข้อมูล
|
||||||
|
|||||||
@ -28,9 +28,9 @@
|
|||||||
# import: "import"
|
# import: "import"
|
||||||
# misc: "misc"
|
# misc: "misc"
|
||||||
# modify_settings: "apply"
|
# modify_settings: "apply"
|
||||||
# matomo_host: Host of your website in Matomo (without http:// or https://)
|
# piwik_host: Host of your website in Piwik (without http:// or https://)
|
||||||
# matomo_site_id: ID of your website in Matomo
|
# piwik_site_id: ID of your website in Piwik
|
||||||
# matomo_enabled: Enable Matomo
|
# piwik_enabled: Enable Piwik
|
||||||
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
# demo_mode_username: "Demo user"
|
# demo_mode_username: "Demo user"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -1,40 +0,0 @@
|
|||||||
settings_changed: 配置已更新
|
|
||||||
download_pictures: 在你的服务器上缓存图片
|
|
||||||
carrot: 启用分享到 Carrot
|
|
||||||
diaspora_url: diaspora* 链接,如果该服务已被启用
|
|
||||||
export_epub: 启用 ePub 导出
|
|
||||||
export_mobi: 启用 .mobi 导出
|
|
||||||
export_pdf: 启用 PDF 导出
|
|
||||||
export_csv: 启用 CSV 导出
|
|
||||||
export_json: 启用 JSON 导出
|
|
||||||
export_txt: 启用 TXT 导出
|
|
||||||
export_xml: 启用 XML 导出
|
|
||||||
import_with_rabbitmq: 启用 RabbitMQ 来异步导入数据
|
|
||||||
import_with_redis: 启用 Redis 来异步导入数据
|
|
||||||
shaarli_url: Shaarli 链接,如果该服务已被启用
|
|
||||||
scuttle_url: Scuttle 链接,如果该服务已被启用
|
|
||||||
unmark_url: Unmark 链接,如果该服务已被启用
|
|
||||||
share_diaspora: 启用分享到 diaspora*
|
|
||||||
share_mail: 启用邮件分享
|
|
||||||
share_shaarli: 启用分享到 Shaarli
|
|
||||||
share_scuttle: 启用分享到 Scuttle
|
|
||||||
share_twitter: 启用分享到 Twitter
|
|
||||||
share_unmark: 启用分享到 Unmark.it
|
|
||||||
show_printlink: 展示一个用于打印内容的链接
|
|
||||||
wallabag_support_url: wallabag 的支持链接
|
|
||||||
entry: "文章"
|
|
||||||
export: "导出"
|
|
||||||
import: "导入"
|
|
||||||
misc: "杂项"
|
|
||||||
modify_settings: "申请"
|
|
||||||
matomo_host: 你的网站在 Matomo 的主机名(不包括 http:// or https://)
|
|
||||||
matomo_site_id: 你的网站在 Matomo 的 ID
|
|
||||||
matomo_enabled: 启用 Matomo
|
|
||||||
demo_mode_enabled: "启用演示模式?(仅用于 wallabag 公开演示)"
|
|
||||||
demo_mode_username: "Demo user"
|
|
||||||
share_public: 允许为项目启用公开链接
|
|
||||||
download_images_enabled: 在本地缓存图片
|
|
||||||
restricted_access: 启用针对带有付费墙网站的认证
|
|
||||||
api_user_registration: 允许新用户通过 API 注册
|
|
||||||
store_article_headers: 让 wallabag 存储每篇文章的 HTTP header
|
|
||||||
shaarli_share_origin_url: 选择分享原始链接到 Shaarli,如果该服务已被启用
|
|
||||||
@ -4,9 +4,6 @@ import $ from 'jquery';
|
|||||||
/* Annotations */
|
/* Annotations */
|
||||||
import annotator from 'annotator';
|
import annotator from 'annotator';
|
||||||
|
|
||||||
import ClipboardJS from 'clipboard';
|
|
||||||
import 'mathjax/es5/tex-svg';
|
|
||||||
|
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
||||||
import 'lato-font/css/lato-font.css';
|
import 'lato-font/css/lato-font.css';
|
||||||
@ -73,47 +70,4 @@ $(document).ready(() => {
|
|||||||
retrievePercent(x.entryId, true);
|
retrievePercent(x.entryId, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('[data-handler=tag-rename]').forEach((item) => {
|
|
||||||
const current = item;
|
|
||||||
current.wallabag_edit_mode = false;
|
|
||||||
current.onclick = (event) => {
|
|
||||||
const target = event.currentTarget;
|
|
||||||
|
|
||||||
if (target.wallabag_edit_mode === false) {
|
|
||||||
$(target.parentNode.querySelector('[data-handle=tag-link]')).addClass('hidden');
|
|
||||||
$(target.parentNode.querySelector('[data-handle=tag-rename-form]')).removeClass('hidden');
|
|
||||||
target.parentNode.querySelector('[data-handle=tag-rename-form] input').focus();
|
|
||||||
target.querySelector('.material-icons').innerHTML = 'done';
|
|
||||||
|
|
||||||
target.wallabag_edit_mode = true;
|
|
||||||
} else {
|
|
||||||
target.parentNode.querySelector('[data-handle=tag-rename-form]').submit();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// mimic radio button because emailTwoFactor is a boolean
|
|
||||||
$('#update_user_googleTwoFactor').on('change', () => {
|
|
||||||
$('#update_user_emailTwoFactor').prop('checked', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#update_user_emailTwoFactor').on('change', () => {
|
|
||||||
$('#update_user_googleTwoFactor').prop('checked', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
// same mimic for super admin
|
|
||||||
$('#user_googleTwoFactor').on('change', () => {
|
|
||||||
$('#user_emailTwoFactor').prop('checked', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_emailTwoFactor').on('change', () => {
|
|
||||||
$('#user_googleTwoFactor').prop('checked', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
// handle copy to clipboard for developer stuff
|
|
||||||
const clipboard = new ClipboardJS('.btn');
|
|
||||||
clipboard.on('success', (e) => {
|
|
||||||
e.clearSelection();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -85,7 +85,7 @@ blockquote {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-feed {
|
.icon-rss {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 0.2em 0.5em;
|
padding: 0.2em 0.5em;
|
||||||
@ -101,8 +101,8 @@ blockquote {
|
|||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-feed:hover,
|
.icon-rss:hover,
|
||||||
.icon-feed:focus {
|
.icon-rss:focus {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #000;
|
color: #000;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@ -295,15 +295,6 @@ div.pagination ul {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tag-form {
|
.hide {
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-tag-form input[type="text"] {
|
|
||||||
min-width: 20em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hide,
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,9 +170,3 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only print {
|
|
||||||
header h1.logo {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@
|
|||||||
content: "\ea3a";
|
content: "\ea3a";
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-feed::before {
|
.icon-rss::before {
|
||||||
content: "\e808";
|
content: "\e808";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,9 +6,6 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 45em;
|
max-width: 45em;
|
||||||
padding: 5px 20px;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 0 10px #ccc;
|
|
||||||
|
|
||||||
article {
|
article {
|
||||||
color: #424242;
|
color: #424242;
|
||||||
@ -54,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
border-bottom: 1px dotted $blueAccentColor;
|
border-bottom: 1px dotted #03a9f4;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +108,7 @@
|
|||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
|
|
||||||
.stats {
|
.stats {
|
||||||
font-size: 0.7em;
|
font-size: 0.8em;
|
||||||
margin: 8px 5px 5px;
|
margin: 8px 5px 5px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
@ -122,7 +119,6 @@
|
|||||||
i.material-icons {
|
i.material-icons {
|
||||||
color: #3e3e3e;
|
color: #3e3e3e;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
font-size: 18px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,12 +135,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chip {
|
.chip {
|
||||||
background-color: #9e9e9e;
|
background-color: $blueAccentColor;
|
||||||
padding: 0 15px 0 10px;
|
padding: 0 15px 0 10px;
|
||||||
margin: auto 2px;
|
margin: auto 2px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
height: 18px;
|
|
||||||
line-height: 18px;
|
|
||||||
|
|
||||||
a,
|
a,
|
||||||
i {
|
i {
|
||||||
@ -153,8 +147,8 @@
|
|||||||
|
|
||||||
i.material-icons {
|
i.material-icons {
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 16px;
|
font-size: 20px;
|
||||||
line-height: 18px;
|
line-height: 32px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,18 +172,18 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
width: 260px !important;
|
width: 260px !important;
|
||||||
|
|
||||||
|
.collapsible-body {
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
li a i.material-icons {
|
||||||
|
margin: auto 5px auto -8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapsible-body {
|
|
||||||
height: auto;
|
|
||||||
|
|
||||||
li a i.material-icons {
|
|
||||||
margin: auto 5px auto -8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
|
|||||||
@ -18,24 +18,6 @@ main {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin mixin-reading-time {
|
|
||||||
.reading-time {
|
|
||||||
display: inline-flex;
|
|
||||||
vertical-align: middle;
|
|
||||||
|
|
||||||
.card-reading-time,
|
|
||||||
.card-created-at {
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
.card-content .card-title,
|
.card-content .card-title,
|
||||||
.card-reveal .card-title {
|
.card-reveal .card-title {
|
||||||
@ -116,7 +98,14 @@ main {
|
|||||||
margin-right: 5px !important;
|
margin-right: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mixin-reading-time;
|
.reading-time {
|
||||||
|
display: inline-flex;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-image {
|
.card-image {
|
||||||
@ -173,6 +162,7 @@ a.original:not(.waves-effect) {
|
|||||||
|
|
||||||
.card-tag-labels li {
|
.card-tag-labels li {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-entry-tags a,
|
.card-entry-tags a,
|
||||||
@ -185,36 +175,30 @@ a.original:not(.waves-effect) {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tag-link {
|
.card-tag-labels a {
|
||||||
width: calc(100% - 48px);
|
height: 100%;
|
||||||
line-height: 1.3;
|
align-items: center;
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tag-form {
|
.card-tag-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tag-form input {
|
.card-tag-rss {
|
||||||
margin-bottom: 0;
|
|
||||||
height: 1.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-tag-icon {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tag-labels {
|
.card-tag-labels {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tag-labels li {
|
.card-tag-labels li {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
flex-basis: 19%;
|
||||||
|
flex-grow: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,18 +219,10 @@ a.original:not(.waves-effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.metadata {
|
div.metadata {
|
||||||
overflow: hidden;
|
|
||||||
height: 1.5em;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
ul.tags {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chip {
|
.chip {
|
||||||
background-color: $blueAccentColor;
|
background-color: $blueAccentColor;
|
||||||
padding: 0 7px;
|
padding: 0 7px;
|
||||||
margin: auto 1px;
|
margin: auto 2px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
@ -263,16 +239,6 @@ a.original:not(.waves-effect) {
|
|||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mixin-reading-time {
|
|
||||||
padding: 0 5px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-left: auto;
|
|
||||||
|
|
||||||
i.material-icons {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div.card-content {
|
div.card-content {
|
||||||
@ -306,3 +272,9 @@ a.original:not(.waves-effect) {
|
|||||||
.settings .div_tabs {
|
.settings .div_tabs {
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (min-width: 992px) {
|
||||||
|
.card-tag-labels li {
|
||||||
|
max-width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -2,42 +2,6 @@
|
|||||||
* Entries
|
* Entries
|
||||||
* ========================================================================== */
|
* ========================================================================== */
|
||||||
|
|
||||||
.mass-buttons {
|
|
||||||
margin: 5px;
|
|
||||||
|
|
||||||
#selectAll {
|
|
||||||
position: relative;
|
|
||||||
opacity: initial;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
i {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
height: 24px;
|
|
||||||
line-height: 24px;
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-stacked {
|
|
||||||
input[type=checkbox] {
|
|
||||||
position: relative;
|
|
||||||
opacity: initial;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.entry-checkbox {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.collection {
|
.collection {
|
||||||
margin: 15px 15px 0;
|
margin: 15px 15px 0;
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,6 @@ body {
|
|||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
|
||||||
color: $blueAccentColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
main,
|
main,
|
||||||
#content,
|
#content,
|
||||||
.valign-wrapper {
|
.valign-wrapper {
|
||||||
|
|||||||
@ -14,12 +14,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 993px) {
|
|
||||||
body.entry main #content {
|
|
||||||
padding-left: 70px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 992px) {
|
@media only screen and (max-width: 992px) {
|
||||||
header,
|
header,
|
||||||
main,
|
main,
|
||||||
@ -169,23 +163,4 @@
|
|||||||
.row .col {
|
.row .col {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-stacked div.metadata .reading-time {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 310px),
|
|
||||||
screen and (min-width: 601px) and (max-width: 660px),
|
|
||||||
screen and (min-width: 993px) and (max-width: 1050px),
|
|
||||||
screen and (min-width: 1201px) and (max-width: 1250px) {
|
|
||||||
.card .card-action .reading-time .card-created-at {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only print {
|
|
||||||
body {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,25 +131,8 @@ nav {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry-nav-top--sticky {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 993px) {
|
@media (min-width: 993px) {
|
||||||
.button-collapse {
|
.button-collapse {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-content {
|
|
||||||
min-width: 300px;
|
|
||||||
|
|
||||||
.material-icons {
|
|
||||||
line-height: initial !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
li > a {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -2,4 +2,4 @@
|
|||||||
Variables
|
Variables
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
$blueAccentColor: #00acc1;
|
$blueAccentColor: rgba(0, 151, 167, 0.85);
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import 'materialize-css/dist/js/materialize';
|
|||||||
import '../_global/index';
|
import '../_global/index';
|
||||||
|
|
||||||
/* Tools */
|
/* Tools */
|
||||||
import { initExport, initFilters, initRandom } from './js/tools';
|
import { initExport, initFilters } from './js/tools';
|
||||||
|
|
||||||
/* Import shortcuts */
|
/* Import shortcuts */
|
||||||
import './js/shortcuts/main';
|
import './js/shortcuts/main';
|
||||||
@ -17,38 +17,6 @@ import './js/shortcuts/entry';
|
|||||||
/* Theme style */
|
/* Theme style */
|
||||||
import './css/index.scss';
|
import './css/index.scss';
|
||||||
|
|
||||||
const mobileMaxWidth = 993;
|
|
||||||
|
|
||||||
const stickyNav = () => {
|
|
||||||
const nav = $('.js-entry-nav-top');
|
|
||||||
$('[data-toggle="actions"]').click(() => {
|
|
||||||
nav.toggleClass('entry-nav-top--sticky');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const articleScroll = () => {
|
|
||||||
const articleEl = $('#article');
|
|
||||||
if (articleEl.length > 0) {
|
|
||||||
$(window).scroll(() => {
|
|
||||||
const s = $(window).scrollTop();
|
|
||||||
const d = $(document).height();
|
|
||||||
const c = $(window).height();
|
|
||||||
const articleElBottom = articleEl.offset().top + articleEl.height();
|
|
||||||
const scrollPercent = (s / (d - c)) * 100;
|
|
||||||
$('.progress .determinate').css('width', `${scrollPercent}%`);
|
|
||||||
const fixedActionBtn = $('.js-fixed-action-btn');
|
|
||||||
const toggleScrollDataName = 'toggle-auto';
|
|
||||||
if ((s + c) > articleElBottom) {
|
|
||||||
fixedActionBtn.data(toggleScrollDataName, true);
|
|
||||||
fixedActionBtn.openFAB();
|
|
||||||
} else if (fixedActionBtn.data(toggleScrollDataName) === true) {
|
|
||||||
fixedActionBtn.data(toggleScrollDataName, false);
|
|
||||||
fixedActionBtn.closeFAB();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
// sideNav
|
// sideNav
|
||||||
$('.button-collapse').sideNav();
|
$('.button-collapse').sideNav();
|
||||||
@ -59,19 +27,13 @@ $(document).ready(() => {
|
|||||||
$('.datepicker').pickadate({
|
$('.datepicker').pickadate({
|
||||||
selectMonths: true,
|
selectMonths: true,
|
||||||
selectYears: 15,
|
selectYears: 15,
|
||||||
formatSubmit: 'yyyy-mm-dd',
|
formatSubmit: 'dd/mm/yyyy',
|
||||||
hiddenName: false,
|
hiddenName: true,
|
||||||
format: 'yyyy-mm-dd',
|
format: 'dd/mm/yyyy',
|
||||||
container: 'body',
|
container: 'body',
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.dropdown-trigger').dropdown({ hover: false });
|
|
||||||
|
|
||||||
initFilters();
|
initFilters();
|
||||||
initExport();
|
initExport();
|
||||||
initRandom();
|
|
||||||
stickyNav();
|
|
||||||
articleScroll();
|
|
||||||
|
|
||||||
const toggleNav = (toShow, toFocus) => {
|
const toggleNav = (toShow, toFocus) => {
|
||||||
$('.nav-panel-actions').hide(100);
|
$('.nav-panel-actions').hide(100);
|
||||||
@ -83,46 +45,33 @@ $(document).ready(() => {
|
|||||||
$('#nav-btn-add-tag').on('click', () => {
|
$('#nav-btn-add-tag').on('click', () => {
|
||||||
$('.nav-panel-add-tag').toggle(100);
|
$('.nav-panel-add-tag').toggle(100);
|
||||||
$('.nav-panel-menu').addClass('hidden');
|
$('.nav-panel-menu').addClass('hidden');
|
||||||
if (window.innerWidth < mobileMaxWidth) {
|
|
||||||
$('.side-nav').sideNav('hide');
|
|
||||||
}
|
|
||||||
$('#tag_label').focus();
|
$('#tag_label').focus();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#nav-btn-add').on('click', () => {
|
$('#nav-btn-add').on('click', () => {
|
||||||
toggleNav('.nav-panel-add', '#entry_url');
|
toggleNav('.nav-panel-add', '#entry_url');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
const materialAddForm = $('.nav-panel-add');
|
const materialAddForm = $('.nav-panel-add');
|
||||||
materialAddForm.on('submit', () => {
|
materialAddForm.on('submit', () => {
|
||||||
materialAddForm.addClass('disabled');
|
materialAddForm.addClass('disabled');
|
||||||
$('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
|
$('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#nav-btn-search').on('click', () => {
|
$('#nav-btn-search').on('click', () => {
|
||||||
toggleNav('.nav-panel-search', '#search_entry_term');
|
toggleNav('.nav-panel-search', '#search_entry_term');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.close').on('click', (e) => {
|
$('.close').on('click', (e) => {
|
||||||
$(e.target).parent('.nav-panel-item').hide(100);
|
$(e.target).parent('.nav-panel-item').hide(100);
|
||||||
$('.nav-panel-actions').show(100);
|
$('.nav-panel-actions').show(100);
|
||||||
$('.nav-panels').css('background', 'transparent');
|
$('.nav-panels').css('background', 'transparent');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$(window).scroll(() => {
|
||||||
const mainCheckboxes = document.querySelectorAll('[data-js="checkboxes-toggle"]');
|
const s = $(window).scrollTop();
|
||||||
if (mainCheckboxes.length) {
|
const d = $(document).height();
|
||||||
[...mainCheckboxes].forEach((el) => {
|
const c = $(window).height();
|
||||||
el.addEventListener('click', () => {
|
const scrollPercent = (s / (d - c)) * 100;
|
||||||
const checkboxes = document.querySelectorAll(el.dataset.toggle);
|
$('.progress .determinate').css('width', `${scrollPercent}%`);
|
||||||
[...checkboxes].forEach((checkbox) => {
|
});
|
||||||
const checkboxClone = checkbox;
|
|
||||||
checkboxClone.checked = el.checked;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -8,7 +8,6 @@ function initFilters() {
|
|||||||
$('#clear_form_filters').on('click', () => {
|
$('#clear_form_filters').on('click', () => {
|
||||||
$('#filters input').val('');
|
$('#filters input').val('');
|
||||||
$('#filters :checked').removeAttr('checked');
|
$('#filters :checked').removeAttr('checked');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -22,15 +21,4 @@ function initExport() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initRandom() {
|
export { initExport, initFilters };
|
||||||
// no display if export (ie: entries) not available
|
|
||||||
if ($('div').is('#export')) {
|
|
||||||
$('#button_random').show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
initExport,
|
|
||||||
initFilters,
|
|
||||||
initRandom,
|
|
||||||
};
|
|
||||||
|
|||||||
13
app/autoload.php
Normal file
13
app/autoload.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Composer\Autoload\ClassLoader;
|
||||||
|
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ClassLoader
|
||||||
|
*/
|
||||||
|
$loader = require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
|
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||||
|
|
||||||
|
return $loader;
|
||||||
19
app/config/capistrano/deploy.rb
Normal file
19
app/config/capistrano/deploy.rb
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# config valid only for current version of Capistrano
|
||||||
|
|
||||||
|
set :application, 'wallabag'
|
||||||
|
set :repo_url, 'git@github.com:wallabag/wallabag.git'
|
||||||
|
|
||||||
|
set :ssh_user, 'framasoft_bag'
|
||||||
|
server '78.46.248.87', user: fetch(:ssh_user), roles: %w{web app db}
|
||||||
|
|
||||||
|
set :format, :pretty
|
||||||
|
set :log_level, :info
|
||||||
|
# set :log_level, :debug
|
||||||
|
|
||||||
|
set :composer_install_flags, '--no-dev --prefer-dist --no-interaction --optimize-autoloader'
|
||||||
|
|
||||||
|
set :linked_files, %w{app/config/parameters.yml}
|
||||||
|
set :linked_dirs, [fetch(:log_path), "var/sessions", "web/uploads", "data"]
|
||||||
|
set :keep_releases, 3
|
||||||
|
|
||||||
|
after 'deploy:updated', 'symfony:cache:clear'
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user