openedx / openedx-learning

GNU Affero General Public License v3.0
5 stars 10 forks source link

Add PostgreSQL support #255

Open ormsbee opened 2 days ago

ormsbee commented 2 days ago

This repo currently has a set of collation-related helpers that it uses to help normalize model collation behavior between MySQL and SQLite:

They manifest in the migrations files like this:

https://github.com/openedx/openedx-learning/blob/14284d265a9f344621ae81af8f3847e48b6c2215/openedx_learning/apps/authoring/publishing/migrations/0001_initial.py#L28-L29

The MultiCollationCharField is also used in one place in edx-platform

Anyone looking to add PostgreSQL support would need to look for all instances of MultiCollationCharField and MultiCollationTextField and put the postgres-specific mappings there. That includes the convenience methods like case_insensitive_char_field in fields.py, as well as in the individual migration files that have the sqlite/mysql arguments serialized out.

ormsbee commented 2 days ago

@qasimgulzar: These are some of the specifics that have to happen for this repo to support PostgreSQL. Thank you for taking this work on.

qasimgulzar commented 15 hours ago

Thank you @ormsbee for sharing this with me. I am going to take care of it.