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

Install script to create database #60

Open
bufke opened this issue Jan 23, 2024 · 0 comments
Open

Install script to create database #60

bufke opened this issue Jan 23, 2024 · 0 comments

Comments

@bufke
Copy link
Contributor

bufke commented Jan 23, 2024

KoboToolbox requires two databases. Most users would deploy one postgresql server and create the second database. It would be nice if this could be automated. It should default to disabled.

Requirements:

  • Disabled by default
  • An optional prefix for database name
  • Assumes the helm chart has credentials and permissions to create database
  • Only create when the database doesn't already exist
  • Only run on install, not update

Questions:

  1. Should it create both?
  2. Is there a way to set the DB string just once? Often it's set multiple times.

Bonus requirements:

  • Deploy the mongo db indexes
import pymongo
settings.MONGO_DB.instances.create_index([("_userform_id", pymongo.ASCENDING)])
settings.MONGO_DB.instances.create_index([("_userform_id", pymongo.ASCENDING), ("_id", pymongo.DESCENDING)])
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

No branches or pull requests

1 participant