Fix PostgreSQL compatibility by removing JSON column index - #33
Merged
Merged
Conversation
- Remove permissions field index that causes PostgreSQL btree operator class error - Maintains functionality while fixing PostgreSQL compatibility - Permissions queries will still work, just without index optimization Co-Authored-By: mark.gilbert@prominic.net <mark.gilbert@prominic.net>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
MarkProminic
deleted the
devin/1727258350-postgresql-compatibility-fix
branch
September 25, 2025 10:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix PostgreSQL compatibility by removing JSON column index
Summary
Removes the problematic
permissionsfield index from the User model that was causing PostgreSQL database initialization failures. PostgreSQL requires specific operator classes for JSON column indexes, causing a "data type json has no default operator class for access method btree" error during Sequelize table creation.This change maintains full functionality while enabling PostgreSQL support - permissions queries will work identically, just without index optimization on that specific column.
Review & Testing Checklist for Human
ALTER SCHEMA public OWNER TO armor_user;) and confirm no database errors during startupNotes
This fix addresses the critical PostgreSQL compatibility issue identified in production logs. The complete setup requires both this code change AND the PostgreSQL schema ownership fix (
sudo -u postgres psql -d armor_db -c "ALTER SCHEMA public OWNER TO armor_user;").Link to Devin run: https://app.devin.ai/sessions/30b40362482e42109b8243b6c7a36ca3
Requested by: @MarkProminic