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

Fix bug where "metadata" scheme was not created automatically (#1971) and (#1831) #2018

Merged

Conversation

khakimov
Copy link
Contributor

  • added script server/scripts/setup-db.ts using TypeORM and configService.get('PG_DATABASE_URL') to CREATE SCHEMA IF NOT EXISTS "metadata"

  • added ./scripts/setup-db.ts to "prisma:migrate": "npx prisma migrate deploy && **npx ts-node ./scripts/setup-db.ts && yarn typeorm migration:run -- -d ./src/metadata/metadata.datasource.ts" to create metadata

  • tested deployment on render, fresh instance (or Blueprint), all works.

@sweep-ai
Copy link
Contributor

sweep-ai bot commented Oct 14, 2023

Apply Sweep Rules to your PR?

  • Apply: Leftover TODOs in the code should be handled.
  • Apply: All new business logic should have corresponding unit tests in the tests/ directory.
  • Apply: Any clearly inefficient or repeated code should be optimized or refactored.

@charlesBochet
Copy link
Member

Thank you,
I am currently working on the setup of Twenty on variable environments. I'll merge this one because it's working but likely change it's behavior because we are creating metadata schema in multiple place, we need to unify this

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

Thanks again :)

@charlesBochet charlesBochet merged commit 77c88bd into twentyhq:main Oct 14, 2023
7 checks passed
@khakimov khakimov deleted the fix/deploy-render-set-environment branch October 19, 2023 16:15
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.

2 participants