forked from wallabag/wallabag
Compare commits
121 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92cb8acae9 | |||
| e586d65b64 | |||
| 7ddba67745 | |||
| 7ebd4bdcf7 | |||
| 49b4c87598 | |||
| bfe7a69226 | |||
| 36054f5dd4 | |||
| c00a691019 | |||
| 778543311f | |||
| a550a64c84 | |||
| def73759ae | |||
| 03f2cacb58 | |||
| fea68d1a72 | |||
| 8fe73e076c | |||
| c15bb5ad72 | |||
| 9707ac4661 | |||
| 53ec80be94 | |||
| f136d288d6 | |||
| 1d770f9867 | |||
| a6e5637507 | |||
| 65f499b4ac | |||
| 4745ca3fde | |||
| 7c3184376c | |||
| 609adaca9b | |||
| 9562a8aca8 | |||
| b2e7b8b600 | |||
| 11f15430ff | |||
| a0f126b973 | |||
| 08d6bedcaa | |||
| 8e5b91180e | |||
| 3b46d0f947 | |||
| 80d4260a8e | |||
| 739a4024fa | |||
| 3be96dcb17 | |||
| f400aa1281 | |||
| 727880c950 | |||
| 2ff26deaf8 | |||
| ad77c3451f | |||
| bf283db8e6 | |||
| 228d317204 | |||
| 4d9128ded9 | |||
| cc09434ea4 | |||
| f24e9bfab0 | |||
| ac1811f83e | |||
| fd637b9a5a | |||
| 5614df19cf | |||
| 91f5992423 | |||
| 2831e77cce | |||
| 63771b9ae3 | |||
| f86c2b5fa6 | |||
| e9e3f93805 | |||
| 99e8c2785b | |||
| 410216f435 | |||
| f3e71b5dd5 | |||
| b8568662bd | |||
| e0a862b626 | |||
| 2679eb9d84 | |||
| 8fa6d62197 | |||
| 8e15ece7df | |||
| 3473e600b1 | |||
| c04bde29a3 | |||
| 11ed735c09 | |||
| f83e9e32fc | |||
| 8ffcee8aff | |||
| 5e0c44a2ac | |||
| 49fb9e7cab | |||
| a8541089be | |||
| ac8489f5f7 | |||
| 3c9548257c | |||
| 726e2cf3c6 | |||
| 0d9c8081fe | |||
| 575d1d03d9 | |||
| e8694faad6 | |||
| 887073dedc | |||
| a9d274424f | |||
| ef5c8a7d01 | |||
| 01ea7f5855 | |||
| ad880894a8 | |||
| acc0a80179 | |||
| 5661e8d42a | |||
| 7185fbff62 | |||
| 4b6942d2d8 | |||
| 26e2f07419 | |||
| eb3754509d | |||
| bd91bd5c32 | |||
| 3ccf086391 | |||
| 9e89bf7aca | |||
| f5ea67e4cf | |||
| a5849ac956 | |||
| d1f260e2d7 | |||
| ccb52fb461 | |||
| d1224bf9f6 | |||
| b10be65ec7 | |||
| 65d885da00 | |||
| f565e10817 | |||
| 64e7c90ae9 | |||
| 9b606725fe | |||
| e4ae6b976f | |||
| caf719f163 | |||
| f1f2cf2bce | |||
| a68a80f654 | |||
| b457d7bd32 | |||
| 300f293cb1 | |||
| af29e1bf07 | |||
| 70265817ae | |||
| 08d6497c9c | |||
| cef72d87a6 | |||
| d80e9931f5 | |||
| 71318d6103 | |||
| 1f198256ed | |||
| 0ef1ffbf71 | |||
| 629f913b8d | |||
| 3fadf42a1c | |||
| ad46f2fb46 | |||
| 2e9747a59a | |||
| a1661af17c | |||
| 43e1711eb6 | |||
| f209798368 | |||
| 60f53cf46f | |||
| cabadf169b | |||
| 63e6ee1293 |
65
CHANGELOG.md
65
CHANGELOG.md
@ -1,6 +1,65 @@
|
||||
# Changelog
|
||||
|
||||
## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-10-21)
|
||||
## [2.3.3](https://github.com/wallabag/wallabag/tree/2.3.3)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.2...2.3.3)
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix error when withRemove variable is not defined. [#3573](https://github.com/wallabag/wallabag/pull/3573)
|
||||
- Fix title card HTML parsing [#3592](https://github.com/wallabag/wallabag/pull/3592)
|
||||
- Fix tests [#3597](https://github.com/wallabag/wallabag/pull/3597)
|
||||
- Fix tests [#3619](https://github.com/wallabag/wallabag/pull/3619)
|
||||
- Better encoding of the URI for the bookmarklet [#3616](https://github.com/wallabag/wallabag/pull/3616)
|
||||
- Fix overflow wrap issue [#3652](https://github.com/wallabag/wallabag/pull/3652)
|
||||
- Fix/firefox mobile unneeded resize [#3653](https://github.com/wallabag/wallabag/pull/3653)
|
||||
- Fix srcset attribute on images downloaded [#3661](https://github.com/wallabag/wallabag/pull/3661)
|
||||
- Fix authors and preview alt encoding display [#3664](https://github.com/wallabag/wallabag/pull/3664)
|
||||
- Spelling: GitHub, Log out, of the dev [#3614](https://github.com/wallabag/wallabag/pull/3614)
|
||||
- Fix tests [#3668](https://github.com/wallabag/wallabag/pull/3668)
|
||||
- Fixed migrations with dash into db names [#3538](https://github.com/wallabag/wallabag/pull/3538)
|
||||
|
||||
### Changes
|
||||
|
||||
- Allow login by email [#3615](https://github.com/wallabag/wallabag/pull/3615)
|
||||
- Occitan update [#3646](https://github.com/wallabag/wallabag/pull/3646)
|
||||
- Highlight code in articles using highlight.js [#3636](https://github.com/wallabag/wallabag/pull/3636)
|
||||
|
||||
## [2.3.2](https://github.com/wallabag/wallabag/tree/2.3.2)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.1...2.3.2)
|
||||
|
||||
### Fixes
|
||||
|
||||
- Add `set -eu` to update.sh [#3546](https://github.com/wallabag/wallabag/pull/3546)
|
||||
- Fix broken link to remove tags from entries [#3536](https://github.com/wallabag/wallabag/pull/3536)
|
||||
|
||||
### Changes
|
||||
|
||||
- Nav actions updated [#3541](https://github.com/wallabag/wallabag/pull/3541)
|
||||
- Replaced Create new client link with a button [#3539](https://github.com/wallabag/wallabag/pull/3539)
|
||||
|
||||
## [2.3.1](https://github.com/wallabag/wallabag/tree/2.3.1)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.0...2.3.1)
|
||||
|
||||
### Fixes
|
||||
|
||||
- Changed the way to check for initial migration [#3487](https://github.com/wallabag/wallabag/pull/3487)
|
||||
- Displayed the RSS icon on homepage route [#3490](https://github.com/wallabag/wallabag/pull/3490)
|
||||
- Hided the share toggle button if no service is enabled [#3492](https://github.com/wallabag/wallabag/pull/3492)
|
||||
- Updated robots.txt to prevent crawling [#3510](https://github.com/wallabag/wallabag/pull/3510)
|
||||
- Fixed lower case tags migration [#3507](https://github.com/wallabag/wallabag/pull/3507)
|
||||
- Fixed initial migration when using custom table prefix [#3504](https://github.com/wallabag/wallabag/pull/3504)
|
||||
- Fixed assets for subfolder install [#3524](https://github.com/wallabag/wallabag/pull/3524)
|
||||
- Fixed empty card title link [#3525](https://github.com/wallabag/wallabag/pull/3525)
|
||||
- Fixed empty title and domain_name when exception is thrown during fetch [#3442](https://github.com/wallabag/wallabag/pull/3442)
|
||||
- API: copied entry object before sending, to keep id [#3516](https://github.com/wallabag/wallabag/pull/3516)
|
||||
|
||||
### Changes
|
||||
|
||||
- Added custom driver & schema manager for PostgreSQL 10 [#3488](https://github.com/wallabag/wallabag/pull/3488)
|
||||
- Replaced exit_to_app, redo and autorenew icons [#3513](https://github.com/wallabag/wallabag/pull/3513)
|
||||
- Added PHP 7.2 compatibility [#3515](https://github.com/wallabag/wallabag/pull/3515)
|
||||
|
||||
## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-12-11)
|
||||
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.2.3...2.3.0)
|
||||
|
||||
### API
|
||||
@ -32,7 +91,7 @@
|
||||
### Features
|
||||
|
||||
- Share articles to Scuttle (https://github.com/scronide/scuttle) instance [#2999](https://github.com/wallabag/wallabag/pull/2999)
|
||||
- Allow to remove all archived entries [#3020](https://github.com/wallabag/wallabag/pull/3020)
|
||||
- Allow to remove all archived entries [#3020](https://github.com/wallabag/wallabag/pull/3020)
|
||||
- Added publication date and author [#3024](https://github.com/wallabag/wallabag/pull/3024)
|
||||
- Added `notmatches` operator for automatic tagging rule [#3047](https://github.com/wallabag/wallabag/pull/3047)
|
||||
- Search & paginate users [#3060](https://github.com/wallabag/wallabag/pull/3060)
|
||||
@ -55,7 +114,7 @@
|
||||
- Changed default value for list mode (grid instead of list) [#3014](https://github.com/wallabag/wallabag/pull/3014)
|
||||
- Remove `isPublic` from Entry entity [#3030](https://github.com/wallabag/wallabag/pull/3030)
|
||||
- Use username to import [#3080](https://github.com/wallabag/wallabag/pull/3080)
|
||||
- Adds Webpack support and remove Grunt [#3022](https://github.com/wallabag/wallabag/pull/3022)
|
||||
- Adds Webpack support and remove Grunt [#3022](https://github.com/wallabag/wallabag/pull/3022)
|
||||
- Improved Guzzle subscribers extensibility [#2751](https://github.com/wallabag/wallabag/pull/2751)
|
||||
- Added logger when we match Tagging rules [#3110](https://github.com/wallabag/wallabag/pull/3110)
|
||||
- unify Download/Export wording. [#3130](https://github.com/wallabag/wallabag/pull/3130)
|
||||
|
||||
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ dev: ## Install the latest dev version
|
||||
@sh scripts/dev.sh
|
||||
|
||||
run: ## Run the wallabag built-in server
|
||||
@php bin/console server:run --env=$(ENV)
|
||||
@php bin/console server:run --env=dev
|
||||
|
||||
build: ## Run webpack
|
||||
@npm run build:$(ENV)
|
||||
|
||||
@ -19,11 +19,12 @@ Then you can install wallabag by executing the following commands:
|
||||
|
||||
```
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag && make install
|
||||
make run
|
||||
cd wallabag && make install
|
||||
```
|
||||
|
||||
Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag.
|
||||
|
||||
# License
|
||||
Copyright © 2013-2017 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
|
||||
terms of the MIT License. See the COPYING file for more details.
|
||||
|
||||
@ -78,6 +78,12 @@ class AppKernel extends Kernel
|
||||
'base_url' => 'http://localhost:8080/',
|
||||
],
|
||||
]);
|
||||
} else {
|
||||
$container->loadFromExtension('framework', [
|
||||
'assets' => [
|
||||
'base_url' => $container->getParameter('domain_name'),
|
||||
],
|
||||
]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -2,60 +2,57 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Initial database structure.
|
||||
*/
|
||||
class Version20160401000000 extends AbstractMigration
|
||||
class Version20160401000000 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
if ($this->version->getConfiguration()->getNumberOfExecutedMigrations() > 0) {
|
||||
$this->version->markMigrated();
|
||||
$this->skipIf(true, 'Database already initialized');
|
||||
}
|
||||
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
||||
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$sql = <<<'SQL'
|
||||
CREATE TABLE wallabag_craue_config_setting (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
|
||||
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON wallabag_craue_config_setting (name);
|
||||
CREATE TABLE "wallabag_tagging_rule" (id INTEGER NOT NULL, config_id INTEGER DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags CLOB NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES "wallabag_config" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_2D9B3C5424DB0683 ON "wallabag_tagging_rule" (config_id);
|
||||
CREATE TABLE "wallabag_tag" (id INTEGER NOT NULL, label CLOB NOT NULL, slug VARCHAR(128) NOT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_4CA58A8C989D9B62 ON "wallabag_tag" (slug);
|
||||
CREATE TABLE "wallabag_entry" (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL, language CLOB DEFAULT NULL, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id), CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON "wallabag_entry" (user_id);
|
||||
CREATE TABLE wallabag_entry_tag (entry_id INTEGER NOT NULL, tag_id INTEGER NOT NULL, PRIMARY KEY(entry_id, tag_id), CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES "wallabag_tag" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_C9F0DD7CBA364942 ON wallabag_entry_tag (entry_id);
|
||||
CREATE INDEX IDX_C9F0DD7CBAD26311 ON wallabag_entry_tag (tag_id);
|
||||
CREATE TABLE "wallabag_config" (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "wallabag_config" (user_id);
|
||||
CREATE TABLE wallabag_oauth2_refresh_tokens (id INTEGER NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INTEGER DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_20C9FB245F37A13B ON wallabag_oauth2_refresh_tokens (token);
|
||||
CREATE INDEX IDX_20C9FB2419EB6921 ON wallabag_oauth2_refresh_tokens (client_id);
|
||||
CREATE INDEX IDX_20C9FB24A76ED395 ON wallabag_oauth2_refresh_tokens (user_id);
|
||||
CREATE TABLE wallabag_oauth2_access_tokens (id INTEGER NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INTEGER DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_368A42095F37A13B ON wallabag_oauth2_access_tokens (token);
|
||||
CREATE INDEX IDX_368A420919EB6921 ON wallabag_oauth2_access_tokens (client_id);
|
||||
CREATE INDEX IDX_368A4209A76ED395 ON wallabag_oauth2_access_tokens (user_id);
|
||||
CREATE TABLE wallabag_oauth2_auth_codes (id INTEGER NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri CLOB NOT NULL, expires_at INTEGER DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_EE52E3FA5F37A13B ON wallabag_oauth2_auth_codes (token);
|
||||
CREATE INDEX IDX_EE52E3FA19EB6921 ON wallabag_oauth2_auth_codes (client_id);
|
||||
CREATE INDEX IDX_EE52E3FAA76ED395 ON wallabag_oauth2_auth_codes (user_id);
|
||||
CREATE TABLE wallabag_oauth2_clients (id INTEGER NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris CLOB NOT NULL, secret VARCHAR(255) NOT NULL, allowed_grant_types CLOB NOT NULL, PRIMARY KEY(id));
|
||||
CREATE TABLE "wallabag_user" (id INTEGER 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, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked BOOLEAN NOT NULL, expired BOOLEAN NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL, credentials_expired BOOLEAN NOT NULL, credentials_expire_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, trusted CLOB DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON "wallabag_user" (username_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "wallabag_user" (email_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "wallabag_user" (confirmation_token);
|
||||
CREATE TABLE wallabag_annotation (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, entry_id INTEGER DEFAULT NULL, text CLOB NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, quote VARCHAR(255) NOT NULL, ranges CLOB NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON wallabag_annotation (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id);
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
|
||||
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name);
|
||||
CREATE TABLE {$this->getTable('tagging_rule')} (id INTEGER NOT NULL, config_id INTEGER DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags CLOB NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES {$this->getTable('config')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_2D9B3C5424DB0683 ON {$this->getTable('tagging_rule')} (config_id);
|
||||
CREATE TABLE {$this->getTable('tag')} (id INTEGER NOT NULL, label CLOB NOT NULL, slug VARCHAR(128) NOT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_4CA58A8C989D9B62 ON {$this->getTable('tag')} (slug);
|
||||
CREATE TABLE {$this->getTable('entry')} (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL, language CLOB DEFAULT NULL, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, is_public BOOLEAN DEFAULT '0', PRIMARY KEY(id), CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON {$this->getTable('entry')} (user_id);
|
||||
CREATE TABLE {$this->getTable('entry_tag')} (entry_id INTEGER NOT NULL, tag_id INTEGER NOT NULL, PRIMARY KEY(entry_id, tag_id), CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES {$this->getTable('tag')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_C9F0DD7CBA364942 ON {$this->getTable('entry_tag')} (entry_id);
|
||||
CREATE INDEX IDX_C9F0DD7CBAD26311 ON {$this->getTable('entry_tag')} (tag_id);
|
||||
CREATE TABLE {$this->getTable('config')} (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INTEGER DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON {$this->getTable('config')} (user_id);
|
||||
CREATE TABLE {$this->getTable('oauth2_refresh_tokens')} (id INTEGER NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INTEGER DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_20C9FB245F37A13B ON {$this->getTable('oauth2_refresh_tokens')} (token);
|
||||
CREATE INDEX IDX_20C9FB2419EB6921 ON {$this->getTable('oauth2_refresh_tokens')} (client_id);
|
||||
CREATE INDEX IDX_20C9FB24A76ED395 ON {$this->getTable('oauth2_refresh_tokens')} (user_id);
|
||||
CREATE TABLE {$this->getTable('oauth2_access_tokens')} (id INTEGER NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INTEGER DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_368A42095F37A13B ON {$this->getTable('oauth2_access_tokens')} (token);
|
||||
CREATE INDEX IDX_368A420919EB6921 ON {$this->getTable('oauth2_access_tokens')} (client_id);
|
||||
CREATE INDEX IDX_368A4209A76ED395 ON {$this->getTable('oauth2_access_tokens')} (user_id);
|
||||
CREATE TABLE {$this->getTable('oauth2_auth_codes')} (id INTEGER NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri CLOB NOT NULL, expires_at INTEGER DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE UNIQUE INDEX UNIQ_EE52E3FA5F37A13B ON {$this->getTable('oauth2_auth_codes')} (token);
|
||||
CREATE INDEX IDX_EE52E3FA19EB6921 ON {$this->getTable('oauth2_auth_codes')} (client_id);
|
||||
CREATE INDEX IDX_EE52E3FAA76ED395 ON {$this->getTable('oauth2_auth_codes')} (user_id);
|
||||
CREATE TABLE {$this->getTable('oauth2_clients')} (id INTEGER NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris CLOB NOT NULL, secret VARCHAR(255) NOT NULL, allowed_grant_types CLOB NOT NULL, PRIMARY KEY(id));
|
||||
CREATE TABLE {$this->getTable('user')} (id INTEGER 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, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked BOOLEAN NOT NULL, expired BOOLEAN NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL, credentials_expired BOOLEAN NOT NULL, credentials_expire_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, trusted CLOB DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON {$this->getTable('user')} (username_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON {$this->getTable('user')} (email_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON {$this->getTable('user')} (confirmation_token);
|
||||
CREATE TABLE {$this->getTable('annotation')} (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, entry_id INTEGER DEFAULT NULL, text CLOB NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, quote VARCHAR(255) NOT NULL, ranges CLOB NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE);
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON {$this->getTable('annotation')} (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON {$this->getTable('annotation')} (entry_id);
|
||||
SQL
|
||||
;
|
||||
|
||||
@ -65,32 +62,32 @@ SQL
|
||||
|
||||
break;
|
||||
case 'mysql':
|
||||
$sql = <<<'SQL'
|
||||
CREATE TABLE wallabag_craue_config_setting (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE `wallabag_entry` (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE wallabag_entry_tag (entry_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_C9F0DD7CBA364942 (entry_id), INDEX IDX_C9F0DD7CBAD26311 (tag_id), PRIMARY KEY(entry_id, tag_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE `wallabag_config` (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INT NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INT DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, UNIQUE INDEX UNIQ_87E64C53A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE `wallabag_tagging_rule` (id INT AUTO_INCREMENT NOT NULL, config_id INT DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags LONGTEXT NOT NULL COMMENT '(DC2Type:simple_array)', INDEX IDX_2D9B3C5424DB0683 (config_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE `wallabag_tag` (id INT AUTO_INCREMENT NOT NULL, `label` LONGTEXT NOT NULL, slug VARCHAR(128) NOT NULL, UNIQUE INDEX UNIQ_4CA58A8C989D9B62 (slug), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE wallabag_oauth2_clients (id INT AUTO_INCREMENT NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris LONGTEXT NOT NULL COMMENT '(DC2Type:array)', secret VARCHAR(255) NOT NULL, allowed_grant_types LONGTEXT NOT NULL COMMENT '(DC2Type:array)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE wallabag_oauth2_access_tokens (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_368A42095F37A13B (token), INDEX IDX_368A420919EB6921 (client_id), INDEX IDX_368A4209A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE wallabag_oauth2_refresh_tokens (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_20C9FB245F37A13B (token), INDEX IDX_20C9FB2419EB6921 (client_id), INDEX IDX_20C9FB24A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE wallabag_oauth2_auth_codes (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri LONGTEXT NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_EE52E3FA5F37A13B (token), INDEX IDX_EE52E3FA19EB6921 (client_id), INDEX IDX_EE52E3FAA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE `wallabag_user` (id INT AUTO_INCREMENT 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 TINYINT(1) NOT NULL, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', credentials_expired TINYINT(1) NOT NULL, credentials_expire_at DATETIME DEFAULT NULL, name LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INT DEFAULT NULL, twoFactorAuthentication TINYINT(1) NOT NULL, trusted LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_1D63E7E592FC23A8 (username_canonical), UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF (email_canonical), UNIQUE INDEX UNIQ_1D63E7E5C05FB297 (confirmation_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE wallabag_annotation (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text LONGTEXT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, quote VARCHAR(255) NOT NULL, ranges LONGTEXT NOT NULL COMMENT '(DC2Type:array)', INDEX IDX_A7AED006A76ED395 (user_id), INDEX IDX_A7AED006BA364942 (entry_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
ALTER TABLE `wallabag_entry` ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
||||
ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES `wallabag_entry` (id);
|
||||
ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES `wallabag_tag` (id);
|
||||
ALTER TABLE `wallabag_config` ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
||||
ALTER TABLE `wallabag_tagging_rule` ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES `wallabag_config` (id);
|
||||
ALTER TABLE wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id);
|
||||
ALTER TABLE wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
||||
ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id);
|
||||
ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
||||
ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id);
|
||||
ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
||||
ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
||||
ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES `wallabag_entry` (id);
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('entry')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('entry_tag')} (entry_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_C9F0DD7CBA364942 (entry_id), INDEX IDX_C9F0DD7CBAD26311 (tag_id), PRIMARY KEY(entry_id, tag_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('config')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INT NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INT DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, UNIQUE INDEX UNIQ_87E64C53A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('tagging_rule')} (id INT AUTO_INCREMENT NOT NULL, config_id INT DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags LONGTEXT NOT NULL COMMENT '(DC2Type:simple_array)', INDEX IDX_2D9B3C5424DB0683 (config_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('tag')} (id INT AUTO_INCREMENT NOT NULL, `label` LONGTEXT NOT NULL, slug VARCHAR(128) NOT NULL, UNIQUE INDEX UNIQ_4CA58A8C989D9B62 (slug), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('oauth2_clients')} (id INT AUTO_INCREMENT NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris LONGTEXT NOT NULL COMMENT '(DC2Type:array)', secret VARCHAR(255) NOT NULL, allowed_grant_types LONGTEXT NOT NULL COMMENT '(DC2Type:array)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('oauth2_access_tokens')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_368A42095F37A13B (token), INDEX IDX_368A420919EB6921 (client_id), INDEX IDX_368A4209A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('oauth2_refresh_tokens')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_20C9FB245F37A13B (token), INDEX IDX_20C9FB2419EB6921 (client_id), INDEX IDX_20C9FB24A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('oauth2_auth_codes')} (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri LONGTEXT NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_EE52E3FA5F37A13B (token), INDEX IDX_EE52E3FA19EB6921 (client_id), INDEX IDX_EE52E3FAA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('user')} (id INT AUTO_INCREMENT 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 TINYINT(1) NOT NULL, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, locked TINYINT(1) NOT NULL, expired TINYINT(1) NOT NULL, expires_at DATETIME DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', credentials_expired TINYINT(1) NOT NULL, credentials_expire_at DATETIME DEFAULT NULL, name LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INT DEFAULT NULL, twoFactorAuthentication TINYINT(1) NOT NULL, trusted LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_1D63E7E592FC23A8 (username_canonical), UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF (email_canonical), UNIQUE INDEX UNIQ_1D63E7E5C05FB297 (confirmation_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
CREATE TABLE {$this->getTable('annotation')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text LONGTEXT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, quote VARCHAR(255) NOT NULL, ranges LONGTEXT NOT NULL COMMENT '(DC2Type:array)', INDEX IDX_A7AED006A76ED395 (user_id), INDEX IDX_A7AED006BA364942 (entry_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
|
||||
ALTER TABLE {$this->getTable('entry')} ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
|
||||
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES {$this->getTable('tag')} (id);
|
||||
ALTER TABLE {$this->getTable('config')} ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('tagging_rule')} ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES {$this->getTable('config')} (id);
|
||||
ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
|
||||
ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
|
||||
ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
|
||||
ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||
ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
|
||||
SQL
|
||||
;
|
||||
foreach (explode("\n", $sql) as $query) {
|
||||
@ -98,46 +95,46 @@ SQL
|
||||
}
|
||||
break;
|
||||
case 'postgresql':
|
||||
$sql = <<<'SQL'
|
||||
CREATE TABLE wallabag_craue_config_setting (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
|
||||
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON wallabag_craue_config_setting (name);
|
||||
CREATE TABLE "wallabag_entry" (id INT NOT NULL, user_id INT DEFAULT NULL, title TEXT DEFAULT NULL, url TEXT DEFAULT NULL, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, mimetype TEXT DEFAULT NULL, language TEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name TEXT DEFAULT NULL, preview_picture TEXT DEFAULT NULL, is_public BOOLEAN DEFAULT 'false', PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON "wallabag_entry" (user_id);
|
||||
CREATE TABLE wallabag_entry_tag (entry_id INT NOT NULL, tag_id INT NOT NULL, PRIMARY KEY(entry_id, tag_id));
|
||||
CREATE INDEX IDX_C9F0DD7CBA364942 ON wallabag_entry_tag (entry_id);
|
||||
CREATE INDEX IDX_C9F0DD7CBAD26311 ON wallabag_entry_tag (tag_id);
|
||||
CREATE TABLE "wallabag_config" (id INT NOT NULL, user_id INT DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INT NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INT DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "wallabag_config" (user_id);
|
||||
CREATE TABLE "wallabag_tagging_rule" (id INT NOT NULL, config_id INT DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags TEXT NOT NULL, PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_2D9B3C5424DB0683 ON "wallabag_tagging_rule" (config_id);
|
||||
COMMENT ON COLUMN "wallabag_tagging_rule".tags IS '(DC2Type:simple_array)';
|
||||
CREATE TABLE "wallabag_tag" (id INT NOT NULL, label TEXT NOT NULL, slug VARCHAR(128) NOT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_4CA58A8C989D9B62 ON "wallabag_tag" (slug);
|
||||
CREATE TABLE wallabag_oauth2_clients (id INT NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris TEXT NOT NULL, secret VARCHAR(255) NOT NULL, allowed_grant_types TEXT NOT NULL, PRIMARY KEY(id));
|
||||
COMMENT ON COLUMN wallabag_oauth2_clients.redirect_uris IS '(DC2Type:array)';
|
||||
COMMENT ON COLUMN wallabag_oauth2_clients.allowed_grant_types IS '(DC2Type:array)';
|
||||
CREATE TABLE wallabag_oauth2_access_tokens (id INT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_368A42095F37A13B ON wallabag_oauth2_access_tokens (token);
|
||||
CREATE INDEX IDX_368A420919EB6921 ON wallabag_oauth2_access_tokens (client_id);
|
||||
CREATE INDEX IDX_368A4209A76ED395 ON wallabag_oauth2_access_tokens (user_id);
|
||||
CREATE TABLE wallabag_oauth2_refresh_tokens (id INT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_20C9FB245F37A13B ON wallabag_oauth2_refresh_tokens (token);
|
||||
CREATE INDEX IDX_20C9FB2419EB6921 ON wallabag_oauth2_refresh_tokens (client_id);
|
||||
CREATE INDEX IDX_20C9FB24A76ED395 ON wallabag_oauth2_refresh_tokens (user_id);
|
||||
CREATE TABLE wallabag_oauth2_auth_codes (id INT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri TEXT NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_EE52E3FA5F37A13B ON wallabag_oauth2_auth_codes (token);
|
||||
CREATE INDEX IDX_EE52E3FA19EB6921 ON wallabag_oauth2_auth_codes (client_id);
|
||||
CREATE INDEX IDX_EE52E3FAA76ED395 ON wallabag_oauth2_auth_codes (user_id);
|
||||
CREATE TABLE "wallabag_user" (id INT 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, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, locked BOOLEAN NOT NULL, expired BOOLEAN NOT NULL, expires_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, roles TEXT NOT NULL, credentials_expired BOOLEAN NOT NULL, credentials_expire_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, name TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, authCode INT DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted TEXT DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON "wallabag_user" (username_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "wallabag_user" (email_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "wallabag_user" (confirmation_token);
|
||||
COMMENT ON COLUMN "wallabag_user".roles IS '(DC2Type:array)';
|
||||
COMMENT ON COLUMN "wallabag_user".trusted IS '(DC2Type:json_array)';
|
||||
CREATE TABLE wallabag_annotation (id INT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text TEXT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, quote VARCHAR(255) NOT NULL, ranges TEXT NOT NULL, PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON wallabag_annotation (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id);
|
||||
COMMENT ON COLUMN wallabag_annotation.ranges IS '(DC2Type:array)';
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
|
||||
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name);
|
||||
CREATE TABLE {$this->getTable('entry')} (id INT NOT NULL, user_id INT DEFAULT NULL, title TEXT DEFAULT NULL, url TEXT DEFAULT NULL, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, mimetype TEXT DEFAULT NULL, language TEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name TEXT DEFAULT NULL, preview_picture TEXT DEFAULT NULL, is_public BOOLEAN DEFAULT 'false', PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_F4D18282A76ED395 ON {$this->getTable('entry')} (user_id);
|
||||
CREATE TABLE {$this->getTable('entry_tag')} (entry_id INT NOT NULL, tag_id INT NOT NULL, PRIMARY KEY(entry_id, tag_id));
|
||||
CREATE INDEX IDX_C9F0DD7CBA364942 ON {$this->getTable('entry_tag')} (entry_id);
|
||||
CREATE INDEX IDX_C9F0DD7CBAD26311 ON {$this->getTable('entry_tag')} (tag_id);
|
||||
CREATE TABLE {$this->getTable('config')} (id INT NOT NULL, user_id INT DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INT NOT NULL, language VARCHAR(255) NOT NULL, rss_token VARCHAR(255) DEFAULT NULL, rss_limit INT DEFAULT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON {$this->getTable('config')} (user_id);
|
||||
CREATE TABLE {$this->getTable('tagging_rule')} (id INT NOT NULL, config_id INT DEFAULT NULL, rule VARCHAR(255) NOT NULL, tags TEXT NOT NULL, PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_2D9B3C5424DB0683 ON {$this->getTable('tagging_rule')} (config_id);
|
||||
COMMENT ON COLUMN {$this->getTable('tagging_rule')}.tags IS '(DC2Type:simple_array)';
|
||||
CREATE TABLE {$this->getTable('tag')} (id INT NOT NULL, label TEXT NOT NULL, slug VARCHAR(128) NOT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_4CA58A8C989D9B62 ON {$this->getTable('tag')} (slug);
|
||||
CREATE TABLE {$this->getTable('oauth2_clients')} (id INT NOT NULL, random_id VARCHAR(255) NOT NULL, redirect_uris TEXT NOT NULL, secret VARCHAR(255) NOT NULL, allowed_grant_types TEXT NOT NULL, PRIMARY KEY(id));
|
||||
COMMENT ON COLUMN {$this->getTable('oauth2_clients')}.redirect_uris IS '(DC2Type:array)';
|
||||
COMMENT ON COLUMN {$this->getTable('oauth2_clients')}.allowed_grant_types IS '(DC2Type:array)';
|
||||
CREATE TABLE {$this->getTable('oauth2_access_tokens')} (id INT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_368A42095F37A13B ON {$this->getTable('oauth2_access_tokens')} (token);
|
||||
CREATE INDEX IDX_368A420919EB6921 ON {$this->getTable('oauth2_access_tokens')} (client_id);
|
||||
CREATE INDEX IDX_368A4209A76ED395 ON {$this->getTable('oauth2_access_tokens')} (user_id);
|
||||
CREATE TABLE {$this->getTable('oauth2_refresh_tokens')} (id INT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_20C9FB245F37A13B ON {$this->getTable('oauth2_refresh_tokens')} (token);
|
||||
CREATE INDEX IDX_20C9FB2419EB6921 ON {$this->getTable('oauth2_refresh_tokens')} (client_id);
|
||||
CREATE INDEX IDX_20C9FB24A76ED395 ON {$this->getTable('oauth2_refresh_tokens')} (user_id);
|
||||
CREATE TABLE {$this->getTable('oauth2_auth_codes')} (id INT NOT NULL, client_id INT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, redirect_uri TEXT NOT NULL, expires_at INT DEFAULT NULL, scope VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_EE52E3FA5F37A13B ON {$this->getTable('oauth2_auth_codes')} (token);
|
||||
CREATE INDEX IDX_EE52E3FA19EB6921 ON {$this->getTable('oauth2_auth_codes')} (client_id);
|
||||
CREATE INDEX IDX_EE52E3FAA76ED395 ON {$this->getTable('oauth2_auth_codes')} (user_id);
|
||||
CREATE TABLE {$this->getTable('user')} (id INT 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, salt VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, last_login TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, locked BOOLEAN NOT NULL, expired BOOLEAN NOT NULL, expires_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, confirmation_token VARCHAR(255) DEFAULT NULL, password_requested_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, roles TEXT NOT NULL, credentials_expired BOOLEAN NOT NULL, credentials_expire_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, name TEXT DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, authCode INT DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, trusted TEXT DEFAULT NULL, PRIMARY KEY(id));
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON {$this->getTable('user')} (username_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON {$this->getTable('user')} (email_canonical);
|
||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON {$this->getTable('user')} (confirmation_token);
|
||||
COMMENT ON COLUMN {$this->getTable('user')}.roles IS '(DC2Type:array)';
|
||||
COMMENT ON COLUMN {$this->getTable('user')}.trusted IS '(DC2Type:json_array)';
|
||||
CREATE TABLE {$this->getTable('annotation')} (id INT NOT NULL, user_id INT DEFAULT NULL, entry_id INT DEFAULT NULL, text TEXT NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, quote VARCHAR(255) NOT NULL, ranges TEXT NOT NULL, PRIMARY KEY(id));
|
||||
CREATE INDEX IDX_A7AED006A76ED395 ON {$this->getTable('annotation')} (user_id);
|
||||
CREATE INDEX IDX_A7AED006BA364942 ON {$this->getTable('annotation')} (entry_id);
|
||||
COMMENT ON COLUMN {$this->getTable('annotation')}.ranges IS '(DC2Type:array)';
|
||||
CREATE SEQUENCE "entry_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
CREATE SEQUENCE "config_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
CREATE SEQUENCE "tagging_rule_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
@ -148,19 +145,19 @@ CREATE SEQUENCE oauth2_refresh_tokens_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
CREATE SEQUENCE oauth2_auth_codes_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
CREATE SEQUENCE "user_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
CREATE SEQUENCE annotation_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
|
||||
ALTER TABLE "wallabag_entry" ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES "wallabag_tag" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE "wallabag_config" ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE "wallabag_tagging_rule" ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES "wallabag_config" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('entry')} ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES {$this->getTable('tag')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('config')} ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('tagging_rule')} ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES {$this->getTable('config')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
|
||||
SQL
|
||||
;
|
||||
foreach (explode("\n", $sql) as $query) {
|
||||
@ -175,17 +172,17 @@ SQL
|
||||
*/
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$this->addSql('DROP TABLE wallabag_craue_config_setting');
|
||||
$this->addSql('DROP TABLE "wallabag_tagging_rule"');
|
||||
$this->addSql('DROP TABLE "wallabag_config"');
|
||||
$this->addSql('DROP TABLE "wallabag_entry"');
|
||||
$this->addSql('DROP TABLE wallabag_entry_tag');
|
||||
$this->addSql('DROP TABLE "wallabag_tag"');
|
||||
$this->addSql('DROP TABLE wallabag_oauth2_refresh_tokens');
|
||||
$this->addSql('DROP TABLE wallabag_oauth2_access_tokens');
|
||||
$this->addSql('DROP TABLE wallabag_oauth2_clients');
|
||||
$this->addSql('DROP TABLE wallabag_oauth2_auth_codes');
|
||||
$this->addSql('DROP TABLE "wallabag_user"');
|
||||
$this->addSql('DROP TABLE wallabag_annotation');
|
||||
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('tagging_rule')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('config')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('entry')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('entry_tag')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('tag')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('oauth2_refresh_tokens')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('oauth2_access_tokens')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('oauth2_clients')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('oauth2_auth_codes')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('user')}");
|
||||
$this->addSql("DROP TABLE {$this->getTable('annotation')}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added foreign keys for account resetting.
|
||||
*/
|
||||
class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20160410190541 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -56,9 +44,4 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added name field on wallabag_oauth2_clients.
|
||||
*/
|
||||
class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20160812120952 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -65,9 +53,4 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
|
||||
$clientsTable->dropColumn('name');
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added settings for RabbitMQ and Redis imports.
|
||||
*/
|
||||
class Version20160911214952 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20160911214952 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -56,9 +44,4 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added pocket_consumer_key field on wallabag_config.
|
||||
*/
|
||||
class Version20160916201049 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20160916201049 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
|
||||
$configTable->dropColumn('pocket_consumer_key');
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,27 +2,15 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added pocket_consumer_key field on wallabag_config.
|
||||
*/
|
||||
class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161001072726 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -36,7 +24,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
||||
$query = $this->connection->query("
|
||||
SELECT CONSTRAINT_NAME
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE TABLE_NAME = '" . $this->getTable('entry_tag') . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||
WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||
);
|
||||
$query->execute();
|
||||
@ -54,7 +42,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
||||
FROM pg_constraint c
|
||||
JOIN pg_namespace n ON n.oid = c.connamespace
|
||||
WHERE contype = 'f'
|
||||
AND conrelid::regclass::text = '" . $this->getTable('entry_tag') . "'
|
||||
AND conrelid::regclass::text = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
AND n.nspname = 'public';"
|
||||
);
|
||||
$query->execute();
|
||||
@ -75,7 +63,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
||||
$query = $this->connection->query("
|
||||
SELECT CONSTRAINT_NAME
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE TABLE_NAME = '" . $this->getTable('annotation') . "'
|
||||
WHERE TABLE_NAME = '" . $this->getTable('annotation', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
AND CONSTRAINT_NAME LIKE 'FK_%'
|
||||
AND COLUMN_NAME = 'entry_id'
|
||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||
@ -95,7 +83,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
||||
FROM pg_constraint c
|
||||
JOIN pg_namespace n ON n.oid = c.connamespace
|
||||
WHERE contype = 'f'
|
||||
AND conrelid::regclass::text = '" . $this->getTable('annotation') . "'
|
||||
AND conrelid::regclass::text = '" . $this->getTable('annotation', WallabagMigration::UN_ESCAPED_TABLE) . "'
|
||||
AND n.nspname = 'public'
|
||||
AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
|
||||
);
|
||||
@ -117,9 +105,4 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Converted database to utf8mb4 encoding (for MySQL only).
|
||||
*/
|
||||
class Version20161022134138 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161022134138 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -29,7 +17,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
|
||||
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
|
||||
|
||||
// convert field length for utf8mb4
|
||||
// http://stackoverflow.com/a/31474509/569101
|
||||
@ -60,7 +48,7 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||
|
||||
$this->addSql('ALTER DATABASE ' . $this->connection->getParams()['dbname'] . ' CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
|
||||
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');
|
||||
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
|
||||
@ -77,9 +65,4 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,28 +2,16 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
|
||||
*/
|
||||
class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161024212538 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
private $constraintName = 'IDX_user_oauth_client';
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -59,9 +47,4 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
|
||||
$clientsTable->removeForeignKey($this->constraintName);
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added the internal setting to enable/disable downloading pictures.
|
||||
*/
|
||||
class Version20161031132655 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161031132655 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,28 +2,16 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added created_at index on entry table.
|
||||
*/
|
||||
class Version20161104073720 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161104073720 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
private $indexName = 'IDX_entry_created_at';
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -45,9 +33,4 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropIndex($this->indexName);
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added action_mark_as_read field on config table.
|
||||
*/
|
||||
class Version20161106113822 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161106113822 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -48,9 +36,4 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$configTable->dropColumn('action_mark_as_read');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added the internal setting to share articles to unmark.it.
|
||||
*/
|
||||
class Version20161117071626 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161117071626 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -56,9 +44,4 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add http_status in `entry_table`.
|
||||
*/
|
||||
class Version20161118134328 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161118134328 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -48,9 +36,4 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropColumn('http_status');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add the restricted_access internal setting for articles with paywall.
|
||||
*/
|
||||
class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161122144743 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Methods and properties removed from `FOS\UserBundle\Model\User`.
|
||||
@ -18,18 +16,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
* You need to drop the fields `expired` and `credentials_expired` from your database
|
||||
* schema, because they aren't mapped anymore.
|
||||
*/
|
||||
class Version20161122203647 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161122203647 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -55,9 +43,4 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
|
||||
$userTable->addColumn('expired', 'smallint', ['notnull' => false]);
|
||||
$userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]);
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added list_mode in user config.
|
||||
*/
|
||||
class Version20161128084725 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161128084725 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -41,9 +29,4 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI
|
||||
$configTable = $schema->getTable($this->getTable('config'));
|
||||
$configTable->dropColumn('list_mode');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,15 +2,13 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Removed locked, credentials_expire_at and expires_at.
|
||||
*/
|
||||
class Version20161128131503 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161128131503 extends WallabagMigration
|
||||
{
|
||||
private $fields = [
|
||||
'locked' => 'smallint',
|
||||
@ -18,16 +16,6 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
|
||||
'expires_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -53,9 +41,4 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
|
||||
$userTable->addColumn($field, $type, ['notnull' => false]);
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Renamed uuid to uid in entry table.
|
||||
*/
|
||||
class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161214094402 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -67,9 +55,4 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid');
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,28 +2,16 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added index on wallabag_entry.uid.
|
||||
*/
|
||||
class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20161214094403 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
private $indexName = 'IDX_entry_uid';
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -45,9 +33,4 @@ class Version20161214094403 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropIndex($this->indexName);
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,29 +2,17 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.
|
||||
*/
|
||||
class Version20170127093841 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170127093841 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
private $indexStarredName = 'IDX_entry_starred';
|
||||
private $indexArchivedName = 'IDX_entry_archived';
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -48,9 +36,4 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI
|
||||
$entryTable->dropIndex($this->indexStarredName);
|
||||
$entryTable->dropIndex($this->indexArchivedName);
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add the share_scuttle internal setting.
|
||||
*/
|
||||
class Version20170327194233 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170327194233 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -46,9 +34,4 @@ class Version20170327194233 extends AbstractMigration implements ContainerAwareI
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add published_at and published_by in `entry` table.
|
||||
*/
|
||||
class Version20170405182620 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170405182620 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -57,9 +45,4 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropColumn('published_by');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove isPublic in Entry Table.
|
||||
*/
|
||||
class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170407200919 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -43,9 +31,4 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]);
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove download_pictures in craue_config_setting.
|
||||
*/
|
||||
class Version20170420134133 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170420134133 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20170420134133 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_pictures', '1', 'entry')");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add site credential table to store username & password for some website (behind authentication or paywall).
|
||||
*/
|
||||
class Version20170501115751 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170501115751 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -53,9 +41,4 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$schema->dropTable($this->getTable('site_credential'));
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,15 +2,13 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
|
||||
*/
|
||||
class Version20170510082609 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170510082609 extends WallabagMigration
|
||||
{
|
||||
private $fields = [
|
||||
'username',
|
||||
@ -19,16 +17,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
||||
'email_canonical',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -52,9 +40,4 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;');
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Added `headers` field in entry table.
|
||||
*/
|
||||
class Version20170511115400 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170511115400 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -47,9 +35,4 @@ class Version20170511115400 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropColumn('headers');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,27 +2,15 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Increase the length of the "quote" column of "annotation" table.
|
||||
*/
|
||||
class Version20170511211659 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170511211659 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$tableName = $this->getTable('annotation');
|
||||
@ -30,8 +18,8 @@ class Version20170511211659 extends AbstractMigration implements ContainerAwareI
|
||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||
case 'sqlite':
|
||||
$this->addSql(<<<EOD
|
||||
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
||||
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
||||
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||
FROM ${tableName}
|
||||
EOD
|
||||
);
|
||||
@ -56,8 +44,8 @@ EOD
|
||||
);
|
||||
|
||||
$this->addSql(<<<EOD
|
||||
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
|
||||
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
|
||||
FROM __temp__wallabag_annotation;
|
||||
EOD
|
||||
);
|
||||
@ -88,9 +76,4 @@ EOD
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add api_user_registration in craue_config_setting.
|
||||
*/
|
||||
class Version20170602075214 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170602075214 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,27 +2,15 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Remove wallabag_url from craue_config_setting.
|
||||
* It has been moved into the parameters.yml.
|
||||
*/
|
||||
class Version20170606155640 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170606155640 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -45,9 +33,4 @@ class Version20170606155640 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Changed tags to lowercase.
|
||||
*/
|
||||
class Version20170719231144 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170719231144 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -75,7 +63,7 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
||||
WHERE tag_id IN (' . implode(',', $ids) . ')
|
||||
AND entry_id NOT IN (
|
||||
SELECT entry_id
|
||||
FROM ' . $this->getTable('entry_tag') . '
|
||||
FROM (SELECT * FROM ' . $this->getTable('entry_tag') . ') AS _entry_tag
|
||||
WHERE tag_id = ' . $newId . '
|
||||
)'
|
||||
);
|
||||
@ -108,9 +96,4 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
throw new SkipMigrationException('Too complex ...');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add starred_at column and set its value to updated_at for is_starred entries.
|
||||
*/
|
||||
class Version20170824113337 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20170824113337 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -60,9 +48,4 @@ class Version20170824113337 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropColumn('starred_at');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Changed reading_time field to prevent null value.
|
||||
*/
|
||||
class Version20171008195606 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20171008195606 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -57,9 +45,4 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add origin_url column.
|
||||
*/
|
||||
class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20171105202000 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -47,9 +35,4 @@ class Version20171105202000 extends AbstractMigration implements ContainerAwareI
|
||||
|
||||
$entryTable->dropColumn('origin_url');
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add store_article_headers in craue_config_setting.
|
||||
*/
|
||||
class Version20171120163128 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20171120163128 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20171120163128 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,26 +2,14 @@
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||
|
||||
/**
|
||||
* Add shaarli_share_origin_url in craue_config_setting.
|
||||
*/
|
||||
class Version20171125164500 extends AbstractMigration implements ContainerAwareInterface
|
||||
class Version20171125164500 extends WallabagMigration
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
@ -44,9 +32,4 @@ class Version20171125164500 extends AbstractMigration implements ContainerAwareI
|
||||
{
|
||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
||||
}
|
||||
|
||||
private function getTable($tableName)
|
||||
{
|
||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,5 +36,5 @@ share_public: Autorizar una URL publica pels articles
|
||||
download_images_enabled: Telecargar los imatges en local
|
||||
restricted_access: Activar l'autenticacion pels sites amb peatge
|
||||
api_user_registration: Autorizar los utilizaires a se marcar amb l'API
|
||||
# store_article_headers: Enable if wallabag stores HTTP headers for each article
|
||||
# shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled
|
||||
store_article_headers: Activar se wallabag garda las entèstas HTTP per cada article
|
||||
shaarli_share_origin_url: Activar lo partatge de l’url amb Shaarli, se lo servici es activat
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# settings_changed: Configuration updated
|
||||
download_pictures: Download imagens no seu servidor
|
||||
carrot: Habilitar compartilhamento para o Carrot
|
||||
diaspora_url: URL Diaspora, se o serviço está habilitado
|
||||
diaspora_url: URL Diaspora caso o serviço esteja habilitado
|
||||
export_epub: Habilita exportação para ePub
|
||||
export_mobi: Habilita exportação para .mobi
|
||||
export_pdf: Habilita exportação para PDF
|
||||
@ -11,9 +11,10 @@ export_txt: Habilita exportação para TXT
|
||||
export_xml: Habilita exportação para XML
|
||||
# import_with_rabbitmq: Enable RabbitMQ to import data asynchronously
|
||||
# import_with_redis: Enable Redis to import data asynchronously
|
||||
shaarli_url: URL Shaarli, se o serviço está habilitado
|
||||
scuttle_url: URL Scuttle, se o serviço está habilitado
|
||||
unmark_url: URL Unmark, se o serviço está habilitado
|
||||
shaarli_url: URL Shaarli caso o serviço esteja habilitado
|
||||
scuttle_url: URL Scuttle caso o serviço esteja habilitado
|
||||
unmark_url: URL Unmark caso o serviço esteja habilitado
|
||||
pocket_consumer_key: Chave de consumidor do Pocket para importar conteúdo (https://getpocket.com/developer/docs/authentication)
|
||||
share_diaspora: Habilitar compartilhamento para o Diaspora
|
||||
share_mail: Habilitar compartilhamento por e-mail
|
||||
share_shaarli: Habilitar compartilhamento para o Shaarli
|
||||
|
||||
@ -13,8 +13,10 @@ import './global.scss';
|
||||
import './js/shortcuts/entry';
|
||||
import './js/shortcuts/main';
|
||||
|
||||
import { savePercent, retrievePercent } from './js/tools';
|
||||
/* Hightlight */
|
||||
import './js/highlight';
|
||||
|
||||
import { savePercent, retrievePercent } from './js/tools';
|
||||
|
||||
/* ==========================================================================
|
||||
Annotations & Remember position
|
||||
@ -65,7 +67,7 @@ $(document).ready(() => {
|
||||
retrievePercent(x.entryId);
|
||||
|
||||
$(window).resize(() => {
|
||||
retrievePercent(x.entryId);
|
||||
retrievePercent(x.entryId, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
8
app/Resources/static/themes/_global/js/highlight.js
Normal file
8
app/Resources/static/themes/_global/js/highlight.js
Normal file
@ -0,0 +1,8 @@
|
||||
import 'highlight.js/styles/atom-one-light.css';
|
||||
import * as hljs from 'highlight.js';
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
document.querySelectorAll('pre').forEach((node) => {
|
||||
hljs.highlightBlock(node);
|
||||
});
|
||||
});
|
||||
@ -19,14 +19,16 @@ function savePercent(id, percent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function retrievePercent(id) {
|
||||
function retrievePercent(id, resized) {
|
||||
if (!supportsLocalStorage()) { return false; }
|
||||
|
||||
const bheight = $(document).height();
|
||||
const percent = localStorage[`wallabag.article.${id}.percent`];
|
||||
const scroll = bheight * percent;
|
||||
|
||||
$('html,body').animate({ scrollTop: scroll }, 'fast');
|
||||
if (!resized) {
|
||||
$('html,body').animate({ scrollTop: scroll }, 'fast');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
color: #424242;
|
||||
font-size: 18px;
|
||||
line-height: 1.7em;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
h1,
|
||||
h2,
|
||||
|
||||
@ -25,7 +25,6 @@ main {
|
||||
max-height: 80px;
|
||||
font-size: 19px;
|
||||
font-family: roberto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #313131;
|
||||
}
|
||||
|
||||
.card-stacked .card-content .card-title {
|
||||
@ -251,6 +250,10 @@ a.original:not(.waves-effect) {
|
||||
float: right;
|
||||
max-width: 6em;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
#content .collection .collection-item {
|
||||
|
||||
@ -22,6 +22,16 @@
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.nav-panels .action {
|
||||
padding-right: 0.75rem;
|
||||
}
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
/* ==========================================================================
|
||||
Nav
|
||||
========================================================================== */
|
||||
nav,
|
||||
.nav-wrapper {
|
||||
nav {
|
||||
height: auto;
|
||||
line-height: initial;
|
||||
}
|
||||
@ -18,25 +17,25 @@ nav {
|
||||
}
|
||||
}
|
||||
|
||||
.nav-wrapper {
|
||||
.nav-panel-item .button-collapse {
|
||||
margin-left: 0;
|
||||
margin-right: 0.5rem;
|
||||
padding: 0 0.5rem;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.nav-panel-item {
|
||||
display: flex;
|
||||
padding: 0.6rem 0.4rem 0.6rem 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.button-collapse {
|
||||
margin-left: 0;
|
||||
margin-right: 0.5rem;
|
||||
padding: 0 0.5rem;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
nav .nav-wrapper i {
|
||||
.nav-panel-item .material-icons {
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
@ -51,8 +50,8 @@ nav .nav-wrapper i {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.nav-panel-add .add,
|
||||
.nav-panel-search .search,
|
||||
.nav-panel-item .add,
|
||||
.nav-panel-item .search,
|
||||
.nav-panels .close {
|
||||
color: #444 !important;
|
||||
}
|
||||
@ -68,9 +67,7 @@ nav .nav-wrapper i {
|
||||
.input-field input {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
padding-left: 4rem !important;
|
||||
width: calc(100% - 8rem);
|
||||
height: 4.1rem;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.input-field input:focus {
|
||||
@ -87,36 +84,45 @@ nav .nav-wrapper i {
|
||||
}
|
||||
|
||||
.input-field {
|
||||
&.nav-panel-add label,
|
||||
&.nav-panel-search label {
|
||||
&.nav-panel-item label {
|
||||
left: 1rem;
|
||||
}
|
||||
|
||||
&.nav-panel-add .close,
|
||||
&.nav-panel-search .close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 1rem;
|
||||
&.nav-panel-item .close {
|
||||
color: transparent;
|
||||
cursor: pointer;
|
||||
font-size: 2rem;
|
||||
transition: 0.3s color;
|
||||
}
|
||||
|
||||
&.nav-panel-add,
|
||||
&.nav-panel-add form,
|
||||
&.nav-panel-search,
|
||||
&.nav-panel-search form {
|
||||
&.nav-panel-item {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&.nav-panel-add form.disabled,
|
||||
&.nav-panel-add form.disabled input {
|
||||
&.nav-panel-add.disabled,
|
||||
&.nav-panel-add.disabled input {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-form-button {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
|
||||
&:focus {
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-form-button,
|
||||
.nav-panel-item .close {
|
||||
margin: 0 1%;
|
||||
}
|
||||
|
||||
#button_filters {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ div.settings div.file-field {
|
||||
|
||||
nav .input-field input {
|
||||
margin: 0;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
|
||||
@ -35,6 +35,13 @@ $(document).ready(() => {
|
||||
initFilters();
|
||||
initExport();
|
||||
|
||||
const toggleNav = (toShow, toFocus) => {
|
||||
$('.nav-panel-actions').hide(100);
|
||||
$(toShow).show(100);
|
||||
$('.nav-panels').css('background', 'white');
|
||||
$(toFocus).focus();
|
||||
};
|
||||
|
||||
$('#nav-btn-add-tag').on('click', () => {
|
||||
$('.nav-panel-add-tag').toggle(100);
|
||||
$('.nav-panel-menu').addClass('hidden');
|
||||
@ -42,34 +49,21 @@ $(document).ready(() => {
|
||||
return false;
|
||||
});
|
||||
$('#nav-btn-add').on('click', () => {
|
||||
$('.nav-panel-buttom').hide(100);
|
||||
$('.nav-panel-add').show(100);
|
||||
$('.nav-panels .action').hide(100);
|
||||
$('.nav-panel-menu').addClass('hidden');
|
||||
$('.nav-panels').css('background', 'white');
|
||||
$('#entry_url').focus();
|
||||
toggleNav('.nav-panel-add', '#entry_url');
|
||||
return false;
|
||||
});
|
||||
const materialAddForm = $('.nav-panel-add form[name=entry]');
|
||||
const materialAddForm = $('.nav-panel-add');
|
||||
materialAddForm.on('submit', () => {
|
||||
materialAddForm.addClass('disabled');
|
||||
$('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
|
||||
});
|
||||
$('#nav-btn-search').on('click', () => {
|
||||
$('.nav-panel-buttom').hide(100);
|
||||
$('.nav-panel-search').show(100);
|
||||
$('.nav-panels .action').hide(100);
|
||||
$('.nav-panel-menu').addClass('hidden');
|
||||
$('.nav-panels').css('background', 'white');
|
||||
$('#search_entry_term').focus();
|
||||
toggleNav('.nav-panel-search', '#search_entry_term');
|
||||
return false;
|
||||
});
|
||||
$('.close').on('click', () => {
|
||||
$('.nav-panel-add').hide(100);
|
||||
$('.nav-panel-search').hide(100);
|
||||
$('.nav-panel-buttom').show(100);
|
||||
$('.nav-panels .action').show(100);
|
||||
$('.nav-panel-menu').removeClass('hidden');
|
||||
$('.close').on('click', (e) => {
|
||||
$(e.target).parent('.nav-panel-item').hide(100);
|
||||
$('.nav-panel-actions').show(100);
|
||||
$('.nav-panels').css('background', 'transparent');
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -47,6 +47,7 @@ twig:
|
||||
doctrine:
|
||||
dbal:
|
||||
driver: "%database_driver%"
|
||||
driver_class: "%database_driver_class%"
|
||||
host: "%database_host%"
|
||||
port: "%database_port%"
|
||||
dbname: "%database_name%"
|
||||
|
||||
@ -23,6 +23,7 @@ swiftmailer:
|
||||
doctrine:
|
||||
dbal:
|
||||
driver: "%test_database_driver%"
|
||||
driver_class: "%test_database_driver_class%"
|
||||
host: "%test_database_host%"
|
||||
port: "%test_database_port%"
|
||||
dbname: "%test_database_name%"
|
||||
|
||||
@ -11,6 +11,8 @@ parameters:
|
||||
# database_password: %env.database_password%
|
||||
|
||||
database_driver: pdo_mysql
|
||||
database_driver_class: ~
|
||||
# database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
|
||||
database_host: 127.0.0.1
|
||||
database_port: ~
|
||||
database_name: wallabag
|
||||
|
||||
@ -8,3 +8,4 @@ parameters:
|
||||
test_database_path: "%env(TEST_DATABASE_PATH)%"
|
||||
env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite"
|
||||
test_database_charset: utf8
|
||||
test_database_driver_class: ~
|
||||
|
||||
@ -12,7 +12,7 @@ security:
|
||||
class: WallabagUserBundle:User
|
||||
property: username
|
||||
fos_userbundle:
|
||||
id: fos_user.user_provider.username
|
||||
id: fos_user.user_provider.username_email
|
||||
|
||||
# the main part of the security, where you can set up firewalls
|
||||
# for specific sections of your app
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
parameters:
|
||||
test_database_driver: pdo_mysql
|
||||
test_database_driver_class: ~
|
||||
test_database_host: localhost
|
||||
test_database_port: 3306
|
||||
test_database_name: wallabag_test
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
parameters:
|
||||
test_database_driver: pdo_pgsql
|
||||
test_database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
|
||||
test_database_host: localhost
|
||||
test_database_port:
|
||||
test_database_name: wallabag_test
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
parameters:
|
||||
test_database_driver: pdo_sqlite
|
||||
test_database_driver_class: ~
|
||||
test_database_host: localhost
|
||||
test_database_port:
|
||||
test_database_name: ~
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
wallabag_core:
|
||||
version: 2.3.0
|
||||
version: 2.3.3
|
||||
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
||||
languages:
|
||||
en: 'English'
|
||||
|
||||
@ -14,7 +14,7 @@ module.exports = function () {
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(rootDir, 'web/wallassets'),
|
||||
publicPath: '/wallassets/',
|
||||
publicPath: '',
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
"liip/theme-bundle": "^1.4.6",
|
||||
"lexik/form-filter-bundle": "^5.0.4",
|
||||
"j0k3r/graby": "^1.0",
|
||||
"friendsofsymfony/user-bundle": "^2.0.1",
|
||||
"friendsofsymfony/user-bundle": "2.0.*",
|
||||
"friendsofsymfony/oauth-server-bundle": "^1.5.2",
|
||||
"stof/doctrine-extensions-bundle": "^1.2",
|
||||
"scheb/two-factor-bundle": "^2.14.0",
|
||||
@ -94,7 +94,7 @@
|
||||
"symfony/phpunit-bridge": "^3.3",
|
||||
"friendsofphp/php-cs-fixer": "~2.0",
|
||||
"m6web/redis-mock": "^2.0",
|
||||
"dama/doctrine-test-bundle": "^3.0"
|
||||
"dama/doctrine-test-bundle": "^4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"post-cmd": [
|
||||
|
||||
966
composer.lock
generated
966
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -65,6 +65,7 @@
|
||||
"dependencies": {
|
||||
"annotator": "git://github.com/wallabag/annotator.git#0f076c7d371ed25eb0793346f46982d90f2c4c85",
|
||||
"hammerjs": "^2.0.8",
|
||||
"highlight.js": "^9.12.0",
|
||||
"icomoon-free-npm": "^0.0.0",
|
||||
"jquery": "^2.1.4",
|
||||
"jquery.cookie": "^1.4.1",
|
||||
|
||||
@ -32,6 +32,6 @@
|
||||
</filter>
|
||||
|
||||
<listeners>
|
||||
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\LegacyPHPUnitListener" />
|
||||
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
# You can execute this file to update wallabag
|
||||
# eg: `sh update.sh prod`
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
COMPOSER_COMMAND='composer'
|
||||
|
||||
DIR="${BASH_SOURCE}"
|
||||
|
||||
@ -381,6 +381,14 @@ class EntryRestController extends WallabagRestController
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($entry->getDomainName())) {
|
||||
$this->get('wallabag_core.content_proxy')->setEntryDomainName($entry);
|
||||
}
|
||||
|
||||
if (empty($entry->getTitle())) {
|
||||
$this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry);
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entry);
|
||||
$em->flush();
|
||||
@ -490,6 +498,14 @@ class EntryRestController extends WallabagRestController
|
||||
$entry->setOriginUrl($data['origin_url']);
|
||||
}
|
||||
|
||||
if (empty($entry->getDomainName())) {
|
||||
$this->get('wallabag_core.content_proxy')->setEntryDomainName($entry);
|
||||
}
|
||||
|
||||
if (empty($entry->getTitle())) {
|
||||
$this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry);
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entry);
|
||||
$em->flush();
|
||||
@ -559,6 +575,9 @@ class EntryRestController extends WallabagRestController
|
||||
$this->validateAuthentication();
|
||||
$this->validateUserAccess($entry->getUser()->getId());
|
||||
|
||||
// We copy $entry to keep id in returned object
|
||||
$e = $entry;
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($entry);
|
||||
$em->flush();
|
||||
@ -566,7 +585,7 @@ class EntryRestController extends WallabagRestController
|
||||
// entry deleted, dispatch event about it!
|
||||
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
|
||||
|
||||
return $this->sendResponse($entry);
|
||||
return $this->sendResponse($e);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -64,7 +64,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
;
|
||||
|
||||
$this->io->success('Wallabag has been successfully installed.');
|
||||
$this->io->note('Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000');
|
||||
$this->io->success('You can now configure your web server, see https://doc.wallabag.org');
|
||||
}
|
||||
|
||||
protected function checkRequirements()
|
||||
|
||||
@ -502,6 +502,14 @@ class EntryController extends Controller
|
||||
$message = 'flashes.entry.notice.' . $prefixMessage . '_failed';
|
||||
}
|
||||
|
||||
if (empty($entry->getDomainName())) {
|
||||
$this->get('wallabag_core.content_proxy')->setEntryDomainName($entry);
|
||||
}
|
||||
|
||||
if (empty($entry->getTitle())) {
|
||||
$this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry);
|
||||
}
|
||||
|
||||
$this->get('session')->getFlashBag()->add('notice', $message);
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Doctrine\DBAL\Driver;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Driver\PDOPgSql\Driver;
|
||||
use Wallabag\CoreBundle\Doctrine\DBAL\Schema\CustomPostgreSqlSchemaManager;
|
||||
|
||||
/**
|
||||
* This custom driver allow to use a different schema manager
|
||||
* So we can fix the PostgreSQL 10 problem.
|
||||
*
|
||||
* @see https://github.com/wallabag/wallabag/issues/3479
|
||||
* @see https://github.com/doctrine/dbal/issues/2868
|
||||
*/
|
||||
class CustomPostgreSQLDriver extends Driver
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSchemaManager(Connection $conn)
|
||||
{
|
||||
return new CustomPostgreSqlSchemaManager($conn);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Doctrine\DBAL\Schema;
|
||||
|
||||
use Doctrine\DBAL\Schema\PostgreSqlSchemaManager;
|
||||
use Doctrine\DBAL\Schema\Sequence;
|
||||
|
||||
/**
|
||||
* This custom schema manager fix the PostgreSQL 10 problem.
|
||||
*
|
||||
* @see https://github.com/wallabag/wallabag/issues/3479
|
||||
* @see https://github.com/doctrine/dbal/issues/2868
|
||||
*/
|
||||
class CustomPostgreSqlSchemaManager extends PostgreSqlSchemaManager
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function _getPortableSequenceDefinition($sequence)
|
||||
{
|
||||
$sequenceName = $sequence['relname'];
|
||||
if ('public' !== $sequence['schemaname']) {
|
||||
$sequenceName = $sequence['schemaname'] . '.' . $sequence['relname'];
|
||||
}
|
||||
|
||||
$query = 'SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName);
|
||||
|
||||
// the `method_exists` is only to avoid test to fail:
|
||||
// DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticConnection doesn't support the `getServerVersion`
|
||||
if (method_exists($this->_conn->getWrappedConnection(), 'getServerVersion') && (float) ($this->_conn->getWrappedConnection()->getServerVersion()) >= 10) {
|
||||
$query = "SELECT min_value, increment_by FROM pg_sequences WHERE schemaname = 'public' AND sequencename = " . $this->_conn->quote($sequenceName);
|
||||
}
|
||||
|
||||
$data = $this->_conn->fetchAll($query);
|
||||
|
||||
return new Sequence($sequenceName, $data[0]['increment_by'], $data[0]['min_value']);
|
||||
}
|
||||
}
|
||||
49
src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
Normal file
49
src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
abstract class WallabagMigration extends AbstractMigration implements ContainerAwareInterface
|
||||
{
|
||||
const UN_ESCAPED_TABLE = true;
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
// because there are declared as abstract in `AbstractMigration` we need to delarer here too
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
protected function getTable($tableName, $unEscaped = false)
|
||||
{
|
||||
$table = $this->container->getParameter('database_table_prefix') . $tableName;
|
||||
|
||||
if (self::UN_ESCAPED_TABLE === $unEscaped) {
|
||||
return $table;
|
||||
}
|
||||
|
||||
// escape table name is handled using " on postgresql
|
||||
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
||||
return '"' . $table . '"';
|
||||
}
|
||||
|
||||
// return escaped table
|
||||
return '`' . $table . '`';
|
||||
}
|
||||
}
|
||||
@ -144,6 +144,38 @@ class ContentProxy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to extract and save host from entry url.
|
||||
*
|
||||
* @param Entry $entry
|
||||
*/
|
||||
public function setEntryDomainName(Entry $entry)
|
||||
{
|
||||
$domainName = parse_url($entry->getUrl(), PHP_URL_HOST);
|
||||
if (false !== $domainName) {
|
||||
$entry->setDomainName($domainName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to set a default title using:
|
||||
* - url basename, if applicable
|
||||
* - hostname.
|
||||
*
|
||||
* @param Entry $entry
|
||||
*/
|
||||
public function setDefaultEntryTitle(Entry $entry)
|
||||
{
|
||||
$url = parse_url($entry->getUrl());
|
||||
$path = pathinfo($url['path'], PATHINFO_BASENAME);
|
||||
|
||||
if (empty($path)) {
|
||||
$path = $url['host'];
|
||||
}
|
||||
|
||||
$entry->setTitle($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stock entry with fetched or imported content.
|
||||
* Will fall back to OpenGraph data if available.
|
||||
@ -155,10 +187,7 @@ class ContentProxy
|
||||
{
|
||||
$entry->setUrl($content['url']);
|
||||
|
||||
$domainName = parse_url($entry->getUrl(), PHP_URL_HOST);
|
||||
if (false !== $domainName) {
|
||||
$entry->setDomainName($domainName);
|
||||
}
|
||||
$this->setEntryDomainName($entry);
|
||||
|
||||
if (!empty($content['title'])) {
|
||||
$entry->setTitle($content['title']);
|
||||
|
||||
@ -42,14 +42,17 @@ class DownloadImages
|
||||
public function processHtml($entryId, $html, $url)
|
||||
{
|
||||
$crawler = new Crawler($html);
|
||||
$result = $crawler
|
||||
->filterXpath('//img')
|
||||
$imagesCrawler = $crawler
|
||||
->filterXpath('//img');
|
||||
$imagesUrls = $imagesCrawler
|
||||
->extract(['src']);
|
||||
$imagesSrcsetUrls = $this->getSrcsetUrls($imagesCrawler);
|
||||
$imagesUrls = array_unique(array_merge($imagesUrls, $imagesSrcsetUrls));
|
||||
|
||||
$relativePath = $this->getRelativePath($entryId);
|
||||
|
||||
// download and save the image to the folder
|
||||
foreach ($result as $image) {
|
||||
foreach ($imagesUrls as $image) {
|
||||
$imagePath = $this->processSingleImage($entryId, $image, $url, $relativePath);
|
||||
|
||||
if (false === $imagePath) {
|
||||
@ -171,6 +174,33 @@ class DownloadImages
|
||||
@rmdir($folderPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get images urls from the srcset image attribute.
|
||||
*
|
||||
* @param Crawler $imagesCrawler
|
||||
*
|
||||
* @return array An array of urls
|
||||
*/
|
||||
protected function getSrcsetUrls(Crawler $imagesCrawler)
|
||||
{
|
||||
$urls = [];
|
||||
$iterator = $imagesCrawler
|
||||
->getIterator();
|
||||
while ($iterator->valid()) {
|
||||
$srcsetAttribute = $iterator->current()->getAttribute('srcset');
|
||||
if ('' !== $srcsetAttribute) {
|
||||
$srcset = array_map('trim', explode(',', $srcsetAttribute));
|
||||
$srcsetUrls = array_map(function ($src) {
|
||||
return explode(' ', $src)[0];
|
||||
}, $srcset);
|
||||
$urls = array_merge($srcsetUrls, $urls);
|
||||
}
|
||||
$iterator->next();
|
||||
}
|
||||
|
||||
return $urls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup base folder where all images are going to be saved.
|
||||
*/
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
# default_title: 'Title of the entry'
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
notmatches: 'Testet, ob ein <i>Titel</i> nicht auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title notmatches "Fußball"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Titel des Eintrags'
|
||||
page_titles:
|
||||
unread: 'Ungelesene Einträge'
|
||||
starred: 'Favorisierte Einträge'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Title of the entry'
|
||||
page_titles:
|
||||
unread: 'Unread entries'
|
||||
starred: 'Starred entries'
|
||||
@ -264,7 +265,7 @@ about:
|
||||
who_behind_wallabag:
|
||||
developped_by: 'Developed by'
|
||||
website: 'website'
|
||||
many_contributors: 'And many others contributors ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">on Github</a>'
|
||||
many_contributors: 'And many others contributors ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">on GitHub</a>'
|
||||
project_website: 'Project website'
|
||||
license: 'License'
|
||||
version: 'Version'
|
||||
@ -322,7 +323,7 @@ howto:
|
||||
go_import: Go to import
|
||||
go_developers: Go to developers
|
||||
go_howto: Go to howto (this page!)
|
||||
go_logout: Logout
|
||||
go_logout: Log out
|
||||
list_title: Shortcuts available in listing pages
|
||||
search: Display the search form
|
||||
article_title: Shortcuts available in entry view
|
||||
@ -372,7 +373,7 @@ quickstart:
|
||||
instapaper: 'Migrate from Instapaper'
|
||||
developer:
|
||||
title: 'Developers'
|
||||
description: 'We also thought to the developers: Docker, API, translations, etc.'
|
||||
description: 'We also thought of the developers: Docker, API, translations, etc.'
|
||||
create_application: 'Create your third-party application'
|
||||
use_docker: 'Use Docker to install wallabag'
|
||||
docs:
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Título del artículo'
|
||||
page_titles:
|
||||
unread: 'Artículos no leídos'
|
||||
starred: 'Artículos favoritos'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
# default_title: 'Title of the entry'
|
||||
page_titles:
|
||||
unread: 'مقالههای خواندهنشده'
|
||||
starred: 'مقالههای برگزیده'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
notmatches: "Teste si un <i>sujet</i> ne correspond pas à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title notmatches \"football\"</code>"
|
||||
|
||||
entry:
|
||||
default_title: "Titre de l’article"
|
||||
page_titles:
|
||||
unread: "Articles non lus"
|
||||
starred: "Articles favoris"
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: "Titolo del contenuto"
|
||||
page_titles:
|
||||
unread: 'Contenuti non letti'
|
||||
starred: 'Contenuti preferiti'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
notmatches: 'Teste se <i>subjècte</i> correspond pas a una <i>recèrca</i> (sensibla a la cassa).<br />Example : <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: "Títol de l'article"
|
||||
page_titles:
|
||||
unread: 'Articles pas legits'
|
||||
starred: 'Articles favorits'
|
||||
@ -233,7 +234,7 @@ entry:
|
||||
created_at: 'Data de creacion'
|
||||
published_at: 'Data de publicacion'
|
||||
published_by: 'Publicat per'
|
||||
# provided_by: 'Provided by'
|
||||
provided_by: 'Provesit per'
|
||||
new:
|
||||
page_title: 'Enregistrar un novèl article'
|
||||
placeholder: 'http://website.com'
|
||||
@ -245,7 +246,7 @@ entry:
|
||||
page_title: 'Modificar un article'
|
||||
title_label: 'Títol'
|
||||
url_label: 'Url'
|
||||
# origin_url_label: 'Origin url (from where you found that entry)'
|
||||
origin_url_label: 'Url d’origina (ont avètz trobat aqueste article)'
|
||||
save_label: 'Enregistrar'
|
||||
public:
|
||||
shared_by_wallabag: "Aqueste article es estat partejat per <a href='%wallabag_instance%'>wallabag</a>"
|
||||
@ -399,8 +400,8 @@ tag:
|
||||
add: 'Ajustar'
|
||||
placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula."
|
||||
|
||||
# export:
|
||||
# footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
|
||||
export:
|
||||
footer_template: '<div style="text-align:center;"><p>Produch per wallabag amb %method%</p><p>Mercés de dobrir <a href="https://github.com/wallabag/wallabag/issues">una sollicitacion</a> s’avètz de problèmas amb l’afichatge d’aqueste E-Book sus vòstre periferic.</p></div>'
|
||||
|
||||
import:
|
||||
page_title: 'Importar'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
notmatches: 'Sprawdź czy <i>temat</i> nie zawiera <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł nie zawiera "piłka nożna"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Tytuł wpisu'
|
||||
page_titles:
|
||||
unread: 'Nieprzeczytane wpisy'
|
||||
starred: 'Wpisy oznaczone gwiazdką'
|
||||
@ -233,7 +234,7 @@ entry:
|
||||
created_at: 'Czas stworzenia'
|
||||
published_at: 'Data publikacji'
|
||||
published_by: 'Opublikowane przez'
|
||||
# provided_by: 'Provided by'
|
||||
provided_by: 'Dostarczony przez'
|
||||
new:
|
||||
page_title: 'Zapisz nowy wpis'
|
||||
placeholder: 'http://website.com'
|
||||
@ -245,7 +246,7 @@ entry:
|
||||
page_title: 'Edytuj wpis'
|
||||
title_label: 'Tytuł'
|
||||
url_label: 'Adres URL'
|
||||
# origin_url_label: 'Origin url (from where you found that entry)'
|
||||
origin_url_label: 'Oryginalny url (gdzie znalazłeś ten wpis)'
|
||||
save_label: 'Zapisz'
|
||||
public:
|
||||
shared_by_wallabag: "Ten artykuł został udostępniony przez <a href='%wallabag_instance%'>wallabag</a>"
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Título da entrada'
|
||||
page_titles:
|
||||
unread: 'Entradas não lidas'
|
||||
starred: 'Entradas destacadas'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
# default_title: 'Title of the entry'
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
|
||||
@ -156,6 +156,7 @@ config:
|
||||
matches: 'Тесты, в которых <i> тема </i> соответствует <i> поиску </i> (без учета регистра). Пример: <code> title matches "футбол" </code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Название записи'
|
||||
page_titles:
|
||||
unread: 'Непрочитанные записи'
|
||||
starred: 'Помеченные записи'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
notmatches: 'ทดสอบว่า <i>เรื่อง</i> นี้ไม่ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อทีไม่ตรงกับ "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'หัวข้อรายการ'
|
||||
page_titles:
|
||||
unread: 'รายการที่ไม่ได้อ่าน'
|
||||
starred: 'รายการที่แสดง'
|
||||
|
||||
@ -161,6 +161,7 @@ config:
|
||||
# notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>'
|
||||
|
||||
entry:
|
||||
default_title: 'Makalenin başlığı'
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
{% for entry in entries %}
|
||||
<div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}">
|
||||
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title|e|raw }}</a></h2>
|
||||
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title | striptags | truncate(80, true, '…') | default('entry.default_title'|trans) | raw }}</a></h2>
|
||||
|
||||
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
|
||||
<div class="estimatedTime">
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
|
||||
{% block title %}{{ entry.title|e|default('entry.default_title'|trans)|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="article">
|
||||
<header class="mbm">
|
||||
<h1>{{ entry.title|e|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
|
||||
<h1>{{ entry.title|e|default('entry.default_title'|trans)|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
|
||||
</header>
|
||||
|
||||
<div id="article_toolbar">
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<h4>{{ 'developer.clients.title'|trans }}</h4>
|
||||
<ul>
|
||||
<li><a href="{{ path('developer_create_client') }}">{{ 'developer.clients.create_new'|trans }}</a></li>
|
||||
<li><a href="{{ path('developer_create_client') }}" class="waves-effect waves-light btn">{{ 'developer.clients.create_new'|trans }}</a></li>
|
||||
</ul>
|
||||
|
||||
<h4>{{ 'developer.existing_clients.title'|trans }}</h4>
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
{% if tag is defined %}
|
||||
<a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
|
||||
{% elseif currentRoute in ['unread', 'starred', 'archive', 'all'] %}
|
||||
<a rel="alternate" type="application/rss+xml" href="{{ path(currentRoute ~ '_rss', {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
|
||||
{% endif %}
|
||||
{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
|
||||
{% set rssRoute = currentRoute %}
|
||||
{% if currentRoute == 'homepage' %}
|
||||
{% set rssRoute = 'unread' %}
|
||||
{% endif %}
|
||||
{% set rssRoute = rssRoute ~ '_rss' %}
|
||||
|
||||
<a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
|
||||
{% endif %}
|
||||
|
||||
@ -1 +1 @@
|
||||
<a id="bookmarklet" ondragend="this.click();" href="javascript:(function(){var url=location.href||url;var wllbg=window.open('{{ url('bookmarklet') }}?url=' + encodeURI(url),'_blank');})();">bag it!</a>
|
||||
<a id="bookmarklet" ondragend="this.click();" href="javascript:(function(){var url=location.href||url;var wllbg=window.open('{{ url('bookmarklet') }}?url=' + encodeURIComponent(url),'_blank');})();">bag it!</a>
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
<div class="card-content">
|
||||
{% if withPreview is defined %}
|
||||
<i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
|
||||
{% endif %}
|
||||
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}" class="card-title dot-ellipsis dot-resize-update">
|
||||
{{ entry.title | striptags | truncate(80, true, '…') | default('entry.default_title'|trans) | raw }}
|
||||
</a>
|
||||
|
||||
<div class="{{ subClass|default('original grey-text') }}">
|
||||
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a>
|
||||
{% if withTags is defined %}
|
||||
{% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'entryId': entry.id, 'listClass': ' hide-on-med-and-down'} only %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
<ul class="tools right">
|
||||
<li>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
|
||||
</li>
|
||||
|
||||
@ -10,20 +10,7 @@
|
||||
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<span class="card-title dot-ellipsis dot-resize-update">
|
||||
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}">
|
||||
{{ entry.title | striptags | truncate(80, true, '…') | raw }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="original grey-text">
|
||||
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
|
||||
<span>{{ entry.domainName|removeWww }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %}
|
||||
</div>
|
||||
|
||||
{% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}
|
||||
|
||||
@ -6,27 +6,10 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<span class="card-title dot-ellipsis dot-resize-update">
|
||||
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
|
||||
{{ entry.title| striptags | truncate(120, true, '…') | raw }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="metadata">
|
||||
<a href="{{ entry.url|e }}" class="grey-text domain" target="_blank" title="{{ entry.domainName|removeWww }}">
|
||||
<span>{{ entry.domainName|removeWww }}</span>
|
||||
</a>
|
||||
{% for tag in entry.tags | slice(0, 3) %}
|
||||
<span class="chip hide-on-med-and-down">
|
||||
<a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %}
|
||||
<ul class="tools-list hide-on-small-only">
|
||||
<li>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
|
||||
</li>
|
||||
|
||||
@ -1,25 +1,6 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-content">
|
||||
<span class="card-title dot-ellipsis dot-resize-update">
|
||||
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
|
||||
{{ entry.title | striptags | truncate(80, true, '…') | raw }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="original grey-text">
|
||||
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
|
||||
<span>{{ entry.domainName|removeWww }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p>{{ entry.content|striptags|slice(0, 250)|raw }}…</p>
|
||||
<ul class="card-entry-labels-hidden">
|
||||
{% for tag in entry.tags | slice(0, 2) %}
|
||||
<li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %}
|
||||
</div>
|
||||
|
||||
{% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %}
|
||||
|
||||
@ -10,22 +10,7 @@
|
||||
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
|
||||
|
||||
<span class="card-title dot-ellipsis dot-resize-update">
|
||||
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
|
||||
{{ entry.title | striptags | truncate(80, true, '…') | raw }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<div class="original grey-text">
|
||||
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
|
||||
<span>{{ entry.domainName|removeWww }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %}
|
||||
</div>
|
||||
|
||||
<div class="card-reveal">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user