Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/lib/prisma/migrations/12_auto_rebuilds/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Warnings:
- You are about to drop the column `AutomaticBuilds` on the `Projects` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "public"."Projects" DROP COLUMN "AutomaticBuilds",
ADD COLUMN "AutoPublishOnRebuild" BOOLEAN DEFAULT false,
ADD COLUMN "RebuildOnSoftwareUpdate" BOOLEAN DEFAULT false;
55 changes: 28 additions & 27 deletions src/lib/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -331,33 +331,34 @@ model ProjectImports {
}

model Projects {
Id Int @id(map: "PK_Projects") @default(autoincrement())
Name String?
TypeId Int
Description String?
OwnerId Int
GroupId Int
OrganizationId Int
Language String?
IsPublic Boolean? @default(true)
DateCreated DateTime? @default(now()) @db.Timestamp(6)
DateUpdated DateTime? @updatedAt @db.Timestamp(6)
DateArchived DateTime? @db.Timestamp(6)
AllowDownloads Boolean? @default(true)
AutomaticBuilds Boolean? @default(true)
WorkflowProjectId Int @default(0)
WorkflowProjectUrl String?
WorkflowAppProjectUrl String?
DateActive DateTime? @db.Timestamp(6)
ImportId Int?
Authors Authors[]
Products Products[]
ApplicationType ApplicationTypes @relation(fields: [TypeId], references: [Id], onUpdate: NoAction, map: "FK_Projects_ApplicationTypes_TypeId")
Group Groups @relation(fields: [GroupId], references: [Id], onUpdate: NoAction, map: "FK_Projects_Groups_GroupId")
Organization Organizations @relation(fields: [OrganizationId], references: [Id], onUpdate: NoAction, map: "FK_Projects_Organizations_OrganizationId")
ProjectImport ProjectImports? @relation(fields: [ImportId], references: [Id], onDelete: Restrict, onUpdate: NoAction, map: "FK_Projects_ProjectImports_ImportId")
Owner Users @relation(fields: [OwnerId], references: [Id], onUpdate: NoAction, map: "FK_Projects_Users_OwnerId")
Reviewers Reviewers[]
Id Int @id(map: "PK_Projects") @default(autoincrement())
Name String?
TypeId Int
Description String?
OwnerId Int
GroupId Int
OrganizationId Int
Language String?
IsPublic Boolean? @default(true)
DateCreated DateTime? @default(now()) @db.Timestamp(6)
DateUpdated DateTime? @updatedAt @db.Timestamp(6)
DateArchived DateTime? @db.Timestamp(6)
AllowDownloads Boolean? @default(true)
AutoPublishOnRebuild Boolean? @default(false)
RebuildOnSoftwareUpdate Boolean? @default(false)
WorkflowProjectId Int @default(0)
WorkflowProjectUrl String?
WorkflowAppProjectUrl String?
DateActive DateTime? @db.Timestamp(6)
ImportId Int?
Authors Authors[]
Products Products[]
ApplicationType ApplicationTypes @relation(fields: [TypeId], references: [Id], onUpdate: NoAction, map: "FK_Projects_ApplicationTypes_TypeId")
Group Groups @relation(fields: [GroupId], references: [Id], onUpdate: NoAction, map: "FK_Projects_Groups_GroupId")
Organization Organizations @relation(fields: [OrganizationId], references: [Id], onUpdate: NoAction, map: "FK_Projects_Organizations_OrganizationId")
ProjectImport ProjectImports? @relation(fields: [ImportId], references: [Id], onDelete: Restrict, onUpdate: NoAction, map: "FK_Projects_ProjectImports_ImportId")
Owner Users @relation(fields: [OwnerId], references: [Id], onUpdate: NoAction, map: "FK_Projects_Users_OwnerId")
Reviewers Reviewers[]

@@index([GroupId], map: "IX_Projects_GroupId")
@@index([ImportId], map: "IX_Projects_ImportId")
Expand Down
Loading