@campus-labs/prisma-client 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campus-labs/prisma-client",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -15,7 +15,7 @@
15
15
  "seed:dev": "npx prisma db seed",
16
16
  "deploy:dev": "npx prisma migrate deploy",
17
17
  "generate": "npx prisma@6.9.0 generate",
18
- "deploy:staging": "dotenv -e .env.staging -- npx prisma migrate deploy",
18
+ "deploy:staging": "dotenv -e .env.staging -- npx prisma migrate deploy",
19
19
  "reset:staging": "dotenv -e .env.staging -- npx prisma migrate reset",
20
20
  "seed:staging": "dotenv -e .env.staging -- npx prisma db seed",
21
21
  "deploy:prod": "dotenv -e .env.production -- npx prisma migrate deploy",
@@ -36,4 +36,4 @@
36
36
  "prisma": "6.9.0",
37
37
  "@prisma/client": "6.11.1"
38
38
  }
39
- }
39
+ }
@@ -338,7 +338,7 @@ model users {
338
338
  updated_at DateTime @default(now()) @db.Timestamp(6)
339
339
  deleted_at DateTime? @db.Timestamp(6)
340
340
  notification_tokens String[] @db.VarChar(5000)
341
- linkedin_token Json?
341
+ linkedin_token Json?
342
342
  points Int @default(0)
343
343
  ua_iupi String @unique @db.VarChar(50)
344
344
  last_notification_check DateTime @default(now()) @db.Timestamp(6)
@@ -368,7 +368,7 @@ model users {
368
368
  power_up_instances power_up_instances[]
369
369
  expelled_user_initiatives user_initiative[] @relation("UserInitiativeExpeller")
370
370
  projects projects[] @relation("ProjectAuthor")
371
- designed_projects projects[] @relation("ProjectGamificationDesigner")
371
+ designed_projects projects[] @relation("ProjectEditor")
372
372
 
373
373
  @@index([role_platform_id], map: "idx_users_role")
374
374
  @@index([points(sort: Desc)], map: "idx_users_points")
@@ -618,30 +618,6 @@ model power_up_instances {
618
618
  @@index([user_id, activated_at, expires_at], map: "idx_pui_user_active_window")
619
619
  }
620
620
 
621
- model projects {
622
- id Int @id @default(autoincrement())
623
- title String @db.VarChar(100)
624
- is_draft Boolean @default(true)
625
- is_pending Boolean @default(false)
626
- is_published Boolean @default(false)
627
- author_id String @db.VarChar(50)
628
- gamification_designer_id String @db.VarChar(50)
629
- created_at DateTime @default(now()) @db.Timestamp(6)
630
- updated_at DateTime @default(now()) @db.Timestamp(6)
631
- deleted_at DateTime? @db.Timestamp(6)
632
- version Int @default(1)
633
- current_state Json
634
- snapshots snapshots[]
635
- initiatives initiatives[]
636
- patches patches[]
637
-
638
- users users @relation("ProjectAuthor", fields: [author_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
639
- gamification_designer users @relation("ProjectGamificationDesigner", fields: [gamification_designer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
640
-
641
- @@index([author_id], map: "idx_projects_author")
642
- @@index([gamification_designer_id], map: "idx_projects_designer")
643
- }
644
-
645
621
  model snapshots {
646
622
  id Int @id @default(autoincrement())
647
623
  project_id Int
@@ -685,14 +661,37 @@ model initiatives_tags {
685
661
  @@index([tag_id], map: "idx_initiatives_tags_tag")
686
662
  }
687
663
 
664
+ model projects {
665
+ id Int @id @default(autoincrement())
666
+ is_draft Boolean @default(true)
667
+ is_pending Boolean @default(false)
668
+ is_published Boolean @default(false)
669
+ author_id String @db.VarChar(50)
670
+ editor_id String? @db.VarChar(50)
671
+ created_at DateTime @default(now()) @db.Timestamp(6)
672
+ updated_at DateTime @default(now()) @db.Timestamp(6)
673
+ deleted_at DateTime? @db.Timestamp(6)
674
+ version Int @default(1)
675
+ current_state Json
676
+ initiatives initiatives[]
677
+ patches patches[]
678
+
679
+ authors users @relation("ProjectAuthor", fields: [author_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
680
+ editors users? @relation("ProjectEditor", fields: [editor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
681
+ snapshots snapshots[]
682
+
683
+ @@index([author_id], map: "idx_projects_author")
684
+ @@index([editor_id], map: "idx_projects_designer")
685
+ }
686
+
688
687
  model patches {
689
688
  id Int @id @default(autoincrement())
690
689
  project_id Int
691
- operations Int[]
692
- is_ai_generated Boolean
690
+ operations Json[]
691
+ is_ai_generated Boolean @default(false)
693
692
  is_adopted String @default("PENDING") @db.VarChar(20)
694
693
  version Int @default(1)
695
- type String @db.VarChar(20)
694
+ type String @default("NORMAL") @db.VarChar(20)
696
695
  created_at DateTime @default(now()) @db.Timestamp(6)
697
696
  updated_at DateTime @default(now()) @db.Timestamp(6)
698
697
  deleted_at DateTime? @db.Timestamp(6)
@@ -1,11 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(ls -la /Users/nunomatos/Desktop/SerMais/prisma/.env*)",
5
- "Bash(git check-ignore -v /Users/nunomatos/Desktop/SerMais/prisma/.env.staging)",
6
- "Bash(git check-ignore -v .env.staging)",
7
- "Bash(ls -la /Users/nunomatos/Desktop/SerMais/prisma/*.ts /Users/nunomatos/Desktop/SerMais/prisma/*.js)",
8
- "Bash(grep -r \"\\\\.password\" /Users/nunomatos/Desktop/SerMais --include=\"*.ts\" --include=\"*.js\" ! -path \"*/node_modules/*\" ! -path \"*/.next/*\" ! -path \"*/dist/*\")"
9
- ]
10
- }
11
- }