Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

czgu
Copy link
Collaborator

@czgu czgu commented Mar 28, 2021

made sure upgrade/downgrade would work for both MySQL and Postgres
Updated all foreign key on delete behavior to either cascade or set null.
fixed some erroneous typing and code (such as notification.user is varchar instead of int, and some 0 or 1 type comparison for boolean)

NOTE: i did an implicit type conversion for acl_control to be JSON at the start (since Postgres dislikes type conversions from str to json), existing MySQL users would need to update acl_control to be in JSON manually, but even if they don't it should not impact usability of the app.


in future we probably need documentation on how to connect to a postgressql database (right now the key package psycopg2 is missing, while pymysql is installed by default)

another things to note is that maybe we should consider moving the default development database to sqlite?

@czgu czgu requested a review from meowcodes March 28, 2021 07:56
@czgu czgu linked an issue Mar 28, 2021 that may be closed by this pull request
@czgu czgu merged commit 028f403 into master Mar 29, 2021
@czgu czgu deleted the postgres branch March 29, 2021 00:20
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.

Setup Github Action to auto test alembic migration scripts
2 participants