summaryrefslogtreecommitdiff
path: root/lib/migrations (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-03-21Add fix for missing deletion of notes on user-deletion requestSheogorath1-0/+61
Depending on how the system was setup, this bug lead to keep user's data around even after a successful deletion of user'S account. This patch will make sure the missing database constraints are implemented and missed out deletions are executed. This bug was introduced to insufficent testing after implementing the feature initially. It was well tested, using the app process itself, but the migrations where missed out. I'm currently not sure, if there was also a change in how sequelize handles cassaded deletion, since I'm unter the impression that before switching to sequelize 5, this feature has worked. But I haven't verified this. No matter what, the cleanup process is rather straight forward and will be invoked on migration, but can also be done manually using the new `bin/cleanup` script. This change will result in a release 1.6.1. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-08-12fix: migration should return promisechandi3-18/+18
Signed-off-by: chandi <git@chandi.it>
2019-05-31Fix eslint warningsSheogorath11-17/+26
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-11-16Update error message text checksCarles Bruguera8-8/+8
Signed-off-by: Carles Bruguera <carlesba@gmail.com>
2018-09-05Extend migration error handlingSheogorath8-9/+9
The current error handling seems to conflict with some sequelize versions. So we add a second version of it in our excemptions. I'm not happy about it, but when it helps to prevent further migration breaking, it's worth it. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-07-31Add missing catch blocks for migration from 1.1.1 to 1.2.0Hugo Caloto8-2/+56
Signed-off-by: Hugo Caloto <hcaloto@gmail.com>
2018-05-25Add token based security featureSheogorath1-0/+13
In the current setup users could be tricked into deleting their data by providing a malicious link like `[click me](/me/delete)`. This commit prevents such an easy attack and need the user's deleteToken to get his data deleted. In case someone requests his deletion by email you can also ask him for this token. We can add a GUI that shows it later on. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-26Use TEXT instead of STRING for tokensPedro Ferreira1-0/+23
Signed-off-by: Pedro Ferreira <pedro.ferreira@cern.ch>
2018-03-06Add missing migration for permissionsSheogorath1-0/+11
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-02-09Fix field type to prevent data truncation of authorship (#721)Max Wu1-0/+13
* Fix field type to prevent data truncation of authorship
2018-02-08Fix typo of DB migration scriptTakeaki Matsumoto1-2/+2
Signed-off-by: Takeaki Matsumoto <takeaki.matsumoto@ntt.com>
2017-10-16Fix #521 by converting content fields to LONGTEXT in MySQL, to prevent ↵Claudius Coenen1-0/+16
truncation of data.
2017-03-28fix: Other dialect duplicated add index problemBoHong Li1-3/+9
Detect is using SQLite to add index
2017-03-28fix: Support SQliteBoHong Li3-7/+25
Move 'unique' constraint to another statement (SQLite don't support set unique when addColumn)
2017-03-27fix: Add missing migrationBoHong Li7-0/+139
2017-03-24fix: Fixed sequelize-cli db:migration cannot stop when occur errorBoHong Li5-41/+51
Up and Down method must return a Promise. breaking changes: docker-hackmd cannot initialize, because db:migration will fail
2017-03-14Use strict mode in all backend filesBoHong Li5-0/+5
add ‘use strict’ in all backend file
2017-03-08Use JavaScript Standard StyleBoHong Li5-45/+29
Introduce JavaScript Standard Style as project style rule, and fixed all fail on backend code.
2017-01-21Fix redundant parameter to removeColumn in db migration scriptsWu Cheng-Han2-3/+3
2017-01-02Fix migration script of revision lacks of definition of primary keyWu Cheng-Han1-1/+4
2016-12-02Update to support optional email register and signinWu Cheng-Han1-0/+13
2016-10-10Update to support delete noteWu Cheng-Han1-0/+11
2016-07-30Add support of saving authors and authorshipWu Cheng-Han1-0/+28
2016-06-17Add support of saving note revision and improve app start and stop procedure ↵Cheng-Han, Wu1-0/+24
to ensure data integrity
2016-05-15Add db migrations for PR #121Cheng-Han, Wu1-0/+15