diff options
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 2 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/enhancement_request.md | 2 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/feature_request.md | 2 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/question---other.md | 2 | ||||
-rw-r--r-- | docs/setup/yunohost.md | 4 | ||||
-rw-r--r-- | lib/migrations/20150702001020-update-to-0_3_1.js | 3 | ||||
-rw-r--r-- | lib/migrations/20160112220142-note-add-lastchange.js | 3 | ||||
-rw-r--r-- | lib/migrations/20160420180355-note-add-alias.js | 3 | ||||
-rw-r--r-- | lib/migrations/20160515114000-user-add-tokens.js | 3 | ||||
-rw-r--r-- | lib/migrations/20160607060246-support-revision.js | 3 | ||||
-rw-r--r-- | lib/migrations/20160703062241-support-authorship.js | 3 | ||||
-rw-r--r-- | lib/migrations/20161009040430-support-delete-note.js | 3 | ||||
-rw-r--r-- | lib/migrations/20161201050312-support-email-signin.js | 6 | ||||
-rw-r--r-- | lib/migrations/20180525153000-user-add-delete-token.js | 8 | ||||
-rw-r--r-- | lib/migrations/20200321153000-fix-account-deletion.js | 7 | ||||
-rw-r--r-- | renovate.json | 2 |
16 files changed, 40 insertions, 16 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8de6e3be..1736721b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve HedgeDoc. title: '' -labels: 'bug' +labels: 'type: bug' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/enhancement_request.md b/.github/ISSUE_TEMPLATE/enhancement_request.md index 3d7af927..dee13b03 100644 --- a/.github/ISSUE_TEMPLATE/enhancement_request.md +++ b/.github/ISSUE_TEMPLATE/enhancement_request.md @@ -2,7 +2,7 @@ name: Enhancement request about: Suggest an enhancement of an existing feature. title: '' -labels: 'enhancement' +labels: 'type: enhancement' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 98ef5148..8a861a4a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest a new feature for this project, which isn't existing yet. title: '' -labels: 'feature request' +labels: 'type: feature' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/question---other.md b/.github/ISSUE_TEMPLATE/question---other.md index 757ba182..36fd3336 100644 --- a/.github/ISSUE_TEMPLATE/question---other.md +++ b/.github/ISSUE_TEMPLATE/question---other.md @@ -2,7 +2,7 @@ name: Question / Other about: Questions about the project, features, or organziational issues title: '' -labels: question +labels: 'type: question' assignees: '' --- diff --git a/docs/setup/yunohost.md b/docs/setup/yunohost.md index 9ec9d45b..fd90036c 100644 --- a/docs/setup/yunohost.md +++ b/docs/setup/yunohost.md @@ -3,6 +3,6 @@ YunoHost HedgeDoc is available as a 1-click install on [YunoHost](https://yunohost.org/). YunoHost is a Debian GNU/Linux based distribution packaged with free software that automates the installation of a personal web server. -[](https://install-app.yunohost.org/?app=codimd) +[](https://install-app.yunohost.org/?app=hedgedoc) -The source code for the package can be found [here](https://github.com/YunoHost-Apps/codimd_ynh). +The source code for the package can be found [here](https://github.com/YunoHost-Apps/hedgedoc_ynh). diff --git a/lib/migrations/20150702001020-update-to-0_3_1.js b/lib/migrations/20150702001020-update-to-0_3_1.js index b941048e..16001f2e 100644 --- a/lib/migrations/20150702001020-update-to-0_3_1.js +++ b/lib/migrations/20150702001020-update-to-0_3_1.js @@ -21,7 +21,8 @@ module.exports = { defaultValue: 0 }) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: shortid' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'shortid'" || error.message === 'column "shortid" of relation "Notes" already exists') { + if (error.message === 'column "shortid" of relation "Notes" already exists' || + error.message.toLowerCase().includes('duplicate column name')) { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20160112220142-note-add-lastchange.js b/lib/migrations/20160112220142-note-add-lastchange.js index 69781cef..430e1cc1 100644 --- a/lib/migrations/20160112220142-note-add-lastchange.js +++ b/lib/migrations/20160112220142-note-add-lastchange.js @@ -8,7 +8,8 @@ module.exports = { type: Sequelize.DATE }) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: lastchangeuserId' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'lastchangeuserId'" || error.message === 'column "lastchangeuserId" of relation "Notes" already exists') { + if (error.message === 'column "lastchangeuserId" of relation "Notes" already exists' || + error.message.toLowerCase().includes('duplicate column name')) { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20160420180355-note-add-alias.js b/lib/migrations/20160420180355-note-add-alias.js index 82941a91..18afb9c0 100644 --- a/lib/migrations/20160420180355-note-add-alias.js +++ b/lib/migrations/20160420180355-note-add-alias.js @@ -8,7 +8,8 @@ module.exports = { indicesType: 'UNIQUE' }) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: alias' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'alias'" || error.message === 'column "alias" of relation "Notes" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "alias" of relation "Notes" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20160515114000-user-add-tokens.js b/lib/migrations/20160515114000-user-add-tokens.js index e47ef5a4..33457824 100644 --- a/lib/migrations/20160515114000-user-add-tokens.js +++ b/lib/migrations/20160515114000-user-add-tokens.js @@ -4,7 +4,8 @@ module.exports = { return queryInterface.addColumn('Users', 'accessToken', Sequelize.STRING).then(function () { return queryInterface.addColumn('Users', 'refreshToken', Sequelize.STRING) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: accessToken' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'accessToken'" || error.message === 'column "accessToken" of relation "Users" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "accessToken" of relation "Users" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20160607060246-support-revision.js b/lib/migrations/20160607060246-support-revision.js index b318ea44..fa2731b8 100644 --- a/lib/migrations/20160607060246-support-revision.js +++ b/lib/migrations/20160607060246-support-revision.js @@ -16,7 +16,8 @@ module.exports = { updatedAt: Sequelize.DATE }) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: savedAt' | error.message === "ER_DUP_FIELDNAME: Duplicate column name 'savedAt'" || error.message === 'column "savedAt" of relation "Notes" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "savedAt" of relation "Notes" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20160703062241-support-authorship.js b/lib/migrations/20160703062241-support-authorship.js index 86054f1c..c54dde61 100644 --- a/lib/migrations/20160703062241-support-authorship.js +++ b/lib/migrations/20160703062241-support-authorship.js @@ -17,7 +17,8 @@ module.exports = { updatedAt: Sequelize.DATE }) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: authorship' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'authorship'" || error.message === 'column "authorship" of relation "Notes" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "authorship" of relation "Notes" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20161009040430-support-delete-note.js b/lib/migrations/20161009040430-support-delete-note.js index b7ee72c3..7b9b60cf 100644 --- a/lib/migrations/20161009040430-support-delete-note.js +++ b/lib/migrations/20161009040430-support-delete-note.js @@ -2,7 +2,8 @@ module.exports = { up: function (queryInterface, Sequelize) { return queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: deletedAt' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'deletedAt'" || error.message === 'column "deletedAt" of relation "Notes" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "deletedAt" of relation "Notes" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20161201050312-support-email-signin.js b/lib/migrations/20161201050312-support-email-signin.js index 5c9fbf85..0ade8cd2 100644 --- a/lib/migrations/20161201050312-support-email-signin.js +++ b/lib/migrations/20161201050312-support-email-signin.js @@ -3,7 +3,8 @@ module.exports = { up: function (queryInterface, Sequelize) { return queryInterface.addColumn('Users', 'email', Sequelize.TEXT).then(function () { return queryInterface.addColumn('Users', 'password', Sequelize.TEXT).catch(function (error) { - if (error.message === "ER_DUP_FIELDNAME: Duplicate column name 'password'" || error.message === 'column "password" of relation "Users" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "password" of relation "Users" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { @@ -11,7 +12,8 @@ module.exports = { } }) }).catch(function (error) { - if (error.message === 'SQLITE_ERROR: duplicate column name: email' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'email'" || error.message === 'column "email" of relation "Users" already exists') { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "email" of relation "Users" already exists') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { diff --git a/lib/migrations/20180525153000-user-add-delete-token.js b/lib/migrations/20180525153000-user-add-delete-token.js index 642fa5d4..2dc88dfb 100644 --- a/lib/migrations/20180525153000-user-add-delete-token.js +++ b/lib/migrations/20180525153000-user-add-delete-token.js @@ -4,6 +4,14 @@ module.exports = { return queryInterface.addColumn('Users', 'deleteToken', { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4 + }).catch(function (error) { + if (error.message.toLowerCase().includes('duplicate column name') || + error.message === 'column "deleteToken" of relation "Users" already exists') { + // eslint-disable-next-line no-console + console.log('Migration has already run… ignoring.') + } else { + throw error + } }) }, diff --git a/lib/migrations/20200321153000-fix-account-deletion.js b/lib/migrations/20200321153000-fix-account-deletion.js index e794e993..3b5a4224 100644 --- a/lib/migrations/20200321153000-fix-account-deletion.js +++ b/lib/migrations/20200321153000-fix-account-deletion.js @@ -45,6 +45,13 @@ module.exports = { }, onDelete: 'cascade' }) + }).catch(function (error) { + if (error.message.toLowerCase().includes('duplicate key on write or update')) { + // eslint-disable-next-line no-console + console.log('Migration has already run… ignoring.') + } else { + throw error + } }) }, diff --git a/renovate.json b/renovate.json index ecf2ad1e..910e0a2b 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,6 @@ ":gitSignOff" ], "labels": [ - "dependencies" + "type: maintenance" ] } |