mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-15 21:31:11 +00:00
f6622428f7
- Introduced support for project and environment assignments for vault providers, allowing for more granular access control. - Updated the vault provider schema to include assignments and modified related components to handle these changes. - Enhanced UI to display assignment status and allow users to manage project and environment associations effectively. - Added validation to ensure assignments reference valid projects and environments within the organization. - Updated tests to cover new functionality related to vault provider assignments and environment variable resolution.
13 lines
777 B
SQL
13 lines
777 B
SQL
CREATE TYPE "public"."VaultProviderType" AS ENUM('hashicorp', 'infisical', 'aws', 'doppler', 'azure');--> statement-breakpoint
|
|
CREATE TABLE "vault_provider" (
|
|
"vaultProviderId" text PRIMARY KEY NOT NULL,
|
|
"name" text NOT NULL,
|
|
"providerType" "VaultProviderType" NOT NULL,
|
|
"config" jsonb NOT NULL,
|
|
"assignments" jsonb DEFAULT '[]'::jsonb NOT NULL,
|
|
"organizationId" text NOT NULL,
|
|
"createdAt" text NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "vault_provider" ADD CONSTRAINT "vault_provider_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "vault_provider_org_name_idx" ON "vault_provider" USING btree ("organizationId","name"); |