Skip to content

Conversation

fettuccinae
Copy link

@fettuccinae fettuccinae commented Sep 23, 2025

  1. Added a notifications_enabled column in user_preference table and related code in the endpoint, so that a user can set their notification preference, i.e if they want to receive email notifications immediately or in a digest.
    They have 3 options now:
    If notifications are disabled, they will be receiving only the important mails.
    If notifications are enabled and digest is disabled, they will be receiving the mails(important and non important) immediately
    If notifications are enabled and digest is enabled, they will be receiving the important mails directly and non-important mails in a digest.

  2. Fixed linting issues (unused import and a semi colon)

  3. Fixed the uuid extension missing bug by creating extensions in metabrainz db as the postgres user instead of creating them in the default postgres db.

@fettuccinae
Copy link
Author

@mayhem PR ready for review.

@mayhem
Copy link
Member

mayhem commented Sep 25, 2025

I'll try and have a look tomorrow -- I'm "mostly" on vacation this week.

@mayhem
Copy link
Member

mayhem commented Sep 29, 2025

Sorry, not feeling great right now. Hopefully tomorrow.

@fettuccinae
Copy link
Author

Sorry, not feeling great right now. Hopefully tomorrow.

No worries !

@mayhem
Copy link
Member

mayhem commented Oct 1, 2025

This PR looks good to me, but the bits about the PG extension need to have a quick review from @amCap1712

db.run_sql_script_without_transaction(os.path.join(ADMIN_SQL_DIR, 'create_db.sql'))
click.echo('Done.')

db.init_db_engine(application.config["POSTGRES_ADMIN_MEB_URI"])
Copy link
Member

Choose a reason for hiding this comment

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

This looks unneeded to me, the POSTGRES_ADMIN_URI config var does the same. Can you share the error you were facing?

Copy link
Author

@fettuccinae fettuccinae Oct 3, 2025

Choose a reason for hiding this comment

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

https://gist.github.com/fettuccinae/787cf9b7368cf9aa2efc977e000575d6
These were the logs I was getting when POSTGRES_ADMIN_URI was used to create extensions( I think it was creating extensions on the POSTGRES database instead on the METABRAINZ database)

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.

3 participants