Skip to content

[CAL-590] RFC: Self-hosted instance metadata DB table #6014

@zomars

Description

@zomars

Is your proposal related to a problem?

We're getting to the point where we need to save some instance specific settings and values where using .env variables are not enough.

Describe the solution you'd like

  • Add an Deployment model to our DB schema that will allow us to save deployment specific settings.

We could use this table to save things like:

  • Whitelabel data
    • App name
    • App Logo
    • Theme colors
  • License data
    • CALCOM_LICENSE_KEY The actual license key for enterprise users.
    • licenseConsentAt A date of when the admin user has agreed to the Cal.com license
  • Etc... ?

Describe alternatives you've considered

  • More environment variables?

Additional context

This would be a special table as would be a "Single record table". We can keep adding columns per needed but it should only have a single row. So the usage would be pretty simple. Example:

// Retrieve this deployment app logo
const deployment = await prisma.deployment.findFirst({
  where: { id: 1 },
  select: {
    appLogo: true,
  }
});

CAL-590

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions