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

NoMongo: Migration Failure: Permission Denied for Schema Public in develop-postgres Branch #2856

Closed
prayanshchh opened this issue Jan 14, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@prayanshchh
Copy link
Contributor

prayanshchh commented Jan 14, 2025

Describe the bug
When attempting to apply database migrations locally on the develop-postgres branch, the process fails with a permission denied for schema public error. The issue occurs even when the PostgreSQL database is correctly set up with the appropriate credentials.

To Reproduce
Steps to reproduce the behavior:

1.Clone the Talawa repository and switch to the develop-postgres branch.
2.Start the PostgreSQL database using valid credentials
3.Run: npm run apply_drizzle_migrations

Expected behavior
Database migrations should be applied successfully, with all required schema and table changes applied to the database.

Actual behavior
The migration fails with the following error:

No config path provided, using default 'drizzle.config.ts'
Reading config file '/path/to/drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] applying migrations...error: permission denied for schema public
    at /path/to/node_modules/pg/lib/client.js:535:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (/path/to/node_modules/src/pg-core/dialect.ts:102:7)
    at NodePgSession.transaction (/path/to/node_modules/src/node-postgres/session.ts:193:19)
    at PgDialect.migrate (/path/to/node_modules/src/pg-core/dialect.ts:95:3)
    at migrate (/path/to/node_modules/src/node-postgres/migrator.ts:10:2) {
  severity: 'ERROR',
  code: '42501',
  file: 'aclchk.c',
  line: '2812',
  routine: 'aclcheck_error'
}

Screenshots
image

Additional details
similar issue: drizzle-team/drizzle-orm#3353
Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

@prayanshchh prayanshchh added the bug Something isn't working label Jan 14, 2025
@github-actions github-actions bot added the unapproved Unapproved for Pull Request label Jan 14, 2025
@prayanshchh
Copy link
Contributor Author

assign

@palisadoes palisadoes changed the title Migration Failure: Permission Denied for Schema Public in develop-postgres Branch NoMongo: Migration Failure: Permission Denied for Schema Public in develop-postgres Branch Jan 14, 2025
@palisadoes palisadoes removed the unapproved Unapproved for Pull Request label Jan 14, 2025
@xoldd
Copy link
Contributor

xoldd commented Jan 14, 2025

@prayanshchh probably a solution to this issue as well: #2855 (comment)

@palisadoes
Copy link
Contributor

@prayanshchh Please close if the other issue fixes this one

@prayanshchh
Copy link
Contributor Author

my understanding was that app can be booted up locally as well as by docker but as app will be booted up by devcontainers, we won't need this. Closing

@github-project-automation github-project-automation bot moved this from Backlog to Done in NoMongo: Talawa-API Jan 14, 2025
@prayanshchh prayanshchh reopened this Jan 14, 2025
@github-project-automation github-project-automation bot moved this from Done to Backlog in NoMongo: Talawa-API Jan 14, 2025
@prayanshchh prayanshchh closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in NoMongo: Talawa-API Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants