Skip to content

Commit

Permalink
fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Oct 3, 2024
1 parent 8496632 commit 05c8115
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ const ReleaseCell: React.FC<{
workspaceSlug: string;
systemSlug: string;
environment: Environment & { targets: Target[] };
release: { id: string; version: string; createdAt: Date } | null;
release: {
id: string;
name: string;
version: string;
createdAt: Date;
} | null;
deployment: Deployment;
}> = async ({
release,
Expand Down Expand Up @@ -97,7 +102,7 @@ const ReleaseCell: React.FC<{
<Release
releaseId={release.id}
environment={env}
name={release.version}
name={release.name}
deployedAt={release.createdAt}
releaseJobTriggers={jc}
workspaceSlug={workspaceSlug}
Expand All @@ -122,7 +127,12 @@ const DeploymentTable: React.FC<{
environments: Array<Environment & { targets: Target[] }>;
deployments: Array<
Deployment & {
latestRelease: { id: string; version: string; createdAt: Date } | null;
latestRelease: {
id: string;
name: string;
version: string;
createdAt: Date;
} | null;
}
>;
workspaceSlug: string;
Expand Down
6 changes: 6 additions & 0 deletions packages/db/drizzle/0009_flaky_hellfire_club.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
DO $$ BEGIN
CREATE TYPE "public"."target_relationship_type" AS ENUM('depends_on', 'created_by');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
---
CREATE TABLE IF NOT EXISTS "target_relationship" (
"uuid" uuid,
"source_id" uuid NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion packages/db/src/schema/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export function targetMatchesMetadata(
: buildCondition(tx, metadata);
}

const targetRelationshipType = pgEnum("target_relationship_type", [
export const targetRelationshipType = pgEnum("target_relationship_type", [
"depends_on",
"created_by",
]);
Expand Down

0 comments on commit 05c8115

Please sign in to comment.