Skip to content

Fix issue with SQlite connection#1879

Open
alibell wants to merge 4 commits into
hackmdio:developfrom
alibell:develop
Open

Fix issue with SQlite connection#1879
alibell wants to merge 4 commits into
hackmdio:developfrom
alibell:develop

Conversation

@alibell

@alibell alibell commented Aug 8, 2024

Copy link
Copy Markdown

The current docker image doesn't work with SQLite.

There are two main issues :

  • pcheck is executed even if the $CMD_DB_URL connection is configured to use an sqlite database
  • the sqlite3 node package is not installed by default

The current fix resolve these two issues.

yamashush and others added 3 commits August 8, 2024 10:47
Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com>
Signed-off-by: Ali Bellamine <bellamine@elsan.care>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: Ali Bellamine <bellamine@elsan.care>
Signed-off-by: Ali Bellamine <bellamine@elsan.care>
Signed-off-by: Ali Bellamine <bellamine@elsan.care>
@Nexyll

Nexyll commented Dec 11, 2024

Copy link
Copy Markdown

I was wondering why a migration was created to add an index in this PR?
By the way, I’m very interested in the fix. Is the project still active?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issues with the SQLite connection in the docker image by adjusting the migration logic for adding and removing the index on the "Revisions" table.

  • Adds a migration to create an index on the "noteId" column
  • Provides a down migration to remove the index
Files not reviewed (1)
  • deployments/docker-entrypoint.sh: Language not supported

},

down: (queryInterface, Sequelize) => {
return queryInterface.removeIndex('Revisions', 'noteId')

Copilot AI Apr 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The down migration is attempting to remove an index using the name 'noteId', but the up migration does not explicitly name the index. Consider providing an explicit index name in queryInterface.addIndex so that removeIndex can reference the correct name.

Copilot uses AI. Check for mistakes.
@jackycute

Copy link
Copy Markdown
Member

Hi @alibell,
Thanks for the PR.
However, according to the description of the PR, I think the Revision migration script should be separated to another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants