forked from wallabag/wallabag
Compare commits
950 Commits
2.3.0
...
feature/rs
| Author | SHA1 | Date | |
|---|---|---|---|
| 42c4ad0f93 | |||
| d388debcab | |||
| a3da7e0686 | |||
| a29a15c98d | |||
| bd79c8244e | |||
| 6c56444c4e | |||
| a0c838507d | |||
| ba6d991f6e | |||
| 79f1a8a0cc | |||
| c99caa0968 | |||
| 2a253d24ca | |||
| 3095c0d51f | |||
| e2a6487b4f | |||
| aaedb0ad3c | |||
| b83855b00b | |||
| b75b649eff | |||
| 03ac06a84e | |||
| d647e50597 | |||
| 0cf743f6fb | |||
| 2a74acb77f | |||
| 372810b687 | |||
| 9dfceff022 | |||
| 0db1322941 | |||
| bf7cf20b44 | |||
| 29e16095f4 | |||
| 27113f4562 | |||
| a5ac604683 | |||
| 557e810c1f | |||
| 23ea2c8f74 | |||
| b3223101d0 | |||
| 9717d01298 | |||
| 0914a6f2fd | |||
| 438a05c3c8 | |||
| ba9e1c02ae | |||
| 5e39e5b6a9 | |||
| d50c93f055 | |||
| 976b4bbb11 | |||
| b33226c3a2 | |||
| e247450ade | |||
| 61007d58dd | |||
| 34fe51454a | |||
| b23d9403ec | |||
| a08b0bf828 | |||
| d9a68f6ced | |||
| 7f88c7423f | |||
| 0e8a0f77d0 | |||
| 71f7e58fbd | |||
| 25c754f62f | |||
| 7408a6cb68 | |||
| b22eb27623 | |||
| 2495b19761 | |||
| f39c5a2a70 | |||
| 24230a5130 | |||
| c675bd11c6 | |||
| 8a8a78a64c | |||
| 467327771a | |||
| 31e3a233a4 | |||
| 4e3d0afc73 | |||
| 1ae6f32b82 | |||
| 26e5b452a6 | |||
| 3252f20102 | |||
| 692501f23e | |||
| 6bd8f626e4 | |||
| 01f8a776a4 | |||
| a6b5b8f7a9 | |||
| b367534991 | |||
| 558651783a | |||
| 2ca2ed39fd | |||
| 7443da479f | |||
| 5434577883 | |||
| 361aa02e2a | |||
| ca7e0756db | |||
| 48f9a9632d | |||
| a19caf8a37 | |||
| 39133eb796 | |||
| f3565ea2bf | |||
| 395e6bfcee | |||
| 7b948005be | |||
| facf7511ca | |||
| 35359a23c1 | |||
| e349c879fa | |||
| 2b21cc8869 | |||
| 4ff1efa418 | |||
| b4ecbf2bb2 | |||
| fc096bdc32 | |||
| 20a99c772a | |||
| 78eae449aa | |||
| 607e1a1a13 | |||
| 365b3dd21f | |||
| d20a8c5fb4 | |||
| 023c8117ec | |||
| de9b5b5f4c | |||
| b283ee0d6d | |||
| 4d3478ec53 | |||
| a0cb41c509 | |||
| 1598d13248 | |||
| 0bddd34847 | |||
| a07872238b | |||
| fbfeb20062 | |||
| f547e4a7d4 | |||
| 8b165a9a50 | |||
| 3cd659fc34 | |||
| fdf90f8411 | |||
| d31f70bfac | |||
| bbf909ae6e | |||
| ff6272204e | |||
| 9d196fcc15 | |||
| 6277578d4f | |||
| b12e23ad8a | |||
| c9b83a13c0 | |||
| 11079d204d | |||
| 7d4176b27b | |||
| d8a40d703e | |||
| 26467fa6b4 | |||
| dcfce54681 | |||
| d15be99648 | |||
| 8ee7b1603d | |||
| ef81e3c89b | |||
| 7fc38f667b | |||
| 91c318e870 | |||
| f3b1ec121d | |||
| 2226c81340 | |||
| f38b8f0d86 | |||
| f3db257902 | |||
| 899ab0d04f | |||
| ba820b12b6 | |||
| 552957bbf1 | |||
| ec37106f32 | |||
| a167f002bb | |||
| d3c8bf87c2 | |||
| 9ce18f06c3 | |||
| 4a654ae49a | |||
| b19df31d78 | |||
| 80609790ca | |||
| 93c5b47e88 | |||
| 04d918cae0 | |||
| de166a37d4 | |||
| 33e3eeaec8 | |||
| 3bf941c4a4 | |||
| c1a201a472 | |||
| e09f585232 | |||
| 2a59cfa331 | |||
| 2ffaf28458 | |||
| 0c801a4758 | |||
| 62107f50d3 | |||
| 8afcb3a647 | |||
| 1de4a8f938 | |||
| 97c6561d5c | |||
| 6fb7d4a7ae | |||
| 20349b02dd | |||
| 1e921a657f | |||
| 3dcb701975 | |||
| 45582f2992 | |||
| 52cd86f1c2 | |||
| 514c55a161 | |||
| 416d44d0ae | |||
| fdb885ddbf | |||
| 94e7ba3174 | |||
| 6f43803c58 | |||
| 509097b841 | |||
| 7937ed0c20 | |||
| dc23bf9f29 | |||
| cfd77d1c2a | |||
| 996b2ec170 | |||
| a5afdc539f | |||
| 0f4e90c1ac | |||
| 0a81f9b9d9 | |||
| 913c3bc7aa | |||
| 29f5515959 | |||
| 7dc4cbe70f | |||
| 62682c073b | |||
| 49eb5405de | |||
| 68fd40e4fc | |||
| 15f8a1f09c | |||
| 36eab58bb3 | |||
| 3d850ba9ac | |||
| 66d91fa116 | |||
| 501d5fd102 | |||
| 27db0551c9 | |||
| 3f3b5058aa | |||
| 3a9576a889 | |||
| 0ca270f385 | |||
| 5a071f29b7 | |||
| bdb66a226e | |||
| 0f38757722 | |||
| de686b43e5 | |||
| 139b9aeadc | |||
| 2b90f21fe0 | |||
| 6e8f2ff97d | |||
| afe5e7f4ba | |||
| 5619a0f7ac | |||
| 725a702eb0 | |||
| 8a74cb8338 | |||
| 2e267a88a5 | |||
| 34154ecf1d | |||
| 878a886365 | |||
| 6ba1d7345b | |||
| 817b3a2157 | |||
| c8c656fa23 | |||
| d816ef0530 | |||
| 43141054d1 | |||
| f28720f81a | |||
| 7b8f63f731 | |||
| e32e6c27f1 | |||
| 6f6037d19e | |||
| 1f767ffe9b | |||
| 28236284c3 | |||
| 304d0cb6bf | |||
| f2ee6af467 | |||
| adedf85602 | |||
| 9773c082c4 | |||
| f3d20097cd | |||
| d063ef651b | |||
| 149b8c1b1d | |||
| 83d2c0a25c | |||
| 7dddb5bc24 | |||
| b76bf31bca | |||
| c6663a8853 | |||
| 6a0d49ab7a | |||
| 86c1751186 | |||
| 8197f08266 | |||
| a406434701 | |||
| 02cf65ee47 | |||
| 4c43b82fed | |||
| 33aa6ef110 | |||
| 77728731a4 | |||
| d3847ac125 | |||
| df5f0990ec | |||
| 47b1f433dd | |||
| 4421e2a402 | |||
| a43ebdb6a3 | |||
| 8d84ed16b7 | |||
| bda2e169aa | |||
| 38adc00267 | |||
| 48b0163d24 | |||
| 8668796106 | |||
| a9753ef990 | |||
| 31579b75fc | |||
| bff82c3202 | |||
| 93a4cefdbc | |||
| 069229e19c | |||
| 958e77e6a7 | |||
| 3c5aa05311 | |||
| e5bc1e84d1 | |||
| 1ddd66ae70 | |||
| 9baf99adb4 | |||
| 98d8e0c1b9 | |||
| 4a31f3b6a2 | |||
| 092b042342 | |||
| 7f2ae89d0d | |||
| 075a3b3e0a | |||
| 8d4ed0df06 | |||
| 8d8d6818fb | |||
| 638f799af3 | |||
| 76fe5dfb71 | |||
| 240aff0df6 | |||
| 3b51b1e438 | |||
| 3ae2549537 | |||
| 34e5cf096d | |||
| a4141aa934 | |||
| ddd3700cb5 | |||
| 181dbaaadf | |||
| 64885da458 | |||
| 2068b4458d | |||
| 3b79c1ac4e | |||
| 3d8eaa3ade | |||
| ba32a8a7c5 | |||
| 987237d588 | |||
| d69cdfbd74 | |||
| 96d5bb1bf5 | |||
| 07c66a7435 | |||
| bc3ebfd1a8 | |||
| 7a4c375ebf | |||
| ce4c2ead4b | |||
| d8e961bdb5 | |||
| 488e3d7a91 | |||
| 652cb58d59 | |||
| afe486531d | |||
| 797fd5fa24 | |||
| 0d0d1dae5a | |||
| 0e23ce4ac6 | |||
| 195414ef0a | |||
| 5ab30ba997 | |||
| 41fd648711 | |||
| 7ed081fbce | |||
| 1d7c4e75d3 | |||
| 0ff962829a | |||
| ad5213609f | |||
| eb0fa19089 | |||
| 43fab7363d | |||
| 3824f0dc3c | |||
| 14b73c6a1e | |||
| 819269f0f2 | |||
| 088804537e | |||
| 90d28270d5 | |||
| 2f5fa30aad | |||
| ed59ec63aa | |||
| 2133ca3116 | |||
| 492aacd194 | |||
| af7b22a3be | |||
| c7fce40b44 | |||
| 1a75823045 | |||
| ad8971856a | |||
| cc7b2b912a | |||
| 63e4ce5ce3 | |||
| 3f6700fd6c | |||
| 3f2e602f36 | |||
| 33b75b3b51 | |||
| 31363f3687 | |||
| bdf8630c8d | |||
| 6642600115 | |||
| b1574a3987 | |||
| e337267d76 | |||
| 77808a1874 | |||
| ba863a801e | |||
| 5e8d8ff594 | |||
| ea1a9f6f4d | |||
| 5c3f772c34 | |||
| 7c12ee1d94 | |||
| 86e60812fb | |||
| a123881a83 | |||
| 89b23fb8ed | |||
| e7ceabf476 | |||
| dab8b3958b | |||
| 0c46b5469a | |||
| 61e53dda3c | |||
| 02efa4d457 | |||
| 997d10a06d | |||
| 795de6daa7 | |||
| b2439a8e4e | |||
| 8ecab22d32 | |||
| 984d63df8d | |||
| 1b49417fc6 | |||
| 773cf64c20 | |||
| e9ccc686ac | |||
| 56d3942385 | |||
| 5d08dd2799 | |||
| 1576905e03 | |||
| 97c678a0b2 | |||
| 00567d9ccd | |||
| 0810c75e0b | |||
| 1a6980dbd1 | |||
| 06825216bc | |||
| a634bcee1e | |||
| ccf0fa9d70 | |||
| 2b0f4e86b2 | |||
| 588de419e0 | |||
| b700b38e17 | |||
| 24acf2e0f3 | |||
| 5071c8c9cf | |||
| d1dbe10e84 | |||
| 08a3ed1c68 | |||
| 12c03239b3 | |||
| 7f0e0b3f38 | |||
| 03c818bbfb | |||
| 8f015c2107 | |||
| 8bbd0bf0a1 | |||
| aea7d05770 | |||
| 38d2e25123 | |||
| 4c25546235 | |||
| 883ccc235e | |||
| 13fddc353e | |||
| affa6602f0 | |||
| 1ebc8e1f02 | |||
| 02a7eb8435 | |||
| 62665a32bb | |||
| b0ba7ff446 | |||
| b7cf2fa190 | |||
| 313d735078 | |||
| 28378675f1 | |||
| 3a9aa28558 | |||
| 51d7f62b31 | |||
| 9a80dcf11e | |||
| 3a08e81969 | |||
| 4910361ac4 | |||
| f5f759e389 | |||
| 879f8eaa18 | |||
| df45126a14 | |||
| 2f62f3abfe | |||
| 66fa0c26ab | |||
| ff8fe22f2e | |||
| 4f46330087 | |||
| 41022cb289 | |||
| d0cf488dd4 | |||
| 8effd6e99e | |||
| 34be2d5de4 | |||
| 92cd51aa2c | |||
| 849959e380 | |||
| d0841c7a27 | |||
| 8b0aa0a39d | |||
| 154d09745f | |||
| 0deec4082f | |||
| 830cce45b3 | |||
| eba75bf295 | |||
| 6f80db6970 | |||
| 2c8dcab738 | |||
| d269cf1257 | |||
| 4ef4b64cc2 | |||
| bbc67a5589 | |||
| b8fa1b13a6 | |||
| 5c29ae4cf6 | |||
| b0817af024 | |||
| cfff90c5af | |||
| 04bc1faa73 | |||
| 38f87f5d61 | |||
| dbe56d5c4f | |||
| 689b5fdf80 | |||
| c546548ec3 | |||
| ac4fda6ae9 | |||
| bd6a7622d3 | |||
| 29fa957587 | |||
| cdf458722d | |||
| ac5844a68e | |||
| a2f4efe6d2 | |||
| 0a01a5f195 | |||
| c1a5dfe5e4 | |||
| 8bfcb20f65 | |||
| 7319e7e0b3 | |||
| 1f36a21887 | |||
| 0896bb3067 | |||
| e06303d8ec | |||
| a59227db6b | |||
| a531536522 | |||
| 2a61e13fae | |||
| 227e44d49c | |||
| 4552f1c117 | |||
| 22807de7c5 | |||
| 3ed30d3415 | |||
| 1d699489b5 | |||
| 9b36a93b52 | |||
| 6657b11995 | |||
| f981d1d732 | |||
| 0a258f85be | |||
| 1bbdd35731 | |||
| 7a82953b3e | |||
| be8e2916c5 | |||
| 50bcf225e9 | |||
| 1009b286c9 | |||
| 865707f929 | |||
| eeae34375d | |||
| 76cc8ca26f | |||
| 12d7edd0d5 | |||
| a73b74a0f2 | |||
| a97f2bb8ed | |||
| de6171a531 | |||
| 8d37ca56f6 | |||
| 90cf1e358f | |||
| d4f465526e | |||
| cb4108b44e | |||
| 871216861a | |||
| 9c7997db8e | |||
| 35c4c80148 | |||
| 35c7819cb6 | |||
| c19845a7ae | |||
| 2b04b300f8 | |||
| c4bf12aade | |||
| 757ca53f63 | |||
| 0f2d24feb4 | |||
| ad51743e8b | |||
| d010bdd44b | |||
| 7e5b7e029a | |||
| 4fa63260e4 | |||
| c822b20835 | |||
| 955a3bde17 | |||
| 16e1c07553 | |||
| d8809f70ea | |||
| 70df4c3359 | |||
| 8671da5ead | |||
| 7abda3ba52 | |||
| f3bfb875e9 | |||
| ecd54aa57e | |||
| b7fa51ae7d | |||
| 52e8d93248 | |||
| e9579d6de9 | |||
| 2770b6d77d | |||
| 6546aca4a3 | |||
| 73ec68b1ff | |||
| 2cbee36a01 | |||
| 48d136d3a0 | |||
| 6e68417f03 | |||
| 36b0d52ee4 | |||
| b6c1e1bacc | |||
| a91a3150fb | |||
| 448d99f84e | |||
| 1048c9c4a8 | |||
| 5f08426201 | |||
| bf9ace0643 | |||
| 92a6683562 | |||
| 2ba365c7c4 | |||
| d6cc0b249e | |||
| 5c0701ba41 | |||
| cc9731bf2b | |||
| 629a3797bc | |||
| 0132ccd2a2 | |||
| 4a5516376b | |||
| d5744bf0df | |||
| 31e276fc16 | |||
| 9ca670c801 | |||
| 65b495e75b | |||
| c1a1c46e9d | |||
| d99e6423f4 | |||
| 715fabf8f2 | |||
| 423efadefc | |||
| a2b5d67560 | |||
| feb239ea10 | |||
| 2c290747cb | |||
| b8b37ccdea | |||
| 9f0957b831 | |||
| 227a1a27f1 | |||
| cc181629a0 | |||
| eb06edba0c | |||
| b50ecd0c8a | |||
| 9e2194e9cb | |||
| a73cb8a689 | |||
| 295b714426 | |||
| 19822ecb31 | |||
| 9ae5bd9e10 | |||
| 2dbb5b2307 | |||
| 754bf12e67 | |||
| d2ef2d6df8 | |||
| 637f0df976 | |||
| de1162b91a | |||
| 844fd9fafc | |||
| 77bd7f690d | |||
| 1ca9310f5e | |||
| 9306c2a368 | |||
| 570113208b | |||
| 6e67f41152 | |||
| 4b5b228650 | |||
| ea54c2adb1 | |||
| 68a90821a3 | |||
| f277bc042c | |||
| 531c8d0a5c | |||
| 522e37ad27 | |||
| 35359bd3c6 | |||
| ff8f338dc2 | |||
| f45496336f | |||
| 76bc05ebc0 | |||
| 5cc0646e66 | |||
| c579ce2306 | |||
| 8a64566298 | |||
| 9c2b2aae70 | |||
| bfe02a0b48 | |||
| 3620dae1e6 | |||
| bfd69c74e5 | |||
| 8ab5dcc467 | |||
| 893f107fa1 | |||
| 8ca858ee73 | |||
| 41d476d7e7 | |||
| 7c553a6017 | |||
| a48ff25d4c | |||
| cf0010cf4a | |||
| 13d2fe6d2e | |||
| 3d7a1f4caf | |||
| 36fd8e5fde | |||
| f2aa373054 | |||
| 4ae4fa7b89 | |||
| 6640a922d1 | |||
| 246cc9ac93 | |||
| f1f1efb5de | |||
| 806635f7d5 | |||
| 05232afe32 | |||
| fb7dedf36c | |||
| b886ee923d | |||
| 85403dae04 | |||
| fcd54e2447 | |||
| c2efb5a306 | |||
| 1e9c710fdd | |||
| fc4c1f50b4 | |||
| 8c0ba95307 | |||
| ea925bb112 | |||
| 3784688a88 | |||
| d5154ee2ae | |||
| 4de99d1ab1 | |||
| 12a97c3522 | |||
| 508302042f | |||
| 9a7a0e1e6b | |||
| 4e0ed3368d | |||
| c01bda038e | |||
| b1992b340e | |||
| 44560c7767 | |||
| 0182cdaec4 | |||
| a9f61d3dbb | |||
| a86c3f1759 | |||
| baa5ee2d42 | |||
| 18460b2d79 | |||
| 47e4784110 | |||
| 7e04bd4ca4 | |||
| 2e5b3fa361 | |||
| 755753e3ef | |||
| 8d082488e9 | |||
| a2e60dd393 | |||
| 4654a83b64 | |||
| 7485a272ff | |||
| c416ed485f | |||
| a0c5eb003f | |||
| 4c0e747940 | |||
| e073090b8d | |||
| 6df8b9c6a9 | |||
| 842af5c357 | |||
| dfd0a7bc5f | |||
| 6e4fc956ab | |||
| 43ccf4b178 | |||
| 2dfbe9e5fa | |||
| edc79ad886 | |||
| a6b242a1fd | |||
| acd4412080 | |||
| c6024246b7 | |||
| a8f4f7665c | |||
| e19fc02665 | |||
| 8010425444 | |||
| 019e1acc49 | |||
| 9133bd02d1 | |||
| b32057980e | |||
| 6113dbbc20 | |||
| 3527c30021 | |||
| fe5850d6e2 | |||
| 091bafeb4c | |||
| 2491c50b6b | |||
| 50f35f0db2 | |||
| 9a57653aec | |||
| 90a0d086a8 | |||
| 062fad434a | |||
| 0447a75b06 | |||
| f85d220c19 | |||
| 09ef25c3c3 | |||
| c73025ad8b | |||
| 963b873626 | |||
| 6bfbf16eeb | |||
| 1e0d8ad7b7 | |||
| b992522d85 | |||
| 293730656d | |||
| 9666fb70fc | |||
| 6b32cf0c73 | |||
| 1ec44a346b | |||
| 8445ad4790 | |||
| 3bd65991ad | |||
| 3afc87426d | |||
| 5419a8368e | |||
| f6b9e883c0 | |||
| 78e3fafa3f | |||
| a5e9a98aa3 | |||
| f083836cc4 | |||
| 314f647238 | |||
| c17d1ab033 | |||
| 3bed2e440e | |||
| 3625833b2c | |||
| 03663530ed | |||
| ca990600da | |||
| bb8ad42b27 | |||
| d4466a37fe | |||
| 3a2d4cf9fd | |||
| 5e1f27767b | |||
| dac93644e8 | |||
| ad5ef8bca0 | |||
| af83d05ce2 | |||
| 4944703edc | |||
| f810834623 | |||
| 30cf72bf55 | |||
| edd1825b58 | |||
| 063d5e7bda | |||
| 5de17117a1 | |||
| d2aec7096d | |||
| bf22266a62 | |||
| 7f8630b91c | |||
| 35983eb9bb | |||
| 8f5c4b083c | |||
| 9f8f188d92 | |||
| 2378fd6347 | |||
| 6c40d7fc85 | |||
| 2a0e0a47d8 | |||
| 0ee9848231 | |||
| 6708bf238d | |||
| bafb9744c8 | |||
| 5becf260fa | |||
| 4d0c632c70 | |||
| 4fd5f670fe | |||
| 45e26a7fc8 | |||
| a1272ab84d | |||
| 4840d618c2 | |||
| ac20dc6155 | |||
| 8bb381e78c | |||
| 63fb9d6f07 | |||
| 5c331bf0f9 | |||
| e014fa0395 | |||
| 39502b4748 | |||
| 877787e5fe | |||
| 9a8a1bdfdb | |||
| f168642b50 | |||
| b13b2ef052 | |||
| 8f2038e5b1 | |||
| 1b6b77f029 | |||
| db9b6d8d0d | |||
| 9394e8098a | |||
| 6fc95673df | |||
| 20898d5ef4 | |||
| 72efc8ceeb | |||
| 6f2287da69 | |||
| 8896f0f988 | |||
| bf483b628e | |||
| b34b489cfd | |||
| 13d94929ec | |||
| e5de9917fd | |||
| 0f159f8fc1 | |||
| 3c7900d0cd | |||
| b878be4cc9 | |||
| a03c4d90b2 | |||
| 038fccd244 | |||
| bffe65478d | |||
| 5a4cbf5b70 | |||
| ea60d76e60 | |||
| d470f817ac | |||
| dc90eab32b | |||
| e01b00298a | |||
| 2daae77094 | |||
| 59a31ed07f | |||
| 060f3ce34c | |||
| ccc3b0a531 | |||
| 0ddfb2956c | |||
| b3bcc6aa06 | |||
| a22b8043b4 | |||
| 078d54411b | |||
| c7e9610b3f | |||
| 3a69628007 | |||
| 3f0dd0f0bc | |||
| da7b8e256f | |||
| 0452e869ec | |||
| 385dac6d31 | |||
| 96823682f9 | |||
| a6e4e83809 | |||
| 1b220426e2 | |||
| 6059967951 | |||
| 44e63667d9 | |||
| 5ba5e22a09 | |||
| b49c87acf1 | |||
| fc040c749d | |||
| e07fadea76 | |||
| 781864b954 | |||
| 4a81360efc | |||
| ae4f7dceec | |||
| c2bd272cf3 | |||
| 0658ce4f11 | |||
| cefbe6a87f | |||
| e673b54f70 | |||
| 5bb01c0344 | |||
| fbdc665487 | |||
| 0ebf595c11 | |||
| ba69c04c27 | |||
| 4d4147b228 | |||
| be417ef236 | |||
| 78ef840eda | |||
| d73bfdbddb | |||
| 43b6f3a8a8 | |||
| 6a3187066f | |||
| 102f57941e | |||
| f5c862640b | |||
| 9e83c3bdf0 | |||
| 23aa47d828 | |||
| 115de64e5b | |||
| 84d59603c5 | |||
| 03b2058dbe | |||
| 32968bd30e | |||
| 559f708cae | |||
| 9b0aef9171 | |||
| b846c1e4d0 | |||
| be326a22f9 | |||
| a664a1d876 | |||
| 0f5c15d543 | |||
| 28cc645b93 | |||
| 83f1c3274f | |||
| d64139d812 | |||
| 7a65c2017b | |||
| c01d953292 | |||
| f80f16dfc8 | |||
| 8648f0c005 | |||
| d76a5a6d60 | |||
| 2b6380f5ac | |||
| 9007fe0062 | |||
| 7c0d682687 | |||
| 0e70e81227 | |||
| 7975395d10 | |||
| 2f3af70e1a | |||
| 759c91940b | |||
| 84b3bdaac0 | |||
| b6d72e0c91 | |||
| 8013f35d96 | |||
| c0b65ad1c9 | |||
| 4408ebd40a | |||
| 8d109df851 | |||
| 17476f4d8d | |||
| 7083c0a21d | |||
| 495f83c925 | |||
| eb5e3f1d1d | |||
| 04f85fd9a8 | |||
| b8115ff46b | |||
| 0636697289 | |||
| b7c5fda512 | |||
| 69b563948d | |||
| ada5d5b269 | |||
| 2a1ceb67b4 | |||
| 685a5d745e | |||
| 72efc80fdc | |||
| fea06d19f3 | |||
| 681e04b060 | |||
| 2bf568ff46 | |||
| 1421236800 | |||
| e0a9791412 | |||
| 7fd4ad6564 | |||
| d29b18e82e | |||
| e6f12c0734 | |||
| 0f36a88e16 | |||
| e93f37206a | |||
| 4c78612eb4 | |||
| 2fdd512488 | |||
| 9b12f822e1 | |||
| d02e6850c2 | |||
| 6337b46e80 | |||
| 9216bab8c9 | |||
| 9bc086071a | |||
| 80336f77fd | |||
| 200392b462 | |||
| 9c48053b14 | |||
| 18167b9a24 | |||
| 3fbbe0d9f1 | |||
| 44043ebe82 | |||
| 6cf7f21dcb | |||
| 8d09f57c0d | |||
| 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 | |||
| ed148f6685 | |||
| 10f31ac572 | |||
| 35ce4d5e5f | |||
| 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 |
@ -13,5 +13,5 @@ insert_final_newline = true
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[Makefile]
|
[*akefile]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|||||||
32
.github/CONTRIBUTING.md
vendored
32
.github/CONTRIBUTING.md
vendored
@ -1,11 +1,41 @@
|
|||||||
# How to contribute
|
# How to contribute
|
||||||
|
|
||||||
|
## Test it locally
|
||||||
|
|
||||||
|
### Using Docker
|
||||||
|
|
||||||
|
- Clone the repository
|
||||||
|
- Ensure your Docker daemon is running
|
||||||
|
- Launch `docker-compose up`
|
||||||
|
|
||||||
|
You'll then have:
|
||||||
|
- a web server (nginx)
|
||||||
|
- a PHP daemon (using FPM)
|
||||||
|
- a Redis database (to handle imports)
|
||||||
|
- a SQLite database to store articles
|
||||||
|
|
||||||
|
You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
|
||||||
|
|
||||||
|
If you want to test using an other database than SQLite, uncomment the `postgres` or `mariadb` code from the `docker-compose.yml` file at the root of the repo. Also uncomment related line in the `php` section so the database will be linked to your PHP instance.
|
||||||
|
|
||||||
|
### Using your own PHP server
|
||||||
|
|
||||||
|
- Ensure you are running PHP > 7.1.
|
||||||
|
- Clone the repository
|
||||||
|
- Launch `composer install`
|
||||||
|
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)
|
||||||
|
- Then `php bin/console wallabag:install`
|
||||||
|
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)
|
||||||
|
- Run `php bin/console server:run`
|
||||||
|
|
||||||
|
You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
|
||||||
|
|
||||||
## You found a bug
|
## You found a bug
|
||||||
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).
|
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).
|
||||||
|
|
||||||
To fix the bug quickly, we need some infos: please answer to the questions in the issue form.
|
To fix the bug quickly, we need some infos: please answer to the questions in the issue form.
|
||||||
|
|
||||||
If you have the skills, look for errors into php, server and application (see `var/logs`) logs.
|
If you have the skills, look for errors into PHP, server and application logs (see `var/logs`).
|
||||||
|
|
||||||
Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like.
|
Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like.
|
||||||
|
|
||||||
|
|||||||
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# github: [nicosomb, j0k3r, tcitworld, Kdecherf]
|
||||||
|
liberapay: wallabag
|
||||||
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -8,9 +8,15 @@
|
|||||||
| Documentation | yes/no
|
| Documentation | yes/no
|
||||||
| Translation | yes/no
|
| Translation | yes/no
|
||||||
| CHANGELOG.md | yes/no
|
| CHANGELOG.md | yes/no
|
||||||
| Fixed tickets | #...
|
|
||||||
| License | MIT
|
| License | MIT
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please list the issues your PR fixes using special keywords, see
|
||||||
|
https://help.github.com/articles/closing-issues-using-keywords/
|
||||||
|
|
||||||
|
Fixes #…
|
||||||
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
- Please fill in this template according to the PR you're about to submit.
|
- Please fill in this template according to the PR you're about to submit.
|
||||||
- Replace this comment by a description of what your PR is solving.
|
- Replace this comment by a description of what your PR is solving.
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@ -32,6 +32,7 @@ web/uploads/
|
|||||||
# Build
|
# Build
|
||||||
/app/build
|
/app/build
|
||||||
/build
|
/build
|
||||||
|
/coverage
|
||||||
|
|
||||||
# Composer PHAR
|
# Composer PHAR
|
||||||
/composer.phar
|
/composer.phar
|
||||||
@ -43,9 +44,6 @@ data/db/wallabag*.sqlite
|
|||||||
docker/logs/
|
docker/logs/
|
||||||
docker/data/
|
docker/data/
|
||||||
|
|
||||||
# To avoid crazy stuff on some PR, we must manually FORCE ADD IT on each new release
|
|
||||||
composer.lock
|
|
||||||
|
|
||||||
# assets stuff
|
# assets stuff
|
||||||
node_modules/
|
node_modules/
|
||||||
bin
|
bin
|
||||||
@ -57,3 +55,6 @@ app/Resources/build/
|
|||||||
admin-export.json
|
admin-export.json
|
||||||
specialexport.json
|
specialexport.json
|
||||||
/data/site-credentials-secret-key.txt
|
/data/site-credentials-secret-key.txt
|
||||||
|
|
||||||
|
# Custom CSS file
|
||||||
|
web/custom.css
|
||||||
|
|||||||
@ -26,3 +26,18 @@ tools:
|
|||||||
checks:
|
checks:
|
||||||
php:
|
php:
|
||||||
code_rating: true
|
code_rating: true
|
||||||
|
|
||||||
|
# use the new PHP analysis engine
|
||||||
|
# https://scrutinizer-ci.com/docs/tools/php/php-analyzer/guides/migrate_to_new_php_analysis
|
||||||
|
build:
|
||||||
|
nodes:
|
||||||
|
analysis:
|
||||||
|
tests:
|
||||||
|
override:
|
||||||
|
- php-scrutinizer-run
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
override:
|
||||||
|
- npm install -g 'yarn'
|
||||||
|
- yarn install --force
|
||||||
|
- COMPOSER_MEMORY_LIMIT=-1 composer install -o --no-interaction --no-progress --prefer-dist
|
||||||
|
|||||||
67
.travis.yml
67
.travis.yml
@ -1,34 +1,31 @@
|
|||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- rabbitmq
|
- mysql
|
||||||
- redis
|
- postgresql
|
||||||
|
- rabbitmq
|
||||||
# faster builds on docker-container setup
|
- redis
|
||||||
sudo: false
|
|
||||||
|
|
||||||
# used for HHVM
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- tidy
|
|
||||||
|
|
||||||
# cache vendor dirs
|
# cache vendor dirs
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
directories:
|
directories:
|
||||||
- vendor
|
- $HOME/.composer/cache/files
|
||||||
- $HOME/.composer/cache
|
|
||||||
- node_modules
|
- node_modules
|
||||||
- $HOME/.npm
|
- $HOME/.npm
|
||||||
- $HOME/.yarn-cache
|
- $HOME/.yarn-cache
|
||||||
|
|
||||||
|
if: |
|
||||||
|
type = pull_request OR \
|
||||||
|
branch = master
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.6
|
|
||||||
- 7.0
|
|
||||||
- 7.1
|
- 7.1
|
||||||
- 7.2
|
- 7.2
|
||||||
- nightly
|
- 7.3
|
||||||
|
- 7.4
|
||||||
|
|
||||||
node_js:
|
node_js:
|
||||||
- "5"
|
- "5"
|
||||||
@ -38,47 +35,43 @@ env:
|
|||||||
- DB=pgsql
|
- DB=pgsql
|
||||||
- DB=sqlite
|
- DB=sqlite
|
||||||
|
|
||||||
matrix:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- php: 7.0
|
- php: 7.3
|
||||||
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
||||||
allow_failures:
|
|
||||||
- php: 7.2
|
|
||||||
- php: nightly
|
|
||||||
|
|
||||||
# exclude v1 branches
|
# exclude v1 branches
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- legacy
|
- legacy
|
||||||
|
|
||||||
before_script:
|
before_install:
|
||||||
|
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
|
||||||
- PHP=$TRAVIS_PHP_VERSION
|
- PHP=$TRAVIS_PHP_VERSION
|
||||||
- if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||||
# xdebug isn't enable for PHP 7.1
|
- phpenv config-rm xdebug.ini || echo "xdebug not available"
|
||||||
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
|
||||||
- composer self-update --no-progress
|
- composer self-update --no-progress
|
||||||
- if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
# install imagick
|
||||||
|
- pear config-set preferred_state beta
|
||||||
|
- pecl channel-update pecl.php.net
|
||||||
|
- yes | pecl install imagick
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
|
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
|
||||||
- if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
|
- if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
|
||||||
- if [[ $ASSETS = build ]]; then yarn install; fi;
|
- if [[ $ASSETS = build ]]; then yarn install; fi;
|
||||||
|
- composer install -o --no-interaction --no-progress --prefer-dist --no-suggest
|
||||||
|
- php bin/simple-phpunit install
|
||||||
|
|
||||||
before_install:
|
before_script:
|
||||||
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
|
- make prepare DB=$DB
|
||||||
|
- make fixtures
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
|
||||||
- echo "travis_fold:start:prepare"
|
|
||||||
- make prepare DB=$DB
|
|
||||||
- echo "travis_fold:end:prepare"
|
|
||||||
|
|
||||||
- echo "travis_fold:start:fixtures"
|
|
||||||
- php bin/console doctrine:fixtures:load --no-interaction --env=test
|
|
||||||
- echo "travis_fold:end:fixtures"
|
|
||||||
|
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
||||||
|
# PHPStan needs PHPUnit to be installed and cache app to be generated
|
||||||
|
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then php bin/phpstan analyse src tests --no-progress --level 1 ; fi;
|
||||||
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
|
||||||
|
|||||||
26
.zappr.yaml
26
.zappr.yaml
@ -1,26 +0,0 @@
|
|||||||
# see https://zappr.opensource.zalan.do/
|
|
||||||
autobranch: false
|
|
||||||
commit: false
|
|
||||||
approvals:
|
|
||||||
minimum: 1
|
|
||||||
ignore: pr_opener
|
|
||||||
pattern: "^(:\\+1:|👍)$"
|
|
||||||
veto:
|
|
||||||
pattern: "^(:\\-1:|👎)$"
|
|
||||||
from:
|
|
||||||
orgs:
|
|
||||||
- wallabag
|
|
||||||
collaborators: true
|
|
||||||
specification:
|
|
||||||
title:
|
|
||||||
minimum-length:
|
|
||||||
enabled: true
|
|
||||||
length: 8
|
|
||||||
body:
|
|
||||||
minimum-length:
|
|
||||||
enabled: true
|
|
||||||
length: 8
|
|
||||||
contains-url: false
|
|
||||||
contains-issue-number: false
|
|
||||||
template:
|
|
||||||
differs-from-body: true
|
|
||||||
159
CHANGELOG.md
159
CHANGELOG.md
@ -1,6 +1,163 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [2.3.0](https://github.com/wallabag/wallabag/tree/2.3.0) (2017-10-21)
|
## [2.3.8](https://github.com/wallabag/wallabag/tree/2.3.8)
|
||||||
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.7...2.3.8)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Jump to 2.3.8-dev [#3897](https://github.com/wallabag/wallabag/pull/3897)
|
||||||
|
- material: fix left padding on non-entry pages [#3901](https://github.com/wallabag/wallabag/pull/3901)
|
||||||
|
- Make dev/install/update script posix compatible [#3860](https://github.com/wallabag/wallabag/pull/3860)
|
||||||
|
- epub: fix exception when articles have the same title [#3908](https://github.com/wallabag/wallabag/pull/3908)
|
||||||
|
- Fix PHP warning [#3909](https://github.com/wallabag/wallabag/pull/3909)
|
||||||
|
- Add ability to match many domains for credentials [#3937](https://github.com/wallabag/wallabag/pull/3937)
|
||||||
|
- material: add metadata to list view [#3942](https://github.com/wallabag/wallabag/pull/3942)
|
||||||
|
- Enable no-referrer on img tags, enable strict-origin-when-cross-origin by default [#3943](https://github.com/wallabag/wallabag/pull/3943)
|
||||||
|
- Remove preview picture from share view page#3922
|
||||||
|
- Fix Intl Locale issue [#3964](https://github.com/wallabag/wallabag/pull/3964)
|
||||||
|
|
||||||
|
## [2.3.7](https://github.com/wallabag/wallabag/tree/2.3.7)
|
||||||
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.6...2.3.7)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Jump to 2.3.7-dev [#3837](https://github.com/wallabag/wallabag/pull/3837)
|
||||||
|
- Fix bad order parameter in the API [#3841](https://github.com/wallabag/wallabag/pull/3841)
|
||||||
|
- Update composer.json to add php-tidy (ext-tidy) [#3853](https://github.com/wallabag/wallabag/pull/3853)
|
||||||
|
- Add dedicated email for site config issue [#3861](https://github.com/wallabag/wallabag/pull/3861)
|
||||||
|
- Fix read & starred status in Pocket import [#3819](https://github.com/wallabag/wallabag/pull/3819)
|
||||||
|
- Fix broken 2 factor auth logo image [#3869](https://github.com/wallabag/wallabag/pull/3869)
|
||||||
|
- Fix CORS for API [#3882](https://github.com/wallabag/wallabag/pull/3882)
|
||||||
|
- Add support of expect parameter to change return object when deleting entry [#3887](https://github.com/wallabag/wallabag/pull/3887)
|
||||||
|
- epub export: fix missing cover image, only for exports of one article [#3886](https://github.com/wallabag/wallabag/pull/3886)
|
||||||
|
- Allow optional --ignore-root-warning [#3885](https://github.com/wallabag/wallabag/pull/3885)
|
||||||
|
- material: fix left padding of content on medium screens [#3893](https://github.com/wallabag/wallabag/pull/3893)
|
||||||
|
- material: hide creation date from card actions on specific sizes [#3894](https://github.com/wallabag/wallabag/pull/3894)
|
||||||
|
|
||||||
|
## [2.3.6](https://github.com/wallabag/wallabag/tree/2.3.6)
|
||||||
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.5...2.3.6)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Jump to 2.3.6-dev and update release process [#3814](https://github.com/wallabag/wallabag/pull/3814)
|
||||||
|
- Fix tag API leak [#3823](https://github.com/wallabag/wallabag/pull/3823)
|
||||||
|
- Validate imported entry to avoid error on import [#3816](https://github.com/wallabag/wallabag/pull/3816)
|
||||||
|
- Fix incorrect reading time calculation for entries with CJK characters [#3820](https://github.com/wallabag/wallabag/pull/3820)
|
||||||
|
- EntriesExport/epub: replace epub identifier with unique urn [#3827](https://github.com/wallabag/wallabag/pull/3827)
|
||||||
|
- Fix settings field inverted [#3833](https://github.com/wallabag/wallabag/pull/3833)
|
||||||
|
- Cast client id to avoid PG error [#3831](https://github.com/wallabag/wallabag/pull/3831)
|
||||||
|
- Rework of EPUB/PDF exports [#3826](https://github.com/wallabag/wallabag/pull/3826)
|
||||||
|
|
||||||
|
## [2.3.5](https://github.com/wallabag/wallabag/tree/2.3.5)
|
||||||
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.4...2.3.5)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Jump to 2.3.5-dev and update release process [#3778](https://github.com/wallabag/wallabag/pull/3778)
|
||||||
|
- Remove preview picture from single entry view page [#3765](https://github.com/wallabag/wallabag/pull/3765)
|
||||||
|
- Fix Android app login issue [#3784](https://github.com/wallabag/wallabag/pull/3784)
|
||||||
|
- material: fix missing thumbnail on list view [#3782](https://github.com/wallabag/wallabag/pull/3782)
|
||||||
|
- material: decrease size of tags on list view [#3783](https://github.com/wallabag/wallabag/pull/3783)
|
||||||
|
- build: upgrade yarn dependencies, update prod assets [#3781](https://github.com/wallabag/wallabag/pull/3781)
|
||||||
|
- No more dev for guzzle-site-authenticator [#3810](https://github.com/wallabag/wallabag/pull/3810)
|
||||||
|
|
||||||
|
## [2.3.4](https://github.com/wallabag/wallabag/tree/2.3.4)
|
||||||
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.3...2.3.4)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Fix image downloading on null image path [#3684](https://github.com/wallabag/wallabag/pull/3684)
|
||||||
|
- Remove remaining deprecation notices [#3686](https://github.com/wallabag/wallabag/pull/3686)
|
||||||
|
- Fix mobile viewport on big iframe and video elements [#3683](https://github.com/wallabag/wallabag/pull/3683)
|
||||||
|
- Autofocus the username field on the login page [#3691](https://github.com/wallabag/wallabag/pull/3691)
|
||||||
|
- Feature/svg logo [#3692](https://github.com/wallabag/wallabag/pull/3692)
|
||||||
|
- Fixes a typo [#3702](https://github.com/wallabag/wallabag/pull/3702)
|
||||||
|
- Update release script [#3705](https://github.com/wallabag/wallabag/pull/3705)
|
||||||
|
- Removing failing test from Travis [#3707](https://github.com/wallabag/wallabag/pull/3707)
|
||||||
|
- Replace SO url by lemonde.fr to avoid random failing test [#3685](https://github.com/wallabag/wallabag/pull/3685)
|
||||||
|
- php-cs-fixer: native_function_invocation [#3716](https://github.com/wallabag/wallabag/pull/3716)
|
||||||
|
- PHP 7.2 shouldn't fail [#3717](https://github.com/wallabag/wallabag/pull/3717)
|
||||||
|
- Liberation goes https [#3726](https://github.com/wallabag/wallabag/pull/3726)
|
||||||
|
- Bugfix: Sanitize the title of a saved webpage from invalid UTF-8 characters. [#3725](https://github.com/wallabag/wallabag/pull/3725)
|
||||||
|
- Fix dockerfile php72 [#3734](https://github.com/wallabag/wallabag/pull/3734)
|
||||||
|
- Fix sort parameters [#3719](https://github.com/wallabag/wallabag/pull/3719)
|
||||||
|
- Add note on GitHub PR template to auto-close issues [#3763](https://github.com/wallabag/wallabag/pull/3763)
|
||||||
|
- Fix link to wallabag requirements in documentation [#3766](https://github.com/wallabag/wallabag/pull/3766)
|
||||||
|
- Update translation when marking as read [#3772](https://github.com/wallabag/wallabag/pull/3772)
|
||||||
|
- Makefile fixes for non GNU systems [#3706](https://github.com/wallabag/wallabag/pull/3706)
|
||||||
|
- Card no preview replaced by wallabag logo [#3774](https://github.com/wallabag/wallabag/pull/3774)
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
- Propose YunoHost badge for installing [#3678](https://github.com/wallabag/wallabag/pull/3678)
|
||||||
|
- More robust srcset image attribute handling [#3690](https://github.com/wallabag/wallabag/pull/3690)
|
||||||
|
- Rename getBuilderByUser and refactor query for untagged entries [#3712](https://github.com/wallabag/wallabag/pull/3712)
|
||||||
|
- Show tags on non-image gallery preview card [#3743](https://github.com/wallabag/wallabag/pull/3743)
|
||||||
|
- add manifest.json for android pwa [#3606](https://github.com/wallabag/wallabag/pull/3606)
|
||||||
|
- Add placeholder image to card-based gallery entries page [#3745](https://github.com/wallabag/wallabag/pull/3745)
|
||||||
|
- Abort running install and update script if root [#3733](https://github.com/wallabag/wallabag/pull/3733)
|
||||||
|
- Swap entry url with origin url if graby provides an updated one [#3553](https://github.com/wallabag/wallabag/pull/3553)
|
||||||
|
|
||||||
|
## [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)
|
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.2.3...2.3.0)
|
||||||
|
|
||||||
### API
|
### API
|
||||||
|
|||||||
76
CODE_OF_CONDUCT.md
Normal file
76
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at hello@wallabag.org. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
||||||
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2013-2017 Nicolas Lœuillet
|
Copyright (c) 2013-current Nicolas Lœuillet
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
15
Capfile
15
Capfile
@ -1,15 +0,0 @@
|
|||||||
set :deploy_config_path, 'app/config/capistrano/deploy.rb'
|
|
||||||
set :stage_config_path, 'app/config/capistrano/deploy'
|
|
||||||
|
|
||||||
# Load DSL and set up stages
|
|
||||||
require 'capistrano/setup'
|
|
||||||
|
|
||||||
# Include default deployment tasks
|
|
||||||
require 'capistrano/deploy'
|
|
||||||
|
|
||||||
require 'capistrano/composer'
|
|
||||||
require 'capistrano/file-permissions'
|
|
||||||
require 'capistrano/symfony'
|
|
||||||
|
|
||||||
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
|
||||||
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
|
||||||
62
GNUmakefile
Executable file
62
GNUmakefile
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
SHELL=bash
|
||||||
|
TMP_FOLDER=/tmp
|
||||||
|
RELEASE_FOLDER=wllbg-release
|
||||||
|
|
||||||
|
# ensure the ENV variable is well defined
|
||||||
|
AVAILABLE_ENV := prod dev test
|
||||||
|
ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),)
|
||||||
|
# all good
|
||||||
|
else
|
||||||
|
# not good, force it to "prod"
|
||||||
|
override ENV = prod
|
||||||
|
endif
|
||||||
|
|
||||||
|
help: ## Display this help menu
|
||||||
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
|
clean: ## Clear the application cache
|
||||||
|
rm -rf var/cache/*
|
||||||
|
|
||||||
|
install: ## Install wallabag with the latest version
|
||||||
|
@./scripts/install.sh $(ENV)
|
||||||
|
|
||||||
|
update: ## Update the wallabag installation to the latest version
|
||||||
|
@./scripts/update.sh $(ENV)
|
||||||
|
|
||||||
|
dev: ENV=dev
|
||||||
|
dev: build ## Install the latest dev version
|
||||||
|
@./scripts/dev.sh
|
||||||
|
|
||||||
|
run: ## Run the wallabag built-in server
|
||||||
|
@php bin/console server:run --env=dev
|
||||||
|
|
||||||
|
build: ## Run webpack
|
||||||
|
@npm install
|
||||||
|
@npm run build:$(ENV)
|
||||||
|
|
||||||
|
prepare: clean ## Prepare database for testsuite
|
||||||
|
ifdef DB
|
||||||
|
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
||||||
|
endif
|
||||||
|
-php bin/console doctrine:database:drop --force --env=test
|
||||||
|
php bin/console doctrine:database:create --env=test
|
||||||
|
php bin/console doctrine:migrations:migrate --no-interaction --env=test
|
||||||
|
|
||||||
|
fixtures: ## Load fixtures into database
|
||||||
|
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
||||||
|
|
||||||
|
test: prepare fixtures ## Launch wallabag testsuite
|
||||||
|
bin/simple-phpunit -v
|
||||||
|
|
||||||
|
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
|
||||||
|
ifndef VERSION
|
||||||
|
$(error VERSION is not set)
|
||||||
|
endif
|
||||||
|
@./scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV)
|
||||||
|
|
||||||
|
deploy: ## Deploy wallabag
|
||||||
|
@bundle exec cap staging deploy
|
||||||
|
|
||||||
|
.PHONY: help clean prepare install fixtures update build test release deploy run dev
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := install
|
||||||
6
Gemfile
6
Gemfile
@ -1,6 +0,0 @@
|
|||||||
source "https://rubygems.org"
|
|
||||||
|
|
||||||
gem 'capistrano', '~> 3.4'
|
|
||||||
gem 'capistrano-composer'
|
|
||||||
gem 'capistrano-symfony', '~> 1.0.0.rc1'
|
|
||||||
gem 'capistrano-file-permissions'
|
|
||||||
37
Gemfile.lock
37
Gemfile.lock
@ -1,37 +0,0 @@
|
|||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
capistrano (3.4.0)
|
|
||||||
i18n
|
|
||||||
rake (>= 10.0.0)
|
|
||||||
sshkit (~> 1.3)
|
|
||||||
capistrano-composer (0.0.6)
|
|
||||||
capistrano (>= 3.0.0.pre)
|
|
||||||
capistrano-file-permissions (1.0.0)
|
|
||||||
capistrano (~> 3.0)
|
|
||||||
capistrano-symfony (1.0.0.rc1)
|
|
||||||
capistrano (~> 3.1)
|
|
||||||
capistrano-composer (~> 0.0.3)
|
|
||||||
capistrano-file-permissions (~> 1.0)
|
|
||||||
colorize (0.7.7)
|
|
||||||
i18n (0.7.0)
|
|
||||||
net-scp (1.2.1)
|
|
||||||
net-ssh (>= 2.6.5)
|
|
||||||
net-ssh (2.9.2)
|
|
||||||
rake (10.4.2)
|
|
||||||
sshkit (1.7.1)
|
|
||||||
colorize (>= 0.7.0)
|
|
||||||
net-scp (>= 1.1.2)
|
|
||||||
net-ssh (>= 2.8.0)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
capistrano (~> 3.4)
|
|
||||||
capistrano-composer
|
|
||||||
capistrano-file-permissions
|
|
||||||
capistrano-symfony (~> 1.0.0.rc1)
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.13.5
|
|
||||||
54
Makefile
Executable file → Normal file
54
Makefile
Executable file → Normal file
@ -1,52 +1,2 @@
|
|||||||
TMP_FOLDER=/tmp
|
.DEFAULT:
|
||||||
RELEASE_FOLDER=wllbg-release
|
gmake $@
|
||||||
|
|
||||||
ENV ?= prod
|
|
||||||
|
|
||||||
help: ## Display this help menu
|
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
||||||
|
|
||||||
clean: ## Clear the application cache
|
|
||||||
rm -rf var/cache/*
|
|
||||||
|
|
||||||
install: ## Install wallabag with the latest version
|
|
||||||
@sh scripts/install.sh $(ENV)
|
|
||||||
|
|
||||||
update: ## Update the wallabag installation to the latest version
|
|
||||||
@sh scripts/update.sh $(ENV)
|
|
||||||
|
|
||||||
dev: ## Install the latest dev version
|
|
||||||
@sh scripts/dev.sh
|
|
||||||
|
|
||||||
run: ## Run the wallabag built-in server
|
|
||||||
@php bin/console server:run --env=$(ENV)
|
|
||||||
|
|
||||||
build: ## Run webpack
|
|
||||||
@npm run build:$(ENV)
|
|
||||||
|
|
||||||
prepare: clean ## Prepare database for testsuite
|
|
||||||
ifdef DB
|
|
||||||
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
|
||||||
endif
|
|
||||||
-php bin/console doctrine:database:drop --force --env=test
|
|
||||||
php bin/console doctrine:database:create --env=test
|
|
||||||
php bin/console doctrine:migrations:migrate --no-interaction --env=test
|
|
||||||
|
|
||||||
fixtures: ## Load fixtures into database
|
|
||||||
php bin/console doctrine:fixtures:load --no-interaction --env=test
|
|
||||||
|
|
||||||
test: prepare fixtures ## Launch wallabag testsuite
|
|
||||||
bin/simple-phpunit -v
|
|
||||||
|
|
||||||
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
|
|
||||||
ifndef VERSION
|
|
||||||
$(error VERSION is not set)
|
|
||||||
endif
|
|
||||||
@sh scripts/release.sh $(VERSION) $(TMP_FOLDER) $(RELEASE_FOLDER) $(ENV)
|
|
||||||
|
|
||||||
deploy: ## Deploy wallabag
|
|
||||||
@bundle exec cap staging deploy
|
|
||||||
|
|
||||||
.PHONY: help clean prepare install fixtures update build test release deploy run dev
|
|
||||||
|
|
||||||
.DEFAULT_GOAL := install
|
|
||||||
|
|||||||
12
README.md
12
README.md
@ -13,17 +13,23 @@ If you do not have your own server, consider [the wallabag.it hosting solution](
|
|||||||

|

|
||||||
|
|
||||||
# Install wallabag
|
# Install wallabag
|
||||||
Please read [the documentation to see the wallabag requirements](http://doc.wallabag.org/en/master/user/installation.html#requirements).
|
Please read [the documentation to see the wallabag requirements](https://doc.wallabag.org/en/admin/installation/requirements.html).
|
||||||
|
|
||||||
Then you can install wallabag by executing the following commands:
|
Then you can install wallabag by executing the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/wallabag/wallabag.git
|
git clone https://github.com/wallabag/wallabag.git
|
||||||
cd wallabag && make install
|
cd wallabag && make install
|
||||||
make run
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag.
|
||||||
|
|
||||||
|
# Run on YunoHost
|
||||||
|
[](https://install-app.yunohost.org/?app=wallabag2)
|
||||||
|
|
||||||
|
Wallabag app for [YunoHost](https://yunohost.org). See [here](https://github.com/YunoHost-Apps/wallabag2_ynh)
|
||||||
|
|
||||||
# License
|
# License
|
||||||
Copyright © 2013-2017 Nicolas Lœuillet <nicolas@loeuillet.org>
|
Copyright © 2013-current Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||||
This work is free. You can redistribute it and/or modify it under the
|
This work is free. You can redistribute it and/or modify it under the
|
||||||
terms of the MIT License. See the COPYING file for more details.
|
terms of the MIT License. See the COPYING file for more details.
|
||||||
|
|||||||
@ -4,14 +4,17 @@ A release is mostly a git tag of http://github.com/wallabag/wallabag, following
|
|||||||
|
|
||||||
### Steps to release
|
### Steps to release
|
||||||
|
|
||||||
During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE`.
|
During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (like 2.3.4).
|
||||||
|
|
||||||
#### Files to edit
|
#### Prepare the release
|
||||||
|
|
||||||
- `app/config/wallabag.yml` (`wallabag_core.version`)
|
- Update these files with new information
|
||||||
- `CHANGELOG.md`
|
- `app/config/wallabag.yml` (`wallabag_core.version`)
|
||||||
|
- `CHANGELOG.md`
|
||||||
|
- Create a PR named "Prepare $LAST_WALLABAG_RELEASE release".
|
||||||
|
- Wait for test to be ok, merge it.
|
||||||
|
|
||||||
#### Create release on GitHub
|
#### Create a new release on GitHub
|
||||||
|
|
||||||
- Run these commands to create the tag:
|
- Run these commands to create the tag:
|
||||||
|
|
||||||
@ -19,59 +22,42 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE`.
|
|||||||
git checkout master
|
git checkout master
|
||||||
git pull origin master
|
git pull origin master
|
||||||
git checkout -b release-$LAST_WALLABAG_RELEASE
|
git checkout -b release-$LAST_WALLABAG_RELEASE
|
||||||
SYMFONY_ENV=prod composer up --no-dev
|
composer up
|
||||||
```
|
|
||||||
|
|
||||||
- Update `.travis.yml` file and replace the composer line with this one:
|
|
||||||
|
|
||||||
```diff
|
|
||||||
script:
|
|
||||||
- - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
|
||||||
+ - travis_wait composer update --no-interaction --no-progress
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- Then continue with these commands:
|
- Then continue with these commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
git add --force composer.lock .travis.yml
|
git add composer.lock
|
||||||
git commit -m "Release wallabag $LAST_WALLABAG_RELEASE"
|
git commit -m "Release wallabag $LAST_WALLABAG_RELEASE"
|
||||||
git push origin release-$LAST_WALLABAG_RELEASE
|
git push origin release-$LAST_WALLABAG_RELEASE
|
||||||
```
|
```
|
||||||
|
|
||||||
- Create a new pull request with this title `DON'T MERGE Release wallabag $LAST_WALLABAG_RELEASE`. This pull request is used to launch builds on Travis-CI.
|
- Create a new pull request with this title `Release wallabag $LAST_WALLABAG_RELEASE`. This pull request is used to launch builds on Travis-CI.
|
||||||
- Run these command to create the package:
|
- Once PR is green, merge it and delete the branch.
|
||||||
|
- Run this command to create the package:
|
||||||
|
|
||||||
```
|
```
|
||||||
make release master /tmp wllbg-release prod
|
make release VERSION=$LAST_WALLABAG_RELEASE
|
||||||
```
|
```
|
||||||
|
|
||||||
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new). You have to upload on this page the package.
|
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `master` branch or any appropriate branch (for instance backports). You have to upload the package (generated previously).
|
||||||
- Delete the `release-$LAST_WALLABAG_RELEASE` branch and close the pull request (**DO NOT MERGE IT**).
|
- Update the URL shortener (used on `wllbg.org` to update links like `https://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
|
||||||
- Update the URL shortener (used on `wllbg.org` to generate links like `https://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
|
|
||||||
- Update [the downloads page](https://github.com/wallabag/wallabag.org/blob/master/content/pages/download.md) on the website (MD5 sum, release date)
|
|
||||||
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
|
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
|
||||||
- Update wallabag.org website (downloads, releases and new blog post)
|
- Update wallabag.org website (downloads, MD5 sum, releases and new blog post)
|
||||||
- Put the next patch version suffixed with `-dev` in `app/config/config.yml` (`wallabag_core.version`)
|
- Put the next patch version suffixed with `-dev` in `app/config/wallabag.yml` (`wallabag_core.version`)
|
||||||
- Drink a :beer:!
|
- Drink a :beer:!
|
||||||
|
|
||||||
### `composer.lock`
|
|
||||||
A release tag must contain a `composer.lock` file. It sets which dependencies were available at the time a release was done,
|
|
||||||
making it easier to fix issues after the release. It also speeds up `composer install` on stable versions a LOT, by skipping the
|
|
||||||
dependencies resolution part.
|
|
||||||
|
|
||||||
Since `composer.lock` is ignored by default, either it must be removed from `.gitignore` _in the release branch_,
|
|
||||||
or it must be added using `git add --force composer.lock`.
|
|
||||||
|
|
||||||
### Target PHP version
|
### Target PHP version
|
||||||
`composer.lock` is _always_ built for a particular version, by default the one it is generated (with `composer update`).
|
`composer.lock` is _always_ built for a particular version, by default the one it is generated (with `composer update`).
|
||||||
|
|
||||||
If the PHP version used to generate the .lock isn't a widely available one (like PHP 7), a more common one should
|
If the PHP version used to generate the .lock isn't a widely available one (like PHP 8), a more common one should
|
||||||
be locally specified in `composer.lock`:
|
be locally specified in `composer.lock`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "5.5.9",
|
"php": "7.1.3",
|
||||||
"ext-something": "4.0"
|
"ext-something": "4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\HttpKernel\Kernel;
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
|
|
||||||
class AppKernel extends Kernel
|
class AppKernel extends Kernel
|
||||||
@ -32,6 +33,9 @@ class AppKernel extends Kernel
|
|||||||
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
||||||
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
|
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
|
||||||
new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
|
new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
|
||||||
|
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
|
||||||
|
new Http\HttplugBundle\HttplugBundle(),
|
||||||
|
new Sentry\SentryBundle\SentryBundle(),
|
||||||
|
|
||||||
// wallabag bundles
|
// wallabag bundles
|
||||||
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
||||||
@ -39,25 +43,32 @@ class AppKernel extends Kernel
|
|||||||
new Wallabag\UserBundle\WallabagUserBundle(),
|
new Wallabag\UserBundle\WallabagUserBundle(),
|
||||||
new Wallabag\ImportBundle\WallabagImportBundle(),
|
new Wallabag\ImportBundle\WallabagImportBundle(),
|
||||||
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
|
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
|
||||||
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
||||||
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||||
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||||
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
||||||
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
|
||||||
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
||||||
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
|
||||||
|
|
||||||
if ('test' === $this->getEnvironment()) {
|
if ('test' === $this->getEnvironment()) {
|
||||||
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ('dev' === $this->getEnvironment()) {
|
||||||
|
$bundles[] = new Symfony\Bundle\MakerBundle\MakerBundle();
|
||||||
|
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $bundles;
|
return $bundles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRootDir()
|
||||||
|
{
|
||||||
|
return __DIR__;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCacheDir()
|
public function getCacheDir()
|
||||||
{
|
{
|
||||||
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
||||||
@ -70,7 +81,8 @@ class AppKernel extends Kernel
|
|||||||
|
|
||||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||||
{
|
{
|
||||||
$loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
|
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
||||||
|
|
||||||
$loader->load(function ($container) {
|
$loader->load(function ($container) {
|
||||||
if ($container->getParameter('use_webpack_dev_server')) {
|
if ($container->getParameter('use_webpack_dev_server')) {
|
||||||
$container->loadFromExtension('framework', [
|
$container->loadFromExtension('framework', [
|
||||||
@ -78,7 +90,19 @@ class AppKernel extends Kernel
|
|||||||
'base_url' => 'http://localhost:8080/',
|
'base_url' => 'http://localhost:8080/',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
} else {
|
||||||
|
$container->loadFromExtension('framework', [
|
||||||
|
'assets' => [
|
||||||
|
'base_url' => $container->getParameter('domain_name'),
|
||||||
|
],
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$loader->load(function (ContainerBuilder $container) {
|
||||||
|
// $container->setParameter('container.autowiring.strict_mode', true);
|
||||||
|
// $container->setParameter('container.dumper.inline_class_loader', true);
|
||||||
|
$container->addObjectResource($this);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,60 +2,54 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initial database structure.
|
* Initial database structure.
|
||||||
*/
|
*/
|
||||||
class Version20160401000000 extends AbstractMigration
|
class Version20160401000000 extends WallabagMigration
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
if ($this->version->getConfiguration()->getNumberOfExecutedMigrations() > 0) {
|
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
|
||||||
$this->version->markMigrated();
|
|
||||||
$this->skipIf(true, 'Database already initialized');
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
$sql = <<<'SQL'
|
$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 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 wallabag_craue_config_setting (name);
|
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('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 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 "wallabag_tagging_rule" (config_id);
|
CREATE INDEX IDX_2D9B3C5424DB0683 ON {$this->getTable('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 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 "wallabag_tag" (slug);
|
CREATE UNIQUE INDEX UNIQ_4CA58A8C989D9B62 ON {$this->getTable('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 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 "wallabag_entry" (user_id);
|
CREATE INDEX IDX_F4D18282A76ED395 ON {$this->getTable('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 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 wallabag_entry_tag (entry_id);
|
CREATE INDEX IDX_C9F0DD7CBA364942 ON {$this->getTable('entry_tag')} (entry_id);
|
||||||
CREATE INDEX IDX_C9F0DD7CBAD26311 ON wallabag_entry_tag (tag_id);
|
CREATE INDEX IDX_C9F0DD7CBAD26311 ON {$this->getTable('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 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 "wallabag_config" (user_id);
|
CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON {$this->getTable('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 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 wallabag_oauth2_refresh_tokens (token);
|
CREATE UNIQUE INDEX UNIQ_20C9FB245F37A13B ON {$this->getTable('oauth2_refresh_tokens')} (token);
|
||||||
CREATE INDEX IDX_20C9FB2419EB6921 ON wallabag_oauth2_refresh_tokens (client_id);
|
CREATE INDEX IDX_20C9FB2419EB6921 ON {$this->getTable('oauth2_refresh_tokens')} (client_id);
|
||||||
CREATE INDEX IDX_20C9FB24A76ED395 ON wallabag_oauth2_refresh_tokens (user_id);
|
CREATE INDEX IDX_20C9FB24A76ED395 ON {$this->getTable('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 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 wallabag_oauth2_access_tokens (token);
|
CREATE UNIQUE INDEX UNIQ_368A42095F37A13B ON {$this->getTable('oauth2_access_tokens')} (token);
|
||||||
CREATE INDEX IDX_368A420919EB6921 ON wallabag_oauth2_access_tokens (client_id);
|
CREATE INDEX IDX_368A420919EB6921 ON {$this->getTable('oauth2_access_tokens')} (client_id);
|
||||||
CREATE INDEX IDX_368A4209A76ED395 ON wallabag_oauth2_access_tokens (user_id);
|
CREATE INDEX IDX_368A4209A76ED395 ON {$this->getTable('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 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 wallabag_oauth2_auth_codes (token);
|
CREATE UNIQUE INDEX UNIQ_EE52E3FA5F37A13B ON {$this->getTable('oauth2_auth_codes')} (token);
|
||||||
CREATE INDEX IDX_EE52E3FA19EB6921 ON wallabag_oauth2_auth_codes (client_id);
|
CREATE INDEX IDX_EE52E3FA19EB6921 ON {$this->getTable('oauth2_auth_codes')} (client_id);
|
||||||
CREATE INDEX IDX_EE52E3FAA76ED395 ON wallabag_oauth2_auth_codes (user_id);
|
CREATE INDEX IDX_EE52E3FAA76ED395 ON {$this->getTable('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 {$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 "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 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 "wallabag_user" (username_canonical);
|
CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON {$this->getTable('user')} (username_canonical);
|
||||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "wallabag_user" (email_canonical);
|
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON {$this->getTable('user')} (email_canonical);
|
||||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "wallabag_user" (confirmation_token);
|
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON {$this->getTable('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 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 wallabag_annotation (user_id);
|
CREATE INDEX IDX_A7AED006A76ED395 ON {$this->getTable('annotation')} (user_id);
|
||||||
CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id);
|
CREATE INDEX IDX_A7AED006BA364942 ON {$this->getTable('annotation')} (entry_id);
|
||||||
SQL
|
SQL
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -65,32 +59,32 @@ SQL
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$sql = <<<'SQL'
|
$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 {$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 `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 {$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 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 {$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 `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 {$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 `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 {$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 `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 {$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 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 {$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 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 {$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 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 {$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 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 {$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 `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 {$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 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;
|
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 `wallabag_entry` ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
ALTER TABLE {$this->getTable('entry')} ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||||
ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES `wallabag_entry` (id);
|
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
|
||||||
ALTER TABLE wallabag_entry_tag ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES `wallabag_tag` (id);
|
ALTER TABLE {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES {$this->getTable('tag')} (id);
|
||||||
ALTER TABLE `wallabag_config` ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
ALTER TABLE {$this->getTable('config')} ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||||
ALTER TABLE `wallabag_tagging_rule` ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES `wallabag_config` (id);
|
ALTER TABLE {$this->getTable('tagging_rule')} ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES {$this->getTable('config')} (id);
|
||||||
ALTER TABLE wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id);
|
ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
|
||||||
ALTER TABLE wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
ALTER TABLE {$this->getTable('oauth2_access_tokens')} ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||||
ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id);
|
ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
|
||||||
ALTER TABLE wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
ALTER TABLE {$this->getTable('oauth2_refresh_tokens')} ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||||
ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (id);
|
ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES {$this->getTable('oauth2_clients')} (id);
|
||||||
ALTER TABLE wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
ALTER TABLE {$this->getTable('oauth2_auth_codes')} ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||||
ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id);
|
ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('user')} (id);
|
||||||
ALTER TABLE wallabag_annotation ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES `wallabag_entry` (id);
|
ALTER TABLE {$this->getTable('annotation')} ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('entry')} (id);
|
||||||
SQL
|
SQL
|
||||||
;
|
;
|
||||||
foreach (explode("\n", $sql) as $query) {
|
foreach (explode("\n", $sql) as $query) {
|
||||||
@ -98,46 +92,46 @@ SQL
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'postgresql':
|
case 'postgresql':
|
||||||
$sql = <<<'SQL'
|
$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 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 wallabag_craue_config_setting (name);
|
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('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 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 "wallabag_entry" (user_id);
|
CREATE INDEX IDX_F4D18282A76ED395 ON {$this->getTable('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 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 wallabag_entry_tag (entry_id);
|
CREATE INDEX IDX_C9F0DD7CBA364942 ON {$this->getTable('entry_tag')} (entry_id);
|
||||||
CREATE INDEX IDX_C9F0DD7CBAD26311 ON wallabag_entry_tag (tag_id);
|
CREATE INDEX IDX_C9F0DD7CBAD26311 ON {$this->getTable('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 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 "wallabag_config" (user_id);
|
CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON {$this->getTable('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 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 "wallabag_tagging_rule" (config_id);
|
CREATE INDEX IDX_2D9B3C5424DB0683 ON {$this->getTable('tagging_rule')} (config_id);
|
||||||
COMMENT ON COLUMN "wallabag_tagging_rule".tags IS '(DC2Type:simple_array)';
|
COMMENT ON COLUMN {$this->getTable('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 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 "wallabag_tag" (slug);
|
CREATE UNIQUE INDEX UNIQ_4CA58A8C989D9B62 ON {$this->getTable('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));
|
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 wallabag_oauth2_clients.redirect_uris IS '(DC2Type:array)';
|
COMMENT ON COLUMN {$this->getTable('oauth2_clients')}.redirect_uris IS '(DC2Type:array)';
|
||||||
COMMENT ON COLUMN wallabag_oauth2_clients.allowed_grant_types IS '(DC2Type:array)';
|
COMMENT ON COLUMN {$this->getTable('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 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 wallabag_oauth2_access_tokens (token);
|
CREATE UNIQUE INDEX UNIQ_368A42095F37A13B ON {$this->getTable('oauth2_access_tokens')} (token);
|
||||||
CREATE INDEX IDX_368A420919EB6921 ON wallabag_oauth2_access_tokens (client_id);
|
CREATE INDEX IDX_368A420919EB6921 ON {$this->getTable('oauth2_access_tokens')} (client_id);
|
||||||
CREATE INDEX IDX_368A4209A76ED395 ON wallabag_oauth2_access_tokens (user_id);
|
CREATE INDEX IDX_368A4209A76ED395 ON {$this->getTable('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 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 wallabag_oauth2_refresh_tokens (token);
|
CREATE UNIQUE INDEX UNIQ_20C9FB245F37A13B ON {$this->getTable('oauth2_refresh_tokens')} (token);
|
||||||
CREATE INDEX IDX_20C9FB2419EB6921 ON wallabag_oauth2_refresh_tokens (client_id);
|
CREATE INDEX IDX_20C9FB2419EB6921 ON {$this->getTable('oauth2_refresh_tokens')} (client_id);
|
||||||
CREATE INDEX IDX_20C9FB24A76ED395 ON wallabag_oauth2_refresh_tokens (user_id);
|
CREATE INDEX IDX_20C9FB24A76ED395 ON {$this->getTable('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 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 wallabag_oauth2_auth_codes (token);
|
CREATE UNIQUE INDEX UNIQ_EE52E3FA5F37A13B ON {$this->getTable('oauth2_auth_codes')} (token);
|
||||||
CREATE INDEX IDX_EE52E3FA19EB6921 ON wallabag_oauth2_auth_codes (client_id);
|
CREATE INDEX IDX_EE52E3FA19EB6921 ON {$this->getTable('oauth2_auth_codes')} (client_id);
|
||||||
CREATE INDEX IDX_EE52E3FAA76ED395 ON wallabag_oauth2_auth_codes (user_id);
|
CREATE INDEX IDX_EE52E3FAA76ED395 ON {$this->getTable('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 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 "wallabag_user" (username_canonical);
|
CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON {$this->getTable('user')} (username_canonical);
|
||||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "wallabag_user" (email_canonical);
|
CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON {$this->getTable('user')} (email_canonical);
|
||||||
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "wallabag_user" (confirmation_token);
|
CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON {$this->getTable('user')} (confirmation_token);
|
||||||
COMMENT ON COLUMN "wallabag_user".roles IS '(DC2Type:array)';
|
COMMENT ON COLUMN {$this->getTable('user')}.roles IS '(DC2Type:array)';
|
||||||
COMMENT ON COLUMN "wallabag_user".trusted IS '(DC2Type:json_array)';
|
COMMENT ON COLUMN {$this->getTable('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 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 wallabag_annotation (user_id);
|
CREATE INDEX IDX_A7AED006A76ED395 ON {$this->getTable('annotation')} (user_id);
|
||||||
CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id);
|
CREATE INDEX IDX_A7AED006BA364942 ON {$this->getTable('annotation')} (entry_id);
|
||||||
COMMENT ON COLUMN wallabag_annotation.ranges IS '(DC2Type:array)';
|
COMMENT ON COLUMN {$this->getTable('annotation')}.ranges IS '(DC2Type:array)';
|
||||||
CREATE SEQUENCE "entry_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
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 "config_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||||
CREATE SEQUENCE "tagging_rule_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
CREATE SEQUENCE "tagging_rule_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||||
@ -148,19 +142,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 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 "user_id_seq" INCREMENT BY 1 MINVALUE 1 START 1;
|
||||||
CREATE SEQUENCE annotation_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 {$this->getTable('entry')} ADD CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('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 {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBA364942 FOREIGN KEY (entry_id) REFERENCES {$this->getTable('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 {$this->getTable('entry_tag')} ADD CONSTRAINT FK_C9F0DD7CBAD26311 FOREIGN KEY (tag_id) REFERENCES {$this->getTable('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 {$this->getTable('config')} ADD CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES {$this->getTable('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 {$this->getTable('tagging_rule')} ADD CONSTRAINT FK_2D9B3C5424DB0683 FOREIGN KEY (config_id) REFERENCES {$this->getTable('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 {$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 wallabag_oauth2_access_tokens ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (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 wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (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 wallabag_oauth2_refresh_tokens ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (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 wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES wallabag_oauth2_clients (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 wallabag_oauth2_auth_codes ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (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 wallabag_annotation ADD CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_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 wallabag_annotation ADD CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES "wallabag_entry" (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
|
SQL
|
||||||
;
|
;
|
||||||
foreach (explode("\n", $sql) as $query) {
|
foreach (explode("\n", $sql) as $query) {
|
||||||
@ -170,22 +164,19 @@ SQL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DROP TABLE wallabag_craue_config_setting');
|
$this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}");
|
||||||
$this->addSql('DROP TABLE "wallabag_tagging_rule"');
|
$this->addSql("DROP TABLE {$this->getTable('tagging_rule')}");
|
||||||
$this->addSql('DROP TABLE "wallabag_config"');
|
$this->addSql("DROP TABLE {$this->getTable('config')}");
|
||||||
$this->addSql('DROP TABLE "wallabag_entry"');
|
$this->addSql("DROP TABLE {$this->getTable('entry')}");
|
||||||
$this->addSql('DROP TABLE wallabag_entry_tag');
|
$this->addSql("DROP TABLE {$this->getTable('entry_tag')}");
|
||||||
$this->addSql('DROP TABLE "wallabag_tag"');
|
$this->addSql("DROP TABLE {$this->getTable('tag')}");
|
||||||
$this->addSql('DROP TABLE wallabag_oauth2_refresh_tokens');
|
$this->addSql("DROP TABLE {$this->getTable('oauth2_refresh_tokens')}");
|
||||||
$this->addSql('DROP TABLE wallabag_oauth2_access_tokens');
|
$this->addSql("DROP TABLE {$this->getTable('oauth2_access_tokens')}");
|
||||||
$this->addSql('DROP TABLE wallabag_oauth2_clients');
|
$this->addSql("DROP TABLE {$this->getTable('oauth2_clients')}");
|
||||||
$this->addSql('DROP TABLE wallabag_oauth2_auth_codes');
|
$this->addSql("DROP TABLE {$this->getTable('oauth2_auth_codes')}");
|
||||||
$this->addSql('DROP TABLE "wallabag_user"');
|
$this->addSql("DROP TABLE {$this->getTable('user')}");
|
||||||
$this->addSql('DROP TABLE wallabag_annotation');
|
$this->addSql("DROP TABLE {$this->getTable('annotation')}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added foreign keys for account resetting.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -46,9 +31,6 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -56,9 +38,4 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'");
|
$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,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added name field on wallabag_oauth2_clients.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
@ -46,9 +31,6 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
@ -65,9 +47,4 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI
|
|||||||
$clientsTable->dropColumn('name');
|
$clientsTable->dropColumn('name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added settings for RabbitMQ and Redis imports.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$redis = $this->container
|
$redis = $this->container
|
||||||
@ -48,17 +33,9 @@ class Version20160911214952 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';");
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added pocket_consumer_key field on wallabag_config.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -35,18 +20,10 @@ class Version20160916201049 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
$configTable->dropColumn('pocket_consumer_key');
|
$configTable->dropColumn('pocket_consumer_key');
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
|
$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,30 +2,15 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added pocket_consumer_key field on wallabag_config.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -36,7 +21,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
|||||||
$query = $this->connection->query("
|
$query = $this->connection->query("
|
||||||
SELECT CONSTRAINT_NAME
|
SELECT CONSTRAINT_NAME
|
||||||
FROM information_schema.key_column_usage
|
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() . "'"
|
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||||
);
|
);
|
||||||
$query->execute();
|
$query->execute();
|
||||||
@ -54,7 +39,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
|||||||
FROM pg_constraint c
|
FROM pg_constraint c
|
||||||
JOIN pg_namespace n ON n.oid = c.connamespace
|
JOIN pg_namespace n ON n.oid = c.connamespace
|
||||||
WHERE contype = 'f'
|
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';"
|
AND n.nspname = 'public';"
|
||||||
);
|
);
|
||||||
$query->execute();
|
$query->execute();
|
||||||
@ -75,7 +60,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
|||||||
$query = $this->connection->query("
|
$query = $this->connection->query("
|
||||||
SELECT CONSTRAINT_NAME
|
SELECT CONSTRAINT_NAME
|
||||||
FROM information_schema.key_column_usage
|
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 CONSTRAINT_NAME LIKE 'FK_%'
|
||||||
AND COLUMN_NAME = 'entry_id'
|
AND COLUMN_NAME = 'entry_id'
|
||||||
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'"
|
||||||
@ -95,7 +80,7 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
|||||||
FROM pg_constraint c
|
FROM pg_constraint c
|
||||||
JOIN pg_namespace n ON n.oid = c.connamespace
|
JOIN pg_namespace n ON n.oid = c.connamespace
|
||||||
WHERE contype = 'f'
|
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 n.nspname = 'public'
|
||||||
AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
|
AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';"
|
||||||
);
|
);
|
||||||
@ -110,16 +95,8 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
throw new SkipMigrationException('Too complex ...');
|
throw new SkipMigrationException('Too complex ...');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,34 +2,19 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converted database to utf8mb4 encoding (for MySQL only).
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
$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
|
// convert field length for utf8mb4
|
||||||
// http://stackoverflow.com/a/31474509/569101
|
// http://stackoverflow.com/a/31474509/569101
|
||||||
@ -53,14 +38,11 @@ class Version20161022134138 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
$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('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;');
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
|
||||||
@ -77,9 +59,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;');
|
$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,31 +2,16 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
|
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
|
||||||
*/
|
*/
|
||||||
class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface
|
class Version20161024212538 extends WallabagMigration
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var ContainerInterface
|
|
||||||
*/
|
|
||||||
private $container;
|
|
||||||
|
|
||||||
private $constraintName = 'IDX_user_oauth_client';
|
private $constraintName = 'IDX_user_oauth_client';
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
@ -44,9 +29,6 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
$clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
|
||||||
@ -59,9 +41,4 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
|
|||||||
$clientsTable->removeForeignKey($this->constraintName);
|
$clientsTable->removeForeignKey($this->constraintName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added the internal setting to enable/disable downloading pictures.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$images = $this->container
|
$images = $this->container
|
||||||
@ -37,16 +22,8 @@ class Version20161031132655 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,31 +2,16 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added created_at index on entry table.
|
* 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';
|
private $indexName = 'IDX_entry_created_at';
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -35,9 +20,6 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI
|
|||||||
$entryTable->addIndex(['created_at'], $this->indexName);
|
$entryTable->addIndex(['created_at'], $this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -45,9 +27,4 @@ class Version20161104073720 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropIndex($this->indexName);
|
$entryTable->dropIndex($this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added action_mark_as_read field on config table.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -37,9 +22,6 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -48,9 +30,4 @@ class Version20161106113822 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$configTable->dropColumn('action_mark_as_read');
|
$configTable->dropColumn('action_mark_as_read');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added the internal setting to share articles to unmark.it.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$share = $this->container
|
$share = $this->container
|
||||||
@ -48,17 +33,9 @@ class Version20161117071626 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
$this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';");
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add http_status in `entry_table`.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -37,9 +22,6 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -48,9 +30,4 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropColumn('http_status');
|
$entryTable->dropColumn('http_status');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the restricted_access internal setting for articles with paywall.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$access = $this->container
|
$access = $this->container
|
||||||
@ -37,16 +22,8 @@ class Version20161122144743 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods and properties removed from `FOS\UserBundle\Model\User`.
|
* Methods and properties removed from `FOS\UserBundle\Model\User`.
|
||||||
@ -18,21 +16,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||||||
* You need to drop the fields `expired` and `credentials_expired` from your database
|
* You need to drop the fields `expired` and `credentials_expired` from your database
|
||||||
* schema, because they aren't mapped anymore.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
@ -43,9 +28,6 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
|
|||||||
$userTable->dropColumn('credentials_expired');
|
$userTable->dropColumn('credentials_expired');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
@ -55,9 +37,4 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
|
|||||||
$userTable->addColumn('expired', 'smallint', ['notnull' => false]);
|
$userTable->addColumn('expired', 'smallint', ['notnull' => false]);
|
||||||
$userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]);
|
$userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added list_mode in user config.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
@ -33,17 +18,9 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI
|
|||||||
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
$configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$configTable = $schema->getTable($this->getTable('config'));
|
$configTable = $schema->getTable($this->getTable('config'));
|
||||||
$configTable->dropColumn('list_mode');
|
$configTable->dropColumn('list_mode');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,15 +2,13 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removed locked, credentials_expire_at and expires_at.
|
* Removed locked, credentials_expire_at and expires_at.
|
||||||
*/
|
*/
|
||||||
class Version20161128131503 extends AbstractMigration implements ContainerAwareInterface
|
class Version20161128131503 extends WallabagMigration
|
||||||
{
|
{
|
||||||
private $fields = [
|
private $fields = [
|
||||||
'locked' => 'smallint',
|
'locked' => 'smallint',
|
||||||
@ -18,19 +16,6 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
|
|||||||
'expires_at' => 'datetime',
|
'expires_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @var ContainerInterface
|
|
||||||
*/
|
|
||||||
private $container;
|
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
@ -41,9 +26,6 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$userTable = $schema->getTable($this->getTable('user'));
|
||||||
@ -53,9 +35,4 @@ class Version20161128131503 extends AbstractMigration implements ContainerAwareI
|
|||||||
$userTable->addColumn($field, $type, ['notnull' => false]);
|
$userTable->addColumn($field, $type, ['notnull' => false]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renamed uuid to uid in entry table.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -47,9 +32,6 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -67,9 +49,4 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid');
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,31 +2,16 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added index on wallabag_entry.uid.
|
* 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';
|
private $indexName = 'IDX_entry_uid';
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -35,9 +20,6 @@ class Version20161214094403 extends AbstractMigration implements ContainerAwareI
|
|||||||
$entryTable->addIndex(['uid'], $this->indexName);
|
$entryTable->addIndex(['uid'], $this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -45,9 +27,4 @@ class Version20161214094403 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropIndex($this->indexName);
|
$entryTable->dropIndex($this->indexName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,32 +2,17 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.
|
* 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 $indexStarredName = 'IDX_entry_starred';
|
||||||
private $indexArchivedName = 'IDX_entry_archived';
|
private $indexArchivedName = 'IDX_entry_archived';
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -37,9 +22,6 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI
|
|||||||
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
$entryTable->addIndex(['is_archived'], $this->indexArchivedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -48,9 +30,4 @@ class Version20170127093841 extends AbstractMigration implements ContainerAwareI
|
|||||||
$entryTable->dropIndex($this->indexStarredName);
|
$entryTable->dropIndex($this->indexStarredName);
|
||||||
$entryTable->dropIndex($this->indexArchivedName);
|
$entryTable->dropIndex($this->indexArchivedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the share_scuttle internal setting.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$scuttle = $this->container
|
$scuttle = $this->container
|
||||||
@ -38,17 +23,9 @@ class Version20170327194233 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';");
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add published_at and published_by in `entry` table.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -42,9 +27,6 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -57,9 +39,4 @@ class Version20170405182620 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropColumn('published_by');
|
$entryTable->dropColumn('published_by');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove isPublic in Entry Table.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -33,9 +18,6 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI
|
|||||||
$entryTable->dropColumn('is_public');
|
$entryTable->dropColumn('is_public');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -43,9 +25,4 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]);
|
$entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,37 +2,19 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove download_pictures in craue_config_setting.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$downloadPictures = $this->container
|
$downloadPictures = $this->container
|
||||||
@ -44,9 +26,4 @@ class Version20170420134133 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_pictures', '1', 'entry')");
|
$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,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add site credential table to store username & password for some website (behind authentication or paywall).
|
* Add site credential table to store username & password for some website (behind authentication or paywall).
|
||||||
*/
|
*/
|
||||||
class Version20170501115751 extends AbstractMigration implements ContainerAwareInterface
|
class Version20170501115751 extends WallabagMigration
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var ContainerInterface
|
|
||||||
*/
|
|
||||||
private $container;
|
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
$this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.');
|
||||||
@ -46,16 +31,8 @@ class Version20170501115751 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$schema->dropTable($this->getTable('site_credential'));
|
$schema->dropTable($this->getTable('site_credential'));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,15 +2,13 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
|
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
|
||||||
*/
|
*/
|
||||||
class Version20170510082609 extends AbstractMigration implements ContainerAwareInterface
|
class Version20170510082609 extends WallabagMigration
|
||||||
{
|
{
|
||||||
private $fields = [
|
private $fields = [
|
||||||
'username',
|
'username',
|
||||||
@ -19,19 +17,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
|||||||
'email_canonical',
|
'email_canonical',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @var ContainerInterface
|
|
||||||
*/
|
|
||||||
private $container;
|
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
@ -41,9 +26,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
@ -52,9 +34,4 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;');
|
$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,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Added `headers` field in entry table.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -36,9 +21,6 @@ class Version20170511115400 extends AbstractMigration implements ContainerAwareI
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -47,9 +29,4 @@ class Version20170511115400 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropColumn('headers');
|
$entryTable->dropColumn('headers');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,42 +2,32 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase the length of the "quote" column of "annotation" table.
|
* 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)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$tableName = $this->getTable('annotation');
|
|
||||||
|
|
||||||
switch ($this->connection->getDatabasePlatform()->getName()) {
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
|
$annotationTableName = $this->getTable('annotation', true);
|
||||||
|
$userTableName = $this->getTable('user', true);
|
||||||
|
$entryTableName = $this->getTable('entry', true);
|
||||||
|
|
||||||
$this->addSql(<<<EOD
|
$this->addSql(<<<EOD
|
||||||
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
CREATE TEMPORARY TABLE __temp__wallabag_annotation AS
|
||||||
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||||
FROM ${tableName}
|
FROM ${annotationTableName}
|
||||||
EOD
|
EOD
|
||||||
);
|
);
|
||||||
$this->addSql('DROP TABLE ' . $tableName);
|
$this->addSql('DROP TABLE ' . $annotationTableName);
|
||||||
$this->addSql(<<<EOD
|
$this->addSql(<<<EOD
|
||||||
CREATE TABLE ${tableName}
|
CREATE TABLE ${annotationTableName}
|
||||||
(
|
(
|
||||||
id INTEGER PRIMARY KEY NOT NULL,
|
id INTEGER PRIMARY KEY NOT NULL,
|
||||||
user_id INTEGER DEFAULT NULL,
|
user_id INTEGER DEFAULT NULL,
|
||||||
@ -47,16 +37,16 @@ CREATE TABLE ${tableName}
|
|||||||
updated_at DATETIME NOT NULL,
|
updated_at DATETIME NOT NULL,
|
||||||
quote CLOB NOT NULL,
|
quote CLOB NOT NULL,
|
||||||
ranges CLOB NOT NULL,
|
ranges CLOB NOT NULL,
|
||||||
CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES wallabag_user (id),
|
CONSTRAINT FK_A7AED006A76ED395 FOREIGN KEY (user_id) REFERENCES ${userTableName} (id),
|
||||||
CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES wallabag_entry (id) ON DELETE CASCADE
|
CONSTRAINT FK_A7AED006BA364942 FOREIGN KEY (entry_id) REFERENCES ${entryTableName} (id) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
CREATE INDEX IDX_A7AED006A76ED395 ON wallabag_annotation (user_id);
|
CREATE INDEX IDX_A7AED006A76ED395 ON ${annotationTableName} (user_id);
|
||||||
CREATE INDEX IDX_A7AED006BA364942 ON wallabag_annotation (entry_id);
|
CREATE INDEX IDX_A7AED006BA364942 ON ${annotationTableName} (entry_id);
|
||||||
EOD
|
EOD
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->addSql(<<<EOD
|
$this->addSql(<<<EOD
|
||||||
INSERT INTO ${tableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
|
INSERT INTO ${annotationTableName} (id, user_id, entry_id, text, created_at, updated_at, quote, ranges)
|
||||||
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
SELECT id, user_id, entry_id, text, created_at, updated_at, quote, ranges
|
||||||
FROM __temp__wallabag_annotation;
|
FROM __temp__wallabag_annotation;
|
||||||
EOD
|
EOD
|
||||||
@ -64,10 +54,10 @@ EOD
|
|||||||
$this->addSql('DROP TABLE __temp__wallabag_annotation');
|
$this->addSql('DROP TABLE __temp__wallabag_annotation');
|
||||||
break;
|
break;
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote TEXT NOT NULL');
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL');
|
||||||
break;
|
break;
|
||||||
case 'postgresql':
|
case 'postgresql':
|
||||||
$this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE TEXT');
|
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,9 +78,4 @@ EOD
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add api_user_registration in craue_config_setting.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$apiUserRegistration = $this->container
|
$apiUserRegistration = $this->container
|
||||||
@ -37,16 +22,8 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,30 +2,15 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove wallabag_url from craue_config_setting.
|
* Remove wallabag_url from craue_config_setting.
|
||||||
* It has been moved into the parameters.yml.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$apiUserRegistration = $this->container
|
$apiUserRegistration = $this->container
|
||||||
@ -38,16 +23,8 @@ class Version20170606155640 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changed tags to lowercase.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -67,7 +52,7 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Just in case...
|
// Just in case...
|
||||||
if (count($ids) > 0) {
|
if (\count($ids) > 0) {
|
||||||
// Merge tags
|
// Merge tags
|
||||||
$this->addSql('
|
$this->addSql('
|
||||||
UPDATE ' . $this->getTable('entry_tag') . '
|
UPDATE ' . $this->getTable('entry_tag') . '
|
||||||
@ -75,7 +60,7 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
|||||||
WHERE tag_id IN (' . implode(',', $ids) . ')
|
WHERE tag_id IN (' . implode(',', $ids) . ')
|
||||||
AND entry_id NOT IN (
|
AND entry_id NOT IN (
|
||||||
SELECT entry_id
|
SELECT entry_id
|
||||||
FROM ' . $this->getTable('entry_tag') . '
|
FROM (SELECT * FROM ' . $this->getTable('entry_tag') . ') AS _entry_tag
|
||||||
WHERE tag_id = ' . $newId . '
|
WHERE tag_id = ' . $newId . '
|
||||||
)'
|
)'
|
||||||
);
|
);
|
||||||
@ -101,16 +86,8 @@ class Version20170719231144 extends AbstractMigration implements ContainerAwareI
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
throw new SkipMigrationException('Too complex ...');
|
throw new SkipMigrationException('Too complex ...');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add starred_at column and set its value to updated_at for is_starred entries.
|
* Add starred_at column and set its value to updated_at for is_starred entries.
|
||||||
*/
|
*/
|
||||||
class Version20170824113337 extends AbstractMigration implements ContainerAwareInterface
|
class Version20170824113337 extends WallabagMigration
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var ContainerInterface
|
|
||||||
*/
|
|
||||||
private $container;
|
|
||||||
|
|
||||||
public function setContainer(ContainerInterface $container = null)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -49,9 +34,6 @@ class Version20170824113337 extends AbstractMigration implements ContainerAwareI
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -60,9 +42,4 @@ class Version20170824113337 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropColumn('starred_at');
|
$entryTable->dropColumn('starred_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changed reading_time field to prevent null value.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -41,9 +26,6 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||||||
@ -57,9 +39,4 @@ class Version20171008195606 extends AbstractMigration implements ContainerAwareI
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add origin_url column.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -36,9 +21,6 @@ class Version20171105202000 extends AbstractMigration implements ContainerAwareI
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$entryTable = $schema->getTable($this->getTable('entry'));
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
@ -47,9 +29,4 @@ class Version20171105202000 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$entryTable->dropColumn('origin_url');
|
$entryTable->dropColumn('origin_url');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add store_article_headers in craue_config_setting.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$storeArticleHeaders = $this->container
|
$storeArticleHeaders = $this->container
|
||||||
@ -37,16 +22,8 @@ class Version20171120163128 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,29 +2,14 @@
|
|||||||
|
|
||||||
namespace Application\Migrations;
|
namespace Application\Migrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add shaarli_share_origin_url in craue_config_setting.
|
* 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
|
|
||||||
*/
|
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$shaarliShareOriginUrl = $this->container
|
$shaarliShareOriginUrl = $this->container
|
||||||
@ -37,16 +22,8 @@ class Version20171125164500 extends AbstractMigration implements ContainerAwareI
|
|||||||
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Schema $schema
|
|
||||||
*/
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
{
|
{
|
||||||
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
$this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTable($tableName)
|
|
||||||
{
|
|
||||||
return $this->container->getParameter('database_table_prefix') . $tableName;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
45
app/DoctrineMigrations/Version20180405182455.php
Executable file
45
app/DoctrineMigrations/Version20180405182455.php
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add archived_at column and set its value to updated_at for is_archived entries.
|
||||||
|
*/
|
||||||
|
class Version20180405182455 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
|
$this->skipIf($entryTable->hasColumn('archived_at'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$entryTable->addColumn('archived_at', 'datetime', [
|
||||||
|
'notnull' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function postUp(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum');
|
||||||
|
|
||||||
|
$this->connection->executeQuery(
|
||||||
|
'UPDATE ' . $this->getTable('entry') . ' SET archived_at = updated_at WHERE is_archived = :is_archived',
|
||||||
|
[
|
||||||
|
'is_archived' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
|
$this->skipIf(!$entryTable->hasColumn('archived_at'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$entryTable->dropColumn('archived_at');
|
||||||
|
}
|
||||||
|
}
|
||||||
42
app/DoctrineMigrations/Version20181128203230.php
Normal file
42
app/DoctrineMigrations/Version20181128203230.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fix varchar field from vendor to work with utf8mb4.
|
||||||
|
*/
|
||||||
|
class Version20181128203230 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema)
|
||||||
|
{
|
||||||
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(191)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(191) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(191)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(191)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(191)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(191)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema)
|
||||||
|
{
|
||||||
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(255)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `token` `token` varchar(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' CHANGE `scope` `scope` varchar(255)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' CHANGE `scope` `scope` varchar(255)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `name` `name` varchar(255)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `section` `section` varchar(255)');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(255)');
|
||||||
|
}
|
||||||
|
}
|
||||||
76
app/DoctrineMigrations/Version20181202073750.php
Normal file
76
app/DoctrineMigrations/Version20181202073750.php
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add 2fa OTP stuff.
|
||||||
|
*/
|
||||||
|
final class Version20181202073750 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM ' . $this->getTable('user', true) . '');
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('user', true) . '');
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('user', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL COLLATE BINARY, username_canonical VARCHAR(180) NOT NULL COLLATE BINARY, email VARCHAR(180) NOT NULL COLLATE BINARY, email_canonical VARCHAR(180) NOT NULL COLLATE BINARY, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL COLLATE BINARY, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, emailTwoFactor BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array)
|
||||||
|
, googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json_array)
|
||||||
|
)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('user', true) . ' (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication FROM __temp__' . $this->getTable('user', true) . '');
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $this->getTable('user', true) . ' (confirmation_token)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $this->getTable('user', true) . ' (email_canonical)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $this->getTable('user', true) . ' (username_canonical)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE twoFactorAuthentication emailTwoFactor BOOLEAN NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\'');
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN twofactorauthentication TO emailTwoFactor');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes TEXT DEFAULT NULL');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('user', true) . ' AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor FROM "' . $this->getTable('user', true) . '"');
|
||||||
|
$this->addSql('DROP TABLE "' . $this->getTable('user', true) . '"');
|
||||||
|
$this->addSql('CREATE TABLE "' . $this->getTable('user', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, name CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, twoFactorAuthentication BOOLEAN NOT NULL, salt VARCHAR(255) NOT NULL COLLATE BINARY, confirmation_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, roles CLOB NOT NULL COLLATE BINARY, trusted CLOB DEFAULT NULL COLLATE BINARY)');
|
||||||
|
$this->addSql('INSERT INTO "' . $this->getTable('user', true) . '" (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, twoFactorAuthentication) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, emailTwoFactor FROM __temp__' . $this->getTable('user', true) . '');
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('user', true) . '');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON "' . $this->getTable('user', true) . '" (username_canonical)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "' . $this->getTable('user', true) . '" (email_canonical)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "' . $this->getTable('user', true) . '" (confirmation_token)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP googleAuthenticatorSecret');
|
||||||
|
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` CHANGE emailtwofactor twoFactorAuthentication BOOLEAN NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` ADD trusted TEXT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP backupCodes');
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP googleAuthenticatorSecret');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN emailTwoFactor TO twofactorauthentication');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD trusted TEXT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP backupCodes');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
app/DoctrineMigrations/Version20190117131816.php
Normal file
32
app/DoctrineMigrations/Version20190117131816.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add updated_at fields to site_credential table.
|
||||||
|
*/
|
||||||
|
final class Version20190117131816 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
|
||||||
|
|
||||||
|
$this->skipIf($siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$siteCredentialTable->addColumn('updated_at', 'datetime', [
|
||||||
|
'notnull' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
|
||||||
|
|
||||||
|
$this->skipIf(!$siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$siteCredentialTable->dropColumn('updated_at');
|
||||||
|
}
|
||||||
|
}
|
||||||
141
app/DoctrineMigrations/Version20190129120000.php
Normal file
141
app/DoctrineMigrations/Version20190129120000.php
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add missing entries in craue_config_setting.
|
||||||
|
*/
|
||||||
|
final class Version20190129120000 extends WallabagMigration
|
||||||
|
{
|
||||||
|
private $settings = [
|
||||||
|
[
|
||||||
|
'name' => 'carrot',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'share_diaspora',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'diaspora_url',
|
||||||
|
'value' => 'http://diasporapod.com',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'share_shaarli',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'shaarli_url',
|
||||||
|
'value' => 'http://myshaarli.com',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'share_mail',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'share_twitter',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'show_printlink',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'entry',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_epub',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_mobi',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_pdf',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_csv',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_json',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_txt',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'export_xml',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'export',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'piwik_enabled',
|
||||||
|
'value' => '0',
|
||||||
|
'section' => 'analytics',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'piwik_host',
|
||||||
|
'value' => 'v2.wallabag.org',
|
||||||
|
'section' => 'analytics',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'piwik_site_id',
|
||||||
|
'value' => '1',
|
||||||
|
'section' => 'analytics',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'demo_mode_enabled',
|
||||||
|
'value' => '0',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'demo_mode_username',
|
||||||
|
'value' => 'wallabag',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'wallabag_support_url',
|
||||||
|
'value' => 'https://www.wallabag.org/pages/support.html',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
public function up(Schema $schema)
|
||||||
|
{
|
||||||
|
foreach ($this->settings as $setting) {
|
||||||
|
$settingEnabled = $this->container
|
||||||
|
->get('doctrine.orm.default_entity_manager')
|
||||||
|
->getConnection()
|
||||||
|
->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'");
|
||||||
|
|
||||||
|
if (false !== $settingEnabled) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('" . $setting['name'] . "', '" . $setting['value'] . "', '" . $setting['section'] . "');");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema)
|
||||||
|
{
|
||||||
|
$this->skipIf(true, 'These settings are required and should not be removed.');
|
||||||
|
}
|
||||||
|
}
|
||||||
36
app/DoctrineMigrations/Version20190401105353.php
Normal file
36
app/DoctrineMigrations/Version20190401105353.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add hashed_url in entry.
|
||||||
|
*/
|
||||||
|
class Version20190401105353 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
|
$this->skipIf($entryTable->hasColumn('hashed_url'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$entryTable->addColumn('hashed_url', 'text', [
|
||||||
|
'length' => 40,
|
||||||
|
'notnull' => false,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
|
$this->skipIf(!$entryTable->hasColumn('hashed_url'), 'It seems that you already played this migration.');
|
||||||
|
|
||||||
|
$entryTable->dropIndex('hashed_url_user_id');
|
||||||
|
$entryTable->dropColumn('hashed_url');
|
||||||
|
}
|
||||||
|
}
|
||||||
58
app/DoctrineMigrations/Version20190425115043.php
Normal file
58
app/DoctrineMigrations/Version20190425115043.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename rss_token & rss_limit to feed_token & feed_limit.
|
||||||
|
*/
|
||||||
|
final class Version20190425115043 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM ' . $this->getTable('config', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('config', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('config', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL COLLATE BINARY, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL COLLATE BINARY, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, feed_token VARCHAR(255) DEFAULT NULL, feed_limit INTEGER DEFAULT NULL, CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('user', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('config', true) . ' (id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM __temp__' . $this->getTable('config', true));
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON ' . $this->getTable('config', true) . ' (user_id)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_token feed_token VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_limit feed_limit INT DEFAULT NULL');
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_token TO feed_token');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_limit TO feed_limit');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM "' . $this->getTable('config', true) . '"');
|
||||||
|
$this->addSql('DROP TABLE "' . $this->getTable('config', true) . '"');
|
||||||
|
$this->addSql('CREATE TABLE "' . $this->getTable('config', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL)');
|
||||||
|
$this->addSql('INSERT INTO "' . $this->getTable('config', true) . '" (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM __temp__' . $this->getTable('config', true));
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "' . $this->getTable('config', true) . '" (user_id)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_token rss_token');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_limit rss_limit');
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_token TO rss_token');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_limit TO rss_limit');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
96
app/DoctrineMigrations/Version20190510141130.php
Normal file
96
app/DoctrineMigrations/Version20190510141130.php
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Migrations\SkipMigrationException;
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable cascade delete when deleting a user on:
|
||||||
|
* - oauth2_access_tokens
|
||||||
|
* - oauth2_clients
|
||||||
|
* - oauth2_refresh_tokens
|
||||||
|
* - oauth2_auth_codes.
|
||||||
|
*/
|
||||||
|
final class Version20190510141130 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX IDX_368A4209A76ED395');
|
||||||
|
$this->addSql('DROP INDEX IDX_368A420919EB6921');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_368A42095F37A13B');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_access_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_access_tokens', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_access_tokens', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_access_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_access_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_access_tokens', true));
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_access_tokens', true));
|
||||||
|
$this->addSql('CREATE INDEX IDX_368A4209A76ED395 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_368A420919EB6921 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (client_id)');
|
||||||
|
|
||||||
|
$this->addSql('DROP INDEX IDX_635D765EA76ED395');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_clients', true) . ' AS SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM ' . $this->getTable('oauth2_clients', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_clients', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_clients', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, name CLOB NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_clients', true) . ' (id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name) SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM __temp__' . $this->getTable('oauth2_clients', true));
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_clients', true));
|
||||||
|
$this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $this->getTable('oauth2_clients', true) . ' (user_id)');
|
||||||
|
|
||||||
|
$this->addSql('DROP INDEX IDX_20C9FB24A76ED395');
|
||||||
|
$this->addSql('DROP INDEX IDX_20C9FB2419EB6921');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_20C9FB245F37A13B');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_refresh_tokens', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_refresh_tokens', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_refresh_tokens', true));
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true));
|
||||||
|
$this->addSql('CREATE INDEX IDX_20C9FB24A76ED395 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_20C9FB2419EB6921 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (client_id)');
|
||||||
|
|
||||||
|
$this->addSql('DROP INDEX IDX_EE52E3FAA76ED395');
|
||||||
|
$this->addSql('DROP INDEX IDX_EE52E3FA19EB6921');
|
||||||
|
$this->addSql('DROP INDEX UNIQ_EE52E3FA5F37A13B');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_auth_codes', true) . ' AS SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM ' . $this->getTable('oauth2_auth_codes', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('oauth2_auth_codes', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('oauth2_auth_codes', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, redirect_uri CLOB NOT NULL COLLATE BINARY, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('oauth2_auth_codes', true) . ' (id, client_id, user_id, token, redirect_uri, expires_at, scope) SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM __temp__' . $this->getTable('oauth2_auth_codes', true));
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_auth_codes', true));
|
||||||
|
$this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_EE52E3FA19EB6921 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (client_id)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP FOREIGN KEY IDX_user_oauth_client');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id)');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP FOREIGN KEY FK_20C9FB24A76ED395');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP CONSTRAINT idx_user_oauth_client');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP CONSTRAINT FK_20C9FB24A76ED395');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP CONSTRAINT FK_EE52E3FAA76ED395');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
throw new SkipMigrationException('Too complex ...');
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/DoctrineMigrations/Version20190511165128.php
Normal file
30
app/DoctrineMigrations/Version20190511165128.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert tab label to utf8mb4_bin (MySQL only).
|
||||||
|
*/
|
||||||
|
final class Version20190511165128 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL');
|
||||||
|
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
|
||||||
|
}
|
||||||
|
}
|
||||||
48
app/DoctrineMigrations/Version20190601125843.php
Normal file
48
app/DoctrineMigrations/Version20190601125843.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Added `given_url` & `hashed_given_url` field in entry table.
|
||||||
|
*/
|
||||||
|
class Version20190601125843 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
|
if (!$entryTable->hasColumn('given_url')) {
|
||||||
|
$entryTable->addColumn('given_url', 'text', [
|
||||||
|
'notnull' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$entryTable->hasColumn('hashed_given_url')) {
|
||||||
|
$entryTable->addColumn('hashed_given_url', 'text', [
|
||||||
|
'length' => 40,
|
||||||
|
'notnull' => false,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 40 = length of sha1 field hashed_given_url
|
||||||
|
$entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema)
|
||||||
|
{
|
||||||
|
$entryTable = $schema->getTable($this->getTable('entry'));
|
||||||
|
|
||||||
|
if ($entryTable->hasColumn('given_url')) {
|
||||||
|
$entryTable->dropColumn('given_url');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($entryTable->hasColumn('hashed_given_url')) {
|
||||||
|
$entryTable->dropColumn('hashed_given_url');
|
||||||
|
}
|
||||||
|
|
||||||
|
$entryTable->dropIndex('hashed_given_url_user_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
65
app/DoctrineMigrations/Version20190619093534.php
Normal file
65
app/DoctrineMigrations/Version20190619093534.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change reading_time field on SQLite to be integer NOT NULL
|
||||||
|
* It was forgotten in a previous migration (Version20171008195606.php).
|
||||||
|
*/
|
||||||
|
final class Version20190619093534 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.');
|
||||||
|
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('entry', true) . ' SET reading_time = 0 WHERE reading_time IS NULL;');
|
||||||
|
|
||||||
|
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
||||||
|
$this->addSql('DROP INDEX IDX_entry_uid');
|
||||||
|
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
||||||
|
$this->addSql('DROP INDEX IDX_entry_created_at');
|
||||||
|
$this->addSql('DROP INDEX IDX_entry_starred');
|
||||||
|
$this->addSql('DROP INDEX IDX_entry_archived');
|
||||||
|
$this->addSql('DROP INDEX hashed_url_user_id');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('entry', true) . ' AS SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url FROM ' . $this->getTable('entry', true) . '');
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('entry', true) . '');
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, uid VARCHAR(23) DEFAULT NULL COLLATE BINARY, http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, origin_url CLOB DEFAULT NULL COLLATE BINARY, archived_at DATETIME DEFAULT NULL, given_url CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER NOT NULL, published_by CLOB DEFAULT NULL --(DC2Type:array)
|
||||||
|
, headers CLOB DEFAULT NULL --(DC2Type:array)
|
||||||
|
, hashed_url VARCHAR(40) DEFAULT NULL, hashed_given_url VARCHAR(40) DEFAULT NULL, CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('user', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url) SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, uid, http_status, published_at, published_by, headers, starred_at, origin_url, archived_at, hashed_url, given_url, hashed_given_url FROM __temp__' . $this->getTable('entry', true) . '');
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('entry', true) . '');
|
||||||
|
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
|
||||||
|
$this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
|
||||||
|
$this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.');
|
||||||
|
|
||||||
|
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
||||||
|
$this->addSql('DROP INDEX created_at');
|
||||||
|
$this->addSql('DROP INDEX uid');
|
||||||
|
$this->addSql('DROP INDEX hashed_url_user_id');
|
||||||
|
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('entry', true) . ' AS SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM "' . $this->getTable('entry', true) . '"');
|
||||||
|
$this->addSql('DROP TABLE "' . $this->getTable('entry', true) . '"');
|
||||||
|
$this->addSql('CREATE TABLE "' . $this->getTable('entry', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, origin_url CLOB DEFAULT NULL, given_url CLOB DEFAULT NULL, is_archived BOOLEAN NOT NULL, archived_at DATETIME DEFAULT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, mimetype CLOB DEFAULT NULL, language CLOB DEFAULT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, http_status VARCHAR(3) DEFAULT NULL, hashed_url CLOB DEFAULT NULL COLLATE BINARY, hashed_given_url CLOB DEFAULT NULL COLLATE BINARY, published_by CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, headers CLOB DEFAULT NULL COLLATE BINARY)');
|
||||||
|
$this->addSql('INSERT INTO "' . $this->getTable('entry', true) . '" (id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers) SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM __temp__' . $this->getTable('entry', true) . '');
|
||||||
|
$this->addSql('DROP TABLE __temp__' . $this->getTable('entry', true) . '');
|
||||||
|
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON "' . $this->getTable('entry', true) . '" (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_url_user_id ON "' . $this->getTable('entry', true) . '" (user_id, hashed_url)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_given_url_user_id ON "' . $this->getTable('entry', true) . '" (user_id, hashed_given_url)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_entry_starred ON "' . $this->getTable('entry', true) . '" (is_starred)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_entry_archived ON "' . $this->getTable('entry', true) . '" (is_archived)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_entry_uid ON "' . $this->getTable('entry', true) . '" (uid)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_entry_created_at ON "' . $this->getTable('entry', true) . '" (created_at)');
|
||||||
|
}
|
||||||
|
}
|
||||||
22
app/DoctrineMigrations/Version20190708122957.php
Normal file
22
app/DoctrineMigrations/Version20190708122957.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change reading speed value.
|
||||||
|
*/
|
||||||
|
final class Version20190708122957 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('config', true) . ' SET reading_speed = reading_speed*200');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('config', true) . ' SET reading_speed = reading_speed/200');
|
||||||
|
}
|
||||||
|
}
|
||||||
116
app/DoctrineMigrations/Version20190806130304.php
Normal file
116
app/DoctrineMigrations/Version20190806130304.php
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adding more index to kill some slow queries:
|
||||||
|
* - user_language
|
||||||
|
* - user_archived
|
||||||
|
* - user_created
|
||||||
|
* - user_starred
|
||||||
|
* - tag_label
|
||||||
|
* - config_feed_token.
|
||||||
|
*/
|
||||||
|
final class Version20190806130304 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX uid');
|
||||||
|
$this->addSql('DROP INDEX created_at');
|
||||||
|
$this->addSql('DROP INDEX hashed_url_user_id');
|
||||||
|
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
||||||
|
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url FROM ' . $this->getTable('entry', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('entry', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, uid VARCHAR(23) DEFAULT NULL COLLATE BINARY, http_status VARCHAR(3) DEFAULT NULL COLLATE BINARY, published_at DATETIME DEFAULT NULL, starred_at DATETIME DEFAULT NULL, origin_url CLOB DEFAULT NULL COLLATE BINARY, archived_at DATETIME DEFAULT NULL, given_url CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER NOT NULL, published_by CLOB DEFAULT NULL COLLATE BINARY --(DC2Type:array)
|
||||||
|
, headers CLOB DEFAULT NULL COLLATE BINARY --(DC2Type:array)
|
||||||
|
, hashed_url VARCHAR(40) DEFAULT NULL COLLATE BINARY, hashed_given_url VARCHAR(40) DEFAULT NULL COLLATE BINARY, language VARCHAR(20) DEFAULT NULL, CONSTRAINT FK_F4D18282A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url) SELECT id, user_id, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, domain_name, preview_picture, uid, http_status, published_at, starred_at, origin_url, archived_at, given_url, reading_time, published_by, headers, hashed_url, hashed_given_url FROM __temp__wallabag_entry');
|
||||||
|
$this->addSql('DROP TABLE __temp__wallabag_entry');
|
||||||
|
$this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
|
||||||
|
$this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
|
||||||
|
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry', true) . ' (language, user_id)');
|
||||||
|
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry', true) . ' (user_id, is_archived, archived_at)');
|
||||||
|
$this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry', true) . ' (user_id, created_at)');
|
||||||
|
$this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry', true) . ' (user_id, is_starred, starred_at)');
|
||||||
|
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag', true) . ' (label)');
|
||||||
|
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config', true) . ' (feed_token)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language VARCHAR(20) DEFAULT NULL');
|
||||||
|
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
|
||||||
|
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
|
||||||
|
$this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry') . ' (user_id, created_at)');
|
||||||
|
$this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)');
|
||||||
|
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label (255))');
|
||||||
|
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token (255))');
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)');
|
||||||
|
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
|
||||||
|
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
|
||||||
|
$this->addSql('CREATE INDEX user_created ON ' . $this->getTable('entry') . ' (user_id, created_at)');
|
||||||
|
$this->addSql('CREATE INDEX user_starred ON ' . $this->getTable('entry') . ' (user_id, is_starred, starred_at)');
|
||||||
|
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label)');
|
||||||
|
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token)');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('DROP INDEX IDX_F4D18282A76ED395');
|
||||||
|
$this->addSql('DROP INDEX created_at');
|
||||||
|
$this->addSql('DROP INDEX uid');
|
||||||
|
$this->addSql('DROP INDEX hashed_url_user_id');
|
||||||
|
$this->addSql('DROP INDEX hashed_given_url_user_id');
|
||||||
|
$this->addSql('DROP INDEX user_language');
|
||||||
|
$this->addSql('DROP INDEX user_archived');
|
||||||
|
$this->addSql('DROP INDEX user_created');
|
||||||
|
$this->addSql('DROP INDEX user_starred');
|
||||||
|
$this->addSql('DROP INDEX tag_label');
|
||||||
|
$this->addSql('DROP INDEX config_feed_token');
|
||||||
|
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM ' . $this->getTable('entry', true));
|
||||||
|
$this->addSql('DROP TABLE ' . $this->getTable('entry', true));
|
||||||
|
$this->addSql('CREATE TABLE ' . $this->getTable('entry', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, uid VARCHAR(23) DEFAULT NULL, title CLOB DEFAULT NULL, url CLOB DEFAULT NULL, hashed_url VARCHAR(40) DEFAULT NULL, origin_url CLOB DEFAULT NULL, given_url CLOB DEFAULT NULL, hashed_given_url VARCHAR(40) DEFAULT NULL, is_archived BOOLEAN NOT NULL, archived_at DATETIME DEFAULT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, published_at DATETIME DEFAULT NULL, published_by CLOB DEFAULT NULL --(DC2Type:array)
|
||||||
|
, starred_at DATETIME DEFAULT NULL, mimetype CLOB DEFAULT NULL, reading_time INTEGER NOT NULL, domain_name CLOB DEFAULT NULL, preview_picture CLOB DEFAULT NULL, http_status VARCHAR(3) DEFAULT NULL, headers CLOB DEFAULT NULL --(DC2Type:array)
|
||||||
|
, language CLOB DEFAULT NULL COLLATE BINARY)');
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('entry', true) . ' (id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers) SELECT id, user_id, uid, title, url, hashed_url, origin_url, given_url, hashed_given_url, is_archived, archived_at, is_starred, content, created_at, updated_at, published_at, published_by, starred_at, mimetype, language, reading_time, domain_name, preview_picture, http_status, headers FROM __temp__wallabag_entry');
|
||||||
|
$this->addSql('DROP TABLE __temp__wallabag_entry');
|
||||||
|
$this->addSql('CREATE INDEX IDX_F4D18282A76ED395 ON ' . $this->getTable('entry', true) . ' (user_id)');
|
||||||
|
$this->addSql('CREATE INDEX created_at ON ' . $this->getTable('entry', true) . ' (created_at)');
|
||||||
|
$this->addSql('CREATE INDEX uid ON ' . $this->getTable('entry', true) . ' (uid)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
|
||||||
|
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language LONGTEXT DEFAULT NULL');
|
||||||
|
$this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX user_created ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
|
||||||
|
$this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT');
|
||||||
|
$this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX user_created ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX user_starred ON ' . $this->getTable('entry'));
|
||||||
|
$this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
|
||||||
|
$this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
42
app/DoctrineMigrations/Version20190808124957.php
Normal file
42
app/DoctrineMigrations/Version20190808124957.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the internal setting table name.
|
||||||
|
*/
|
||||||
|
final class Version20190808124957 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting', true) . ' RENAME TO ' . $this->getTable('internal_setting', true));
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting'));
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting'));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
switch ($this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
case 'sqlite':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting', true) . ' RENAME TO ' . $this->getTable('craue_config_setting', true));
|
||||||
|
break;
|
||||||
|
case 'mysql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting'));
|
||||||
|
break;
|
||||||
|
case 'postgresql':
|
||||||
|
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting'));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
64
app/DoctrineMigrations/Version20190826204730.php
Normal file
64
app/DoctrineMigrations/Version20190826204730.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tables for the ignore origin rules.
|
||||||
|
*/
|
||||||
|
final class Version20190826204730 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
if (false === $schema->hasTable($this->getTable('ignore_origin_user_rule'))) {
|
||||||
|
$userTable = $schema->createTable($this->getTable('ignore_origin_user_rule', true));
|
||||||
|
$userTable->addColumn('id', 'integer', ['autoincrement' => true]);
|
||||||
|
$userTable->addColumn('config_id', 'integer');
|
||||||
|
$userTable->addColumn('rule', 'string', ['length' => 255]);
|
||||||
|
$userTable->addIndex(['config_id'], 'idx_config');
|
||||||
|
$userTable->setPrimaryKey(['id']);
|
||||||
|
$userTable->addForeignKeyConstraint($this->getTable('config'), ['config_id'], ['id'], [], 'fk_config');
|
||||||
|
|
||||||
|
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
$schema->dropSequence('ignore_origin_user_rule_id_seq');
|
||||||
|
$schema->createSequence('ignore_origin_user_rule_id_seq');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false === $schema->hasTable($this->getTable('ignore_origin_instance_rule'))) {
|
||||||
|
$instanceTable = $schema->createTable($this->getTable('ignore_origin_instance_rule', true));
|
||||||
|
$instanceTable->addColumn('id', 'integer', ['autoincrement' => true]);
|
||||||
|
$instanceTable->addColumn('rule', 'string', ['length' => 255]);
|
||||||
|
$instanceTable->setPrimaryKey(['id']);
|
||||||
|
|
||||||
|
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) {
|
||||||
|
$schema->dropSequence('ignore_origin_instance_rule_id_seq');
|
||||||
|
$schema->createSequence('ignore_origin_instance_rule_id_seq');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function postUp(Schema $schema): void
|
||||||
|
{
|
||||||
|
foreach ($this->container->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $entity) {
|
||||||
|
$previous_rule = $this->container
|
||||||
|
->get('doctrine.orm.default_entity_manager')
|
||||||
|
->getConnection()
|
||||||
|
->fetchArray('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'");
|
||||||
|
|
||||||
|
if (false === $previous_rule) {
|
||||||
|
$this->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$schema->dropTable($this->getTable('ignore_origin_user_rule'));
|
||||||
|
$schema->dropTable($this->getTable('ignore_origin_instance_rule'));
|
||||||
|
}
|
||||||
|
}
|
||||||
28
app/DoctrineMigrations/Version20200428072628.php
Normal file
28
app/DoctrineMigrations/Version20200428072628.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Application\Migrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renamed Piwik to Matomo in configuration.
|
||||||
|
*/
|
||||||
|
final class Version20200428072628 extends WallabagMigration
|
||||||
|
{
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_enabled' where name = 'piwik_enabled';");
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_host' where name = 'piwik_host';");
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'matomo_site_id' where name = 'piwik_site_id';");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_enabled' where name = 'matomo_enabled';");
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_host' where name = 'matomo_host';");
|
||||||
|
$this->addSql('UPDATE ' . $this->getTable('internal_setting', true) . " SET name = 'piwik_site_id' where name = 'matomo_site_id';");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -27,9 +27,9 @@ export: "eksport"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "Gem ændring"
|
modify_settings: "Gem ændring"
|
||||||
piwik_host: Hosting af din side hos Piwik (uden http:// eller https://)
|
matomo_host: Hosting af din side hos Matomo (uden http:// eller https://)
|
||||||
piwik_site_id: ID for din side hos Piwik
|
matomo_site_id: ID for din side hos Matomo
|
||||||
piwik_enabled: Aktiver Piwik
|
matomo_enabled: Aktiver Matomo
|
||||||
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
|
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
|
||||||
demo_mode_username: "Demobruger"
|
demo_mode_username: "Demobruger"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: 'Export'
|
|||||||
import: 'Import'
|
import: 'Import'
|
||||||
misc: 'Verschiedenes'
|
misc: 'Verschiedenes'
|
||||||
modify_settings: 'Übernehmen'
|
modify_settings: 'Übernehmen'
|
||||||
piwik_host: 'Host deiner Webseite in Piwik (ohne http:// oder https://)'
|
matomo_host: 'Host deiner Webseite in Matomo (ohne http:// oder https://)'
|
||||||
piwik_site_id: 'ID deiner Webseite in Piwik'
|
matomo_site_id: 'ID deiner Webseite in Matomo'
|
||||||
piwik_enabled: 'Piwik aktivieren'
|
matomo_enabled: 'Matomo aktivieren'
|
||||||
demo_mode_enabled: 'Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)'
|
demo_mode_enabled: 'Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)'
|
||||||
demo_mode_username: 'Test-Benutzer'
|
demo_mode_username: 'Test-Benutzer'
|
||||||
share_public: 'Erlaube eine öffentliche URL für Einträge'
|
share_public: 'Erlaube eine öffentliche URL für Einträge'
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "export"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "apply"
|
modify_settings: "apply"
|
||||||
piwik_host: Host of your website in Piwik (without http:// ou https://)
|
matomo_host: Host of your website in Matomo (without http:// or https://)
|
||||||
piwik_site_id: ID of your website in Piwik
|
matomo_site_id: ID of your website in Matomo
|
||||||
piwik_enabled: Enable Piwik
|
matomo_enabled: Enable Matomo
|
||||||
demo_mode_enabled: "Enable demo mode? (Only used for the public wallabag demo)"
|
demo_mode_enabled: "Enable demo mode? (Only used for the public wallabag demo)"
|
||||||
demo_mode_username: "Demo user"
|
demo_mode_username: "Demo user"
|
||||||
share_public: Allow public URL for entries
|
share_public: Allow public URL for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "exportar"
|
|||||||
import: "importar"
|
import: "importar"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "guardar"
|
modify_settings: "guardar"
|
||||||
piwik_host: Host de tu website en Piwik (sin http:// o https://)
|
matomo_host: Host de tu website en Matomo (sin http:// o https://)
|
||||||
piwik_site_id: ID de tu website en Piwik
|
matomo_site_id: ID de tu website en Matomo
|
||||||
piwik_enabled: Activar Piwik
|
matomo_enabled: Activar Matomo
|
||||||
demo_mode_enabled: "Activar modo demo (sólo usado en la demo pública de wallabag)"
|
demo_mode_enabled: "Activar modo demo (sólo usado en la demo pública de wallabag)"
|
||||||
demo_mode_username: "Nombre de usuario demo"
|
demo_mode_username: "Nombre de usuario demo"
|
||||||
share_public: Permitir URL pública para los artículos
|
share_public: Permitir URL pública para los artículos
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "برونسپاری"
|
|||||||
import: "درونریزی"
|
import: "درونریزی"
|
||||||
misc: "غیره"
|
misc: "غیره"
|
||||||
modify_settings: "اعمال"
|
modify_settings: "اعمال"
|
||||||
# piwik_host: Host of your website in Piwik (without http:// or https://)
|
# matomo_host: Host of your website in Matomo (without http:// or https://)
|
||||||
# piwik_site_id: ID of your website in Piwik
|
# matomo_site_id: ID of your website in Matomo
|
||||||
# piwik_enabled: Enable Piwik
|
# matomo_enabled: Enable Matomo
|
||||||
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
# demo_mode_username: "Demo user"
|
# demo_mode_username: "Demo user"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "export"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "divers"
|
misc: "divers"
|
||||||
modify_settings: "appliquer"
|
modify_settings: "appliquer"
|
||||||
piwik_host: URL de votre site dans Piwik (sans http:// ou https://)
|
matomo_host: URL de votre site dans Matomo (sans http:// ou https://)
|
||||||
piwik_site_id: ID de votre site dans Piwik
|
matomo_site_id: ID de votre site dans Matomo
|
||||||
piwik_enabled: Activer Piwik
|
matomo_enabled: Activer Matomo
|
||||||
demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
|
demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
|
||||||
demo_mode_username: "Utilisateur de la démo"
|
demo_mode_username: "Utilisateur de la démo"
|
||||||
share_public: Autoriser une URL publique pour les articles
|
share_public: Autoriser une URL publique pour les articles
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "esporta"
|
|||||||
import: "importa"
|
import: "importa"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "applica"
|
modify_settings: "applica"
|
||||||
piwik_host: Host del tuo sito in Piwik (senza http:// o https://)
|
matomo_host: Host del tuo sito in Matomo (senza http:// o https://)
|
||||||
piwik_site_id: ID del tuo sito in Piwik
|
matomo_site_id: ID del tuo sito in Matomo
|
||||||
piwik_enabled: Abilita Piwik
|
matomo_enabled: Abilita Matomo
|
||||||
demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
|
demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
|
||||||
demo_mode_username: "Utente Demo"
|
demo_mode_username: "Utente Demo"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -0,0 +1,40 @@
|
|||||||
|
settings_changed: 構成が更新されました
|
||||||
|
download_pictures: 画像をあなたのサーバにダウンロード
|
||||||
|
carrot: Carrot への共有を有効にする
|
||||||
|
diaspora_url: diaspora* URL、サービスが有効な場合
|
||||||
|
export_epub: ePub 形式でのエクスポートを有効にする
|
||||||
|
export_mobi: .mobi 形式でのエクスポートを有効にする
|
||||||
|
export_pdf: PDF 形式でのエクスポートを有効にする
|
||||||
|
export_csv: CSV 形式でのエクスポートを有効にする
|
||||||
|
export_json: JSON 形式でのエクスポートを有効にする
|
||||||
|
export_txt: TXT 形式でのエクスポートを有効にする
|
||||||
|
export_xml: XML 形式でのエクスポートを有効にする
|
||||||
|
import_with_rabbitmq: データを非同期的にインポートする RabbitMQ を有効にする
|
||||||
|
import_with_redis: データを非同期的にインポートする Redis を有効にする
|
||||||
|
shaarli_url: Shaarli URL、サービスが有効な場合
|
||||||
|
scuttle_url: Scuttle URL、サービスが有効な場合
|
||||||
|
unmark_url: Unmark URL、サービスが有効な場合
|
||||||
|
share_diaspora: diaspora* への共有を有効にする
|
||||||
|
share_mail: 電子メールでの共有を有効にする
|
||||||
|
share_shaarli: Shaarli への共有を有効にする
|
||||||
|
share_scuttle: Scuttle への共有を有効にする
|
||||||
|
share_twitter: Twitter への共有を有効にする
|
||||||
|
share_unmark: Unmark.it への共有を有効にする
|
||||||
|
show_printlink: コンテンツを印刷するためのリンクを表示する
|
||||||
|
wallabag_support_url: Wallabag のサポート URL
|
||||||
|
entry: "記事"
|
||||||
|
export: "エクスポート"
|
||||||
|
import: "インポート"
|
||||||
|
misc: "misc"
|
||||||
|
modify_settings: "適用"
|
||||||
|
matomo_host: Matomo でのウェブサイトのホスト (http:// または https:// は不要)
|
||||||
|
matomo_site_id: Matomo でのあなたのウェブサイトの ID
|
||||||
|
matomo_enabled: Matomo を有効にする
|
||||||
|
demo_mode_enabled: "デモモードを有効にしますか? (パブリック Wallabag のデモにのみ使用)"
|
||||||
|
demo_mode_username: "デモユーザー"
|
||||||
|
share_public: 記事の公開 URL を許可する
|
||||||
|
download_images_enabled: 画像をローカルにダウンロードする
|
||||||
|
restricted_access: ペイウォールウェブサイトの認証を有効にする
|
||||||
|
api_user_registration: API を使用してユーザーを登録できるようにする
|
||||||
|
store_article_headers: 各記事の HTTP ヘッダーを Wallabag が格納する場合に有効にする
|
||||||
|
shaarli_share_origin_url: サービスが有効になっている場合、Shaarli へのオリジン URL の共有を有効にする
|
||||||
@ -27,14 +27,14 @@ export: "expòrt"
|
|||||||
import: "impòrt"
|
import: "impòrt"
|
||||||
misc: "divèrs"
|
misc: "divèrs"
|
||||||
modify_settings: "aplicar"
|
modify_settings: "aplicar"
|
||||||
piwik_host: URL de vòstre site dins Piwik (sense http:// o https://)
|
matomo_host: URL de vòstre site dins Matomo (sense http:// o https://)
|
||||||
piwik_site_id: ID de vòstre site dins Piwik
|
matomo_site_id: ID de vòstre site dins Matomo
|
||||||
piwik_enabled: Activar Piwik
|
matomo_enabled: Activar Matomo
|
||||||
demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
|
demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
|
||||||
demo_mode_username: "Utilizaire de la demostracion"
|
demo_mode_username: "Utilizaire de la demostracion"
|
||||||
share_public: Autorizar una URL publica pels articles
|
share_public: Autorizar una URL publica pels articles
|
||||||
download_images_enabled: Telecargar los imatges en local
|
download_images_enabled: Telecargar los imatges en local
|
||||||
restricted_access: Activar l'autenticacion pels sites amb peatge
|
restricted_access: Activar l'autenticacion pels sites amb peatge
|
||||||
api_user_registration: Autorizar los utilizaires a se marcar amb l'API
|
api_user_registration: Autorizar los utilizaires a se marcar amb l'API
|
||||||
# store_article_headers: Enable if wallabag stores HTTP headers for each article
|
store_article_headers: Activar se wallabag garda las entèstas HTTP per cada article
|
||||||
# shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled
|
shaarli_share_origin_url: Activar lo partatge de l’url amb Shaarli, se lo servici es activat
|
||||||
|
|||||||
@ -26,9 +26,9 @@ export: "eksport"
|
|||||||
import: "import"
|
import: "import"
|
||||||
misc: "różne"
|
misc: "różne"
|
||||||
modify_settings: "zatwierdź"
|
modify_settings: "zatwierdź"
|
||||||
piwik_host: Host twojej strony Piwik (bez http:// lub https://)
|
matomo_host: Host twojej strony Matomo (bez http:// lub https://)
|
||||||
piwik_site_id: ID twojej strony Piwik
|
matomo_site_id: ID twojej strony Matomo
|
||||||
piwik_enabled: Włacz Piwik
|
matomo_enabled: Włacz Matomo
|
||||||
demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
|
demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
|
||||||
demo_mode_username: "Użytkownik Demonstracyjny"
|
demo_mode_username: "Użytkownik Demonstracyjny"
|
||||||
share_public: Zezwalaj na publiczny adres url dla wpisow
|
share_public: Zezwalaj na publiczny adres url dla wpisow
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# settings_changed: Configuration updated
|
# settings_changed: Configuration updated
|
||||||
download_pictures: Download imagens no seu servidor
|
download_pictures: Download imagens no seu servidor
|
||||||
carrot: Habilitar compartilhamento para o Carrot
|
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_epub: Habilita exportação para ePub
|
||||||
export_mobi: Habilita exportação para .mobi
|
export_mobi: Habilita exportação para .mobi
|
||||||
export_pdf: Habilita exportação para PDF
|
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
|
export_xml: Habilita exportação para XML
|
||||||
# import_with_rabbitmq: Enable RabbitMQ to import data asynchronously
|
# import_with_rabbitmq: Enable RabbitMQ to import data asynchronously
|
||||||
# import_with_redis: Enable Redis to import data asynchronously
|
# import_with_redis: Enable Redis to import data asynchronously
|
||||||
shaarli_url: URL Shaarli, se o serviço está habilitado
|
shaarli_url: URL Shaarli caso o serviço esteja habilitado
|
||||||
scuttle_url: URL Scuttle, se o serviço está habilitado
|
scuttle_url: URL Scuttle caso o serviço esteja habilitado
|
||||||
unmark_url: URL Unmark, se o serviço está 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_diaspora: Habilitar compartilhamento para o Diaspora
|
||||||
share_mail: Habilitar compartilhamento por e-mail
|
share_mail: Habilitar compartilhamento por e-mail
|
||||||
share_shaarli: Habilitar compartilhamento para o Shaarli
|
share_shaarli: Habilitar compartilhamento para o Shaarli
|
||||||
@ -27,9 +28,9 @@ export: "exportar"
|
|||||||
import: "importar"
|
import: "importar"
|
||||||
misc: "misc"
|
misc: "misc"
|
||||||
modify_settings: "aplicar"
|
modify_settings: "aplicar"
|
||||||
piwik_host: Host de seu website Piwik
|
matomo_host: Host de seu website Matomo
|
||||||
piwik_site_id: ID de seu website Piwik
|
matomo_site_id: ID de seu website Matomo
|
||||||
piwik_enabled: Habilitar Piwik
|
matomo_enabled: Habilitar Matomo
|
||||||
demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)"
|
demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)"
|
||||||
demo_mode_username: "Usuário demo"
|
demo_mode_username: "Usuário demo"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "exportă"
|
|||||||
import: "importă"
|
import: "importă"
|
||||||
misc: "diverse"
|
misc: "diverse"
|
||||||
modify_settings: "aplică"
|
modify_settings: "aplică"
|
||||||
# piwik_host: Host of your website in Piwik (without http:// or https://)
|
# matomo_host: Host of your website in Matomo (without http:// or https://)
|
||||||
# piwik_site_id: ID of your website in Piwik
|
# matomo_site_id: ID of your website in Matomo
|
||||||
# piwik_enabled: Enable Piwik
|
# matomo_enabled: Enable Matomo
|
||||||
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
# demo_mode_username: "Demo user"
|
# demo_mode_username: "Demo user"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -27,9 +27,9 @@ export: "экспорт"
|
|||||||
import: "импорт"
|
import: "импорт"
|
||||||
misc: "разное"
|
misc: "разное"
|
||||||
modify_settings: "применить"
|
modify_settings: "применить"
|
||||||
piwik_host: "Ссылка на Ваш сайт на Piwik (с http:// или https://)"
|
matomo_host: "Ссылка на Ваш сайт на Matomo (с http:// или https://)"
|
||||||
piwik_site_id: "ID Вашего сайта на Piwik"
|
matomo_site_id: "ID Вашего сайта на Matomo"
|
||||||
piwik_enabled: "Включить Piwik"
|
matomo_enabled: "Включить Matomo"
|
||||||
demo_mode_enabled: "Включить демо режим ? (только для публичной демонстрации wallabag)"
|
demo_mode_enabled: "Включить демо режим ? (только для публичной демонстрации wallabag)"
|
||||||
demo_mode_username: "Демо пользователь"
|
demo_mode_username: "Демо пользователь"
|
||||||
share_public: "Разрешить публичные ссылки на записи"
|
share_public: "Разрешить публичные ссылки на записи"
|
||||||
|
|||||||
@ -25,9 +25,9 @@ export: "นำข้อมูลออก"
|
|||||||
import: "นำเข้าข้อมูล"
|
import: "นำเข้าข้อมูล"
|
||||||
misc: "เบ็ดเตล็ด"
|
misc: "เบ็ดเตล็ด"
|
||||||
modify_settings: "ปรับใช้"
|
modify_settings: "ปรับใช้"
|
||||||
piwik_host: โฮสบนเว็บไซต์ของคุณใน Piwik (ยกเว้น http:// หรือ https://)
|
matomo_host: โฮสบนเว็บไซต์ของคุณใน Matomo (ยกเว้น http:// หรือ https://)
|
||||||
piwik_site_id: ไอดีบนเว็บไซต์ของคุณใน Piwik
|
matomo_site_id: ไอดีบนเว็บไซต์ของคุณใน Matomo
|
||||||
piwik_enabled: เปิดการใช้ Piwik
|
matomo_enabled: เปิดการใช้ Matomo
|
||||||
demo_mode_enabled: "เปิดการใช้งานโหมดเดโม ? (เฉพาะการใช้สำหรับเดโมสาธารณะของ wallabag)"
|
demo_mode_enabled: "เปิดการใช้งานโหมดเดโม ? (เฉพาะการใช้สำหรับเดโมสาธารณะของ wallabag)"
|
||||||
demo_mode_username: "ผู้ใช้ส่วนเดโม"
|
demo_mode_username: "ผู้ใช้ส่วนเดโม"
|
||||||
share_public: ยอมรับ URL สาธารณะจากการเข้าถึงข้อมูล
|
share_public: ยอมรับ URL สาธารณะจากการเข้าถึงข้อมูล
|
||||||
|
|||||||
@ -28,9 +28,9 @@
|
|||||||
# import: "import"
|
# import: "import"
|
||||||
# misc: "misc"
|
# misc: "misc"
|
||||||
# modify_settings: "apply"
|
# modify_settings: "apply"
|
||||||
# piwik_host: Host of your website in Piwik (without http:// or https://)
|
# matomo_host: Host of your website in Matomo (without http:// or https://)
|
||||||
# piwik_site_id: ID of your website in Piwik
|
# matomo_site_id: ID of your website in Matomo
|
||||||
# piwik_enabled: Enable Piwik
|
# matomo_enabled: Enable Matomo
|
||||||
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
# demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
# demo_mode_username: "Demo user"
|
# demo_mode_username: "Demo user"
|
||||||
# share_public: Allow public url for entries
|
# share_public: Allow public url for entries
|
||||||
|
|||||||
@ -0,0 +1,40 @@
|
|||||||
|
settings_changed: 配置已更新
|
||||||
|
download_pictures: 在你的服务器上缓存图片
|
||||||
|
carrot: 启用分享到 Carrot
|
||||||
|
diaspora_url: diaspora* 链接,如果该服务已被启用
|
||||||
|
export_epub: 启用 ePub 导出
|
||||||
|
export_mobi: 启用 .mobi 导出
|
||||||
|
export_pdf: 启用 PDF 导出
|
||||||
|
export_csv: 启用 CSV 导出
|
||||||
|
export_json: 启用 JSON 导出
|
||||||
|
export_txt: 启用 TXT 导出
|
||||||
|
export_xml: 启用 XML 导出
|
||||||
|
import_with_rabbitmq: 启用 RabbitMQ 来异步导入数据
|
||||||
|
import_with_redis: 启用 Redis 来异步导入数据
|
||||||
|
shaarli_url: Shaarli 链接,如果该服务已被启用
|
||||||
|
scuttle_url: Scuttle 链接,如果该服务已被启用
|
||||||
|
unmark_url: Unmark 链接,如果该服务已被启用
|
||||||
|
share_diaspora: 启用分享到 diaspora*
|
||||||
|
share_mail: 启用邮件分享
|
||||||
|
share_shaarli: 启用分享到 Shaarli
|
||||||
|
share_scuttle: 启用分享到 Scuttle
|
||||||
|
share_twitter: 启用分享到 Twitter
|
||||||
|
share_unmark: 启用分享到 Unmark.it
|
||||||
|
show_printlink: 展示一个用于打印内容的链接
|
||||||
|
wallabag_support_url: wallabag 的支持链接
|
||||||
|
entry: "文章"
|
||||||
|
export: "导出"
|
||||||
|
import: "导入"
|
||||||
|
misc: "杂项"
|
||||||
|
modify_settings: "申请"
|
||||||
|
matomo_host: 你的网站在 Matomo 的主机名(不包括 http:// or https://)
|
||||||
|
matomo_site_id: 你的网站在 Matomo 的 ID
|
||||||
|
matomo_enabled: 启用 Matomo
|
||||||
|
demo_mode_enabled: "启用演示模式?(仅用于 wallabag 公开演示)"
|
||||||
|
demo_mode_username: "Demo user"
|
||||||
|
share_public: 允许为项目启用公开链接
|
||||||
|
download_images_enabled: 在本地缓存图片
|
||||||
|
restricted_access: 启用针对带有付费墙网站的认证
|
||||||
|
api_user_registration: 允许新用户通过 API 注册
|
||||||
|
store_article_headers: 让 wallabag 存储每篇文章的 HTTP header
|
||||||
|
shaarli_share_origin_url: 选择分享原始链接到 Shaarli,如果该服务已被启用
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
1
app/Resources/static/themes/_global/img/logo-square.svg
Normal file
1
app/Resources/static/themes/_global/img/logo-square.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path fill="none" d="M0 0h200v200H0z"/><path d="M75.899 72.438c1.597-.981 10.207-5.556 24.098.178 14.289 5.897 23.154.776 24.253.079-3.454-5.678-7.562-10.62-12.104-13.943.303-.083.612-.167.939-.263 6.023-1.742 7.553-6.842 7.875-11.21.364-4.954.616-5.03 1.692-9.487 1.032-4.281-.119-5.137-1.181-4.273-.572.465-5.552 1.616-8.505 3.919-4.768 3.72-7.707 10.794-9.039 14.706-.025.06-.205.604-.265.792-.621 1.498-1.857 1.494-1.857 1.494v.001c-.6-.065-1.202-.1-1.809-.1-.54 0-1.079.029-1.616.081-.012.002-.019 0-.031.001-1.581.233-2.45-1.697-2.632-2.157-1.847-5.304-6.816-15.763-17.984-18.577 0 0-2.028-1.554-1.41 1.074.588 2.511 1.804 5.049 1.534 8.741-.124 1.704-1.181 10.442 6.85 14.99.763.432 1.441.795 2.051 1.101-4.042 3.235-7.716 7.74-10.859 12.853zM128.626 152.353c-9.842-6.098-13.153-8.242-12.946-10.575 0 0 .002-.379.099-.957.239-1.236.995-3.348 3.407-4.552.079-.039.146-.084.208-.129 7.668-4.45 13.27-11.614 15.246-20.56-1.99 4.941-16.735 8.78-34.645 8.78-17.903 0-32.651-3.839-34.641-8.78.442 2.008 1.073 3.923 1.864 5.742.666 3.745 1.562 12.563-2.673 20.282-3.731 6.8-22.15 16.069-49.485 10.748 0 0-1.096-.766-1.428-.136-.491.932 1.517 1.685 3.583 2.229 19.031 5.04 47.756 2.989 56.777-4.443 4.116-3.388 5.704-7.953 6.107-12.865l.003.008s.11-1.287 1.719-.32c.461.277 2.125 1.36 2.39 2.585.232 1.743.248 3.883-.652 5.382-1.287 2.144-1.301 2.452.393 3.662 1.04.742 5.287 3.864 11.198 7.415.015.01.023.019.038.027 1.25.753 2.987 2.597 2.987 2.597 2.662 3.079 8.452 9.275 10.972 8.108 1.19-.551-.051-3.032-.051-3.032s1.98 2.571 3.043 1.694c.809-.668-.473-3.229-.473-3.229s1.729 1.499 2.757.944c1.258-.679-.187-4.614-10.079-10.627-9.896-6.018-12.578-6.94-12.814-9.626 0 0-.004-.135.004-.366.077-.593.414-1.847 1.852-1.712 2.141.346 4.348.531 6.608.531 2.587 0 5.107-.237 7.536-.69l.001.003s.127-.025.164-.031c.284-.036.838-.018.84.671-.09.873-.331 1.751-.845 2.519-1.447 2.168-.972 2.466.54 3.859.933.859 5.211 4.622 11.07 8.264.012.009.017.016.031.023 1.249.752 3.41 2.816 3.41 2.816v-.001c2.428 2.466 6.894 6.596 9.327 6.347 1.646-.168.306-3.002.306-3.002s2.078 2.006 3.099 1.416c1.142-.659-.474-2.755-.474-2.755s1.338.708 2.283.473c.948-.236 1.185-2.644-8.656-8.737z"/><path d="M117.631 83.452c-1.181 0-2.161.355-2.912 1.057-.76.71-1.144 1.531-1.144 2.438v16.056c0 2.154-.382 3.742-1.135 4.721-.728.946-1.892 1.406-3.556 1.406-1.703 0-2.863-.457-3.549-1.396-.716-.979-1.078-2.571-1.078-4.731V86.884c0-1.098-.5-1.996-1.448-2.596-1.289-.812-2.57-1.105-4.129-.587-.476.159-.924.366-1.333.615-.435.265-.802.597-1.093.985-.322.432-.486.901-.486 1.396v16.307c0 2.158-.363 3.75-1.079 4.73-.688.939-1.849 1.396-3.548 1.396-1.705 0-2.877-.459-3.584-1.401-.734-.979-1.107-2.57-1.107-4.726V86.947c0-.908-.384-1.728-1.145-2.438-.751-.702-1.751-1.057-2.973-1.057-1.258 0-2.296.352-3.085 1.045-.811.71-1.222 1.535-1.222 2.45v15.806c0 1.988.194 3.869.575 5.588.393 1.758 1.077 3.3 2.035 4.586.968 1.299 2.282 2.323 3.906 3.05 1.607.716 3.617 1.079 5.975 1.079 2.457 0 4.515-.455 6.115-1.354 1.342-.754 2.473-1.744 3.371-2.951.866 1.207 1.971 2.197 3.294 2.95 1.58.899 3.669 1.354 6.211 1.354 2.357 0 4.359-.364 5.947-1.081 1.601-.726 2.902-1.751 3.872-3.048.96-1.29 1.645-2.833 2.034-4.586.381-1.719.575-3.6.575-5.588V86.947c0-.911-.398-1.733-1.184-2.445-.767-.697-1.818-1.05-3.12-1.05z"/></svg>
|
||||||
|
After Width: | Height: | Size: 3.3 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 9.2 KiB |
@ -4,6 +4,9 @@ import $ from 'jquery';
|
|||||||
/* Annotations */
|
/* Annotations */
|
||||||
import annotator from 'annotator';
|
import annotator from 'annotator';
|
||||||
|
|
||||||
|
import ClipboardJS from 'clipboard';
|
||||||
|
import 'mathjax/es5/tex-svg';
|
||||||
|
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
||||||
import 'lato-font/css/lato-font.css';
|
import 'lato-font/css/lato-font.css';
|
||||||
@ -13,8 +16,10 @@ import './global.scss';
|
|||||||
import './js/shortcuts/entry';
|
import './js/shortcuts/entry';
|
||||||
import './js/shortcuts/main';
|
import './js/shortcuts/main';
|
||||||
|
|
||||||
import { savePercent, retrievePercent } from './js/tools';
|
/* Hightlight */
|
||||||
|
import './js/highlight';
|
||||||
|
|
||||||
|
import { savePercent, retrievePercent } from './js/tools';
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
Annotations & Remember position
|
Annotations & Remember position
|
||||||
@ -65,7 +70,50 @@ $(document).ready(() => {
|
|||||||
retrievePercent(x.entryId);
|
retrievePercent(x.entryId);
|
||||||
|
|
||||||
$(window).resize(() => {
|
$(window).resize(() => {
|
||||||
retrievePercent(x.entryId);
|
retrievePercent(x.entryId, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll('[data-handler=tag-rename]').forEach((item) => {
|
||||||
|
const current = item;
|
||||||
|
current.wallabag_edit_mode = false;
|
||||||
|
current.onclick = (event) => {
|
||||||
|
const target = event.currentTarget;
|
||||||
|
|
||||||
|
if (target.wallabag_edit_mode === false) {
|
||||||
|
$(target.parentNode.querySelector('[data-handle=tag-link]')).addClass('hidden');
|
||||||
|
$(target.parentNode.querySelector('[data-handle=tag-rename-form]')).removeClass('hidden');
|
||||||
|
target.parentNode.querySelector('[data-handle=tag-rename-form] input').focus();
|
||||||
|
target.querySelector('.material-icons').innerHTML = 'done';
|
||||||
|
|
||||||
|
target.wallabag_edit_mode = true;
|
||||||
|
} else {
|
||||||
|
target.parentNode.querySelector('[data-handle=tag-rename-form]').submit();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// mimic radio button because emailTwoFactor is a boolean
|
||||||
|
$('#update_user_googleTwoFactor').on('change', () => {
|
||||||
|
$('#update_user_emailTwoFactor').prop('checked', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#update_user_emailTwoFactor').on('change', () => {
|
||||||
|
$('#update_user_googleTwoFactor').prop('checked', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
// same mimic for super admin
|
||||||
|
$('#user_googleTwoFactor').on('change', () => {
|
||||||
|
$('#user_emailTwoFactor').prop('checked', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#user_emailTwoFactor').on('change', () => {
|
||||||
|
$('#user_googleTwoFactor').prop('checked', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
// handle copy to clipboard for developer stuff
|
||||||
|
const clipboard = new ClipboardJS('.btn');
|
||||||
|
clipboard.on('success', (e) => {
|
||||||
|
e.clearSelection();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function retrievePercent(id) {
|
function retrievePercent(id, resized) {
|
||||||
if (!supportsLocalStorage()) { return false; }
|
if (!supportsLocalStorage()) { return false; }
|
||||||
|
|
||||||
const bheight = $(document).height();
|
const bheight = $(document).height();
|
||||||
const percent = localStorage[`wallabag.article.${id}.percent`];
|
const percent = localStorage[`wallabag.article.${id}.percent`];
|
||||||
const scroll = bheight * percent;
|
const scroll = bheight * percent;
|
||||||
|
|
||||||
$('html,body').animate({ scrollTop: scroll }, 'fast');
|
if (!resized) {
|
||||||
|
$('html,body').animate({ scrollTop: scroll }, 'fast');
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -221,6 +221,12 @@ ol li:last-child {
|
|||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iframe,
|
||||||
|
video {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
mark {
|
mark {
|
||||||
padding: 0 0.2em;
|
padding: 0 0.2em;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ blockquote {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-rss {
|
.icon-feed {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 0.2em 0.5em;
|
padding: 0.2em 0.5em;
|
||||||
@ -101,8 +101,8 @@ blockquote {
|
|||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-rss:hover,
|
.icon-feed:hover,
|
||||||
.icon-rss:focus {
|
.icon-feed:focus {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #000;
|
color: #000;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@ -295,6 +295,15 @@ div.pagination ul {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hide {
|
.card-tag-form {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-tag-form input[type="text"] {
|
||||||
|
min-width: 20em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hide,
|
||||||
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,3 +170,9 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only print {
|
||||||
|
header h1.logo {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -136,7 +136,7 @@
|
|||||||
content: "\ea3a";
|
content: "\ea3a";
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-rss::before {
|
.icon-feed::before {
|
||||||
content: "\e808";
|
content: "\e808";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,11 +6,15 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 45em;
|
max-width: 45em;
|
||||||
|
padding: 5px 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 0 10px #ccc;
|
||||||
|
|
||||||
article {
|
article {
|
||||||
color: #424242;
|
color: #424242;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 1.7em;
|
line-height: 1.7em;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
@ -50,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
border-bottom: 1px dotted #03a9f4;
|
border-bottom: 1px dotted $blueAccentColor;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +111,7 @@
|
|||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
|
|
||||||
.stats {
|
.stats {
|
||||||
font-size: 0.8em;
|
font-size: 0.7em;
|
||||||
margin: 8px 5px 5px;
|
margin: 8px 5px 5px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
@ -118,6 +122,7 @@
|
|||||||
i.material-icons {
|
i.material-icons {
|
||||||
color: #3e3e3e;
|
color: #3e3e3e;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,10 +139,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chip {
|
.chip {
|
||||||
background-color: $blueAccentColor;
|
background-color: #9e9e9e;
|
||||||
padding: 0 15px 0 10px;
|
padding: 0 15px 0 10px;
|
||||||
margin: auto 2px;
|
margin: auto 2px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
height: 18px;
|
||||||
|
line-height: 18px;
|
||||||
|
|
||||||
a,
|
a,
|
||||||
i {
|
i {
|
||||||
@ -146,8 +153,8 @@
|
|||||||
|
|
||||||
i.material-icons {
|
i.material-icons {
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 20px;
|
font-size: 16px;
|
||||||
line-height: 32px;
|
line-height: 18px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,18 +178,18 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
width: 260px !important;
|
width: 260px !important;
|
||||||
|
|
||||||
.collapsible-body {
|
|
||||||
height: auto;
|
|
||||||
|
|
||||||
li a i.material-icons {
|
|
||||||
margin: auto 5px auto -8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
span {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collapsible-body {
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
li a i.material-icons {
|
||||||
|
margin: auto 5px auto -8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user