Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migrations to make it compatible with mysql and postgresql #511

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
FROM
lti_consumer_lticonfiguration
WHERE
config_id = ""
config_id = '00000000-0000-0000-0000-000000000000'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the behavior of this backfill would get altered by this, but this backfill only applies to MySQL in the first place (since PostgreSQL would be new, we'd never get into this weird state of needing to backfill in blank entries). So instead of altering the field we're searching on, maybe we could just skip the backfills entirely if we detect that the database being used is PostgreSQL?

Copy link
Author

@qasimgulzar qasimgulzar Nov 11, 2024

Choose a reason for hiding this comment

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

Updated, actually postgrsql consider double quotes wrapped string as a column name, I have switched it to single quotes which is considered as values for both dialect.

Copy link
Author

Choose a reason for hiding this comment

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

I have updated this line.

;\
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
FROM
lti_consumer_lticonfiguration
WHERE
lti_config = ""
lti_config = ''
;\
"""

Expand Down
Loading