@prisma/orm-target-postgres 8.0.0-rc.11-dev.26 → 8.0.0-rc.11-dev.28

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.
Files changed (40) hide show
  1. package/dist/adapter__control.mjs +28 -1
  2. package/dist/adapter__control.mjs.map +1 -1
  3. package/dist/adapter__runtime.mjs +1 -1
  4. package/dist/{authoring-C3hGtD3B-DPpnMHfT.mjs → authoring-DhCDnK1T-CGirVrrH.mjs} +17 -4
  5. package/dist/authoring-DhCDnK1T-CGirVrrH.mjs.map +1 -0
  6. package/dist/{control-BQHKNZ5z.mjs → control-DDfLaDsG.mjs} +4 -4
  7. package/dist/{control-BQHKNZ5z.mjs.map → control-DDfLaDsG.mjs.map} +1 -1
  8. package/dist/{descriptor-meta-CQBdvIPG-CN3m2xcT.mjs → descriptor-meta-CQMRNeLX-CF4MvmN_.mjs} +3 -3
  9. package/dist/{descriptor-meta-CQBdvIPG-CN3m2xcT.mjs.map → descriptor-meta-CQMRNeLX-CF4MvmN_.mjs.map} +1 -1
  10. package/dist/migration-PTHAY9Cv.mjs.map +1 -1
  11. package/dist/{pack-CRA_2QjF.d.mts → pack-5TvJBjeX.d.mts} +47 -10
  12. package/dist/pack-5TvJBjeX.d.mts.map +1 -0
  13. package/dist/{planner-CeYeEGDy-UmNDGNc2.mjs → planner-C_TrM6kn-Dj1rgql2.mjs} +3 -3
  14. package/dist/{planner-CeYeEGDy-UmNDGNc2.mjs.map → planner-C_TrM6kn-Dj1rgql2.mjs.map} +1 -1
  15. package/dist/{planner-produced-postgres-migration-CjuBrC8Z-Cv4wCASG.mjs → planner-produced-postgres-migration-CNmh50cN-qepqYtvL.mjs} +3 -3
  16. package/dist/{planner-produced-postgres-migration-CjuBrC8Z-Cv4wCASG.mjs.map → planner-produced-postgres-migration-CNmh50cN-qepqYtvL.mjs.map} +1 -1
  17. package/dist/{postgres-contract-view-CmLEo6wf-DYBBFFMK.mjs → postgres-contract-view-BPe8r8jN-DrorQoWW.mjs} +3 -3
  18. package/dist/{postgres-contract-view-CmLEo6wf-DYBBFFMK.mjs.map → postgres-contract-view-BPe8r8jN-DrorQoWW.mjs.map} +1 -1
  19. package/dist/{postgres-migration-Bw29VY-O-Bglowo1Y.mjs → postgres-migration-CydbiBd3-BRXOU7KP.mjs} +3 -3
  20. package/dist/{postgres-migration-Bw29VY-O-Bglowo1Y.mjs.map → postgres-migration-CydbiBd3-BRXOU7KP.mjs.map} +1 -1
  21. package/dist/{prisma7-binding-C38o_ABR.d.mts → prisma7-binding-BlGmTeNp.d.mts} +47 -10
  22. package/dist/prisma7-binding-BlGmTeNp.d.mts.map +1 -0
  23. package/dist/{prisma7-binding-BoFnbd5w.mjs → prisma7-binding-Db1xpliZ.mjs} +3 -3
  24. package/dist/{prisma7-binding-BoFnbd5w.mjs.map → prisma7-binding-Db1xpliZ.mjs.map} +1 -1
  25. package/dist/target.d.mts +2 -2
  26. package/dist/target.mjs +7 -7
  27. package/dist/target__control.mjs +2 -2
  28. package/dist/target__migration.mjs +1 -1
  29. package/dist/target__pack.d.mts +1 -1
  30. package/dist/target__pack.mjs +1 -1
  31. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  32. package/dist/target__planner.mjs +1 -1
  33. package/dist/target__prisma7-binding.d.mts +1 -1
  34. package/dist/target__prisma7-binding.mjs +1 -1
  35. package/dist/target__runtime.mjs +2 -2
  36. package/dist/target__runtime.mjs.map +1 -1
  37. package/package.json +9 -9
  38. package/dist/authoring-C3hGtD3B-DPpnMHfT.mjs.map +0 -1
  39. package/dist/pack-CRA_2QjF.d.mts.map +0 -1
  40. package/dist/prisma7-binding-C38o_ABR.d.mts.map +0 -1
@@ -46,6 +46,7 @@ declare const prisma7PostgresBinding: {
46
46
  readonly type: {
47
47
  readonly BigIntNumber: {
48
48
  readonly kind: "typeConstructor";
49
+ readonly documentation: "A PostgreSQL 64-bit integer represented as a JavaScript number within its safe integer range.";
49
50
  readonly output: {
50
51
  readonly codecId: "pg/int8number@1";
51
52
  readonly nativeType: "int8";
@@ -53,6 +54,7 @@ declare const prisma7PostgresBinding: {
53
54
  };
54
55
  readonly UnboundedInt: {
55
56
  readonly kind: "typeConstructor";
57
+ readonly documentation: "An arbitrary-precision integer stored as PostgreSQL numeric and represented as bigint.";
56
58
  readonly output: {
57
59
  readonly codecId: "pg/unboundedint@1";
58
60
  readonly nativeType: "numeric";
@@ -349,9 +351,11 @@ declare const prisma7PostgresBinding: {
349
351
  readonly output: {
350
352
  readonly codecId: "pg/timestamptz-string@1";
351
353
  readonly nativeType: "timestamptz";
352
- readonly default: {
353
- readonly kind: "function";
354
- readonly expression: "now()";
354
+ readonly executionDefaults: {
355
+ readonly onCreate: {
356
+ readonly kind: "generator";
357
+ readonly id: "timestampNow";
358
+ };
355
359
  };
356
360
  };
357
361
  };
@@ -377,9 +381,11 @@ declare const prisma7PostgresBinding: {
377
381
  readonly output: {
378
382
  readonly codecId: "pg/timestamptz-temporal@1";
379
383
  readonly nativeType: "timestamptz";
380
- readonly default: {
381
- readonly kind: "function";
382
- readonly expression: "now()";
384
+ readonly executionDefaults: {
385
+ readonly onCreate: {
386
+ readonly kind: "generator";
387
+ readonly id: "instantNow" | "timestampNow";
388
+ };
383
389
  };
384
390
  };
385
391
  };
@@ -405,9 +411,11 @@ declare const prisma7PostgresBinding: {
405
411
  readonly output: {
406
412
  readonly codecId: "pg/timestamptz-date@1";
407
413
  readonly nativeType: "timestamptz";
408
- readonly default: {
409
- readonly kind: "function";
410
- readonly expression: "now()";
414
+ readonly executionDefaults: {
415
+ readonly onCreate: {
416
+ readonly kind: "generator";
417
+ readonly id: "timestampNow";
418
+ };
411
419
  };
412
420
  };
413
421
  };
@@ -586,6 +594,7 @@ declare const prisma7PostgresBinding: {
586
594
  readonly policy_select: {
587
595
  readonly kind: "pslBlock";
588
596
  readonly keyword: "policy_select";
597
+ readonly documentation: "Defines a row-level security policy controlling which rows can be selected.";
589
598
  readonly discriminator: "policy";
590
599
  readonly name: {
591
600
  readonly required: true;
@@ -593,12 +602,14 @@ declare const prisma7PostgresBinding: {
593
602
  readonly parameters: {
594
603
  readonly target: {
595
604
  readonly kind: "ref";
605
+ readonly documentation: "The model protected by this policy; it must declare @@rls.";
596
606
  readonly refKind: "model";
597
607
  readonly scope: "same-namespace";
598
608
  readonly required: true;
599
609
  };
600
610
  readonly roles: {
601
611
  readonly kind: "list";
612
+ readonly documentation: "The database roles to which this policy applies.";
602
613
  readonly of: {
603
614
  readonly kind: "ref";
604
615
  readonly refKind: "role";
@@ -609,10 +620,12 @@ declare const prisma7PostgresBinding: {
609
620
  readonly kind: "value";
610
621
  readonly codecId: "pg/text@1";
611
622
  readonly required: true;
623
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
612
624
  };
613
625
  readonly permissive: {
614
626
  readonly kind: "value";
615
627
  readonly codecId: "pg/bool@1";
628
+ readonly documentation: "Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).";
616
629
  };
617
630
  };
618
631
  readonly requiresModelAttribute: {
@@ -628,6 +641,7 @@ declare const prisma7PostgresBinding: {
628
641
  readonly policy_delete: {
629
642
  readonly kind: "pslBlock";
630
643
  readonly keyword: "policy_delete";
644
+ readonly documentation: "Defines a row-level security policy controlling which rows can be deleted.";
631
645
  readonly discriminator: "policy";
632
646
  readonly name: {
633
647
  readonly required: true;
@@ -635,12 +649,14 @@ declare const prisma7PostgresBinding: {
635
649
  readonly parameters: {
636
650
  readonly target: {
637
651
  readonly kind: "ref";
652
+ readonly documentation: "The model protected by this policy; it must declare @@rls.";
638
653
  readonly refKind: "model";
639
654
  readonly scope: "same-namespace";
640
655
  readonly required: true;
641
656
  };
642
657
  readonly roles: {
643
658
  readonly kind: "list";
659
+ readonly documentation: "The database roles to which this policy applies.";
644
660
  readonly of: {
645
661
  readonly kind: "ref";
646
662
  readonly refKind: "role";
@@ -651,10 +667,12 @@ declare const prisma7PostgresBinding: {
651
667
  readonly kind: "value";
652
668
  readonly codecId: "pg/text@1";
653
669
  readonly required: true;
670
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
654
671
  };
655
672
  readonly permissive: {
656
673
  readonly kind: "value";
657
674
  readonly codecId: "pg/bool@1";
675
+ readonly documentation: "Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).";
658
676
  };
659
677
  };
660
678
  readonly requiresModelAttribute: {
@@ -670,6 +688,7 @@ declare const prisma7PostgresBinding: {
670
688
  readonly policy_insert: {
671
689
  readonly kind: "pslBlock";
672
690
  readonly keyword: "policy_insert";
691
+ readonly documentation: "Defines a row-level security policy checking rows being inserted.";
673
692
  readonly discriminator: "policy";
674
693
  readonly name: {
675
694
  readonly required: true;
@@ -677,12 +696,14 @@ declare const prisma7PostgresBinding: {
677
696
  readonly parameters: {
678
697
  readonly target: {
679
698
  readonly kind: "ref";
699
+ readonly documentation: "The model protected by this policy; it must declare @@rls.";
680
700
  readonly refKind: "model";
681
701
  readonly scope: "same-namespace";
682
702
  readonly required: true;
683
703
  };
684
704
  readonly roles: {
685
705
  readonly kind: "list";
706
+ readonly documentation: "The database roles to which this policy applies.";
686
707
  readonly of: {
687
708
  readonly kind: "ref";
688
709
  readonly refKind: "role";
@@ -693,10 +714,12 @@ declare const prisma7PostgresBinding: {
693
714
  readonly kind: "value";
694
715
  readonly codecId: "pg/text@1";
695
716
  readonly required: true;
717
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
696
718
  };
697
719
  readonly permissive: {
698
720
  readonly kind: "value";
699
721
  readonly codecId: "pg/bool@1";
722
+ readonly documentation: "Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).";
700
723
  };
701
724
  };
702
725
  readonly requiresModelAttribute: {
@@ -712,6 +735,7 @@ declare const prisma7PostgresBinding: {
712
735
  readonly policy_update: {
713
736
  readonly kind: "pslBlock";
714
737
  readonly keyword: "policy_update";
738
+ readonly documentation: "Defines a row-level security policy controlling row visibility and checks for updates.";
715
739
  readonly discriminator: "policy";
716
740
  readonly name: {
717
741
  readonly required: true;
@@ -719,12 +743,14 @@ declare const prisma7PostgresBinding: {
719
743
  readonly parameters: {
720
744
  readonly target: {
721
745
  readonly kind: "ref";
746
+ readonly documentation: "The model protected by this policy; it must declare @@rls.";
722
747
  readonly refKind: "model";
723
748
  readonly scope: "same-namespace";
724
749
  readonly required: true;
725
750
  };
726
751
  readonly roles: {
727
752
  readonly kind: "list";
753
+ readonly documentation: "The database roles to which this policy applies.";
728
754
  readonly of: {
729
755
  readonly kind: "ref";
730
756
  readonly refKind: "role";
@@ -735,15 +761,18 @@ declare const prisma7PostgresBinding: {
735
761
  readonly kind: "value";
736
762
  readonly codecId: "pg/text@1";
737
763
  readonly required: true;
764
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
738
765
  };
739
766
  readonly withCheck: {
740
767
  readonly kind: "value";
741
768
  readonly codecId: "pg/text@1";
742
769
  readonly required: true;
770
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
743
771
  };
744
772
  readonly permissive: {
745
773
  readonly kind: "value";
746
774
  readonly codecId: "pg/bool@1";
775
+ readonly documentation: "Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).";
747
776
  };
748
777
  };
749
778
  readonly requiresModelAttribute: {
@@ -759,6 +788,7 @@ declare const prisma7PostgresBinding: {
759
788
  readonly policy_all: {
760
789
  readonly kind: "pslBlock";
761
790
  readonly keyword: "policy_all";
791
+ readonly documentation: "Defines a row-level security policy applying to all operations.";
762
792
  readonly discriminator: "policy";
763
793
  readonly name: {
764
794
  readonly required: true;
@@ -766,12 +796,14 @@ declare const prisma7PostgresBinding: {
766
796
  readonly parameters: {
767
797
  readonly target: {
768
798
  readonly kind: "ref";
799
+ readonly documentation: "The model protected by this policy; it must declare @@rls.";
769
800
  readonly refKind: "model";
770
801
  readonly scope: "same-namespace";
771
802
  readonly required: true;
772
803
  };
773
804
  readonly roles: {
774
805
  readonly kind: "list";
806
+ readonly documentation: "The database roles to which this policy applies.";
775
807
  readonly of: {
776
808
  readonly kind: "ref";
777
809
  readonly refKind: "role";
@@ -782,15 +814,18 @@ declare const prisma7PostgresBinding: {
782
814
  readonly kind: "value";
783
815
  readonly codecId: "pg/text@1";
784
816
  readonly required: true;
817
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
785
818
  };
786
819
  readonly withCheck: {
787
820
  readonly kind: "value";
788
821
  readonly codecId: "pg/text@1";
789
822
  readonly required: true;
823
+ readonly documentation: "A SQL predicate controlling which rows this policy permits.";
790
824
  };
791
825
  readonly permissive: {
792
826
  readonly kind: "value";
793
827
  readonly codecId: "pg/bool@1";
828
+ readonly documentation: "Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).";
794
829
  };
795
830
  };
796
831
  readonly requiresModelAttribute: {
@@ -806,6 +841,7 @@ declare const prisma7PostgresBinding: {
806
841
  readonly native_enum: {
807
842
  readonly kind: "pslBlock";
808
843
  readonly keyword: "native_enum";
844
+ readonly documentation: "Defines a PostgreSQL enum type with named string-valued members.";
809
845
  readonly discriminator: "native_enum";
810
846
  readonly name: {
811
847
  readonly required: true;
@@ -821,6 +857,7 @@ declare const prisma7PostgresBinding: {
821
857
  readonly role: {
822
858
  readonly kind: "pslBlock";
823
859
  readonly keyword: "role";
860
+ readonly documentation: "Declares an existing database role in namespace unbound for use in security policies.";
824
861
  readonly discriminator: "role";
825
862
  readonly name: {
826
863
  readonly required: true;
@@ -1009,4 +1046,4 @@ declare const prisma7PostgresBinding: {
1009
1046
  };
1010
1047
  //#endregion
1011
1048
  export { prisma7PostgresBinding as t };
1012
- //# sourceMappingURL=prisma7-binding-C38o_ABR.d.mts.map
1049
+ //# sourceMappingURL=prisma7-binding-BlGmTeNp.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisma7-binding-BlGmTeNp.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.d.mts"],"mappings":";;;;;;;;iBAOiB,0BAA0B;;;;;;;;iBAQ1B,2BAA2B,gBAAgB;;;;;;;;;;;cAW9C;WACH;aACE;aACA;aACA,yDAAyD,iBAAiB,uBAAuB;eAC/F;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;;aAEF;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;;qBAEF;uBACE;;;;;eAKR;iBACE;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;;iBAQd;mBACE;mBACA;qBACE;qBACA;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;;;mBAGJ;qBACE;qBACA;uBACE;uBACA;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;;;;;eAKR;iBACE;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,oBAAoB,wDAAwD,2BAA2B;;;iBAG5H;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,+BAA+B;;;iBAGpD;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,yBAAyB,wDAAwD,2BAA2B;;;iBAGjI;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;YACP,UAAU,sCAAsC,mBAAmB,wDAAwD,2BAA2B;YACtJ,iBAAiB,QAAQ;cACvB;cACA;;;;;eAKC;iBACE;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;yBACA;yBACA;;;qBAGJ;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;;;mBAGJ;qBACE;qBACA;;mBAEF;YACP,0CAA0C;cACxC;8CACgC;;;iBAG7B;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;yBACA;yBACA;;;qBAGJ;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;;;mBAGJ;qBACE;qBACA;;mBAEF;YACP,0CAA0C;cACxC;8CACgC;;;iBAG7B;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;yBACA;yBACA;;;qBAGJ;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;;;mBAGJ;qBACE;qBACA;;mBAEF;YACP,0CAA0C;cACxC;8CACgC;;;iBAG7B;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;yBACA;yBACA;;;qBAGJ;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;;;mBAGJ;qBACE;qBACA;;mBAEF;YACP,0CAA0C;cACxC;8CACgC;;;iBAG7B;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;yBACE;yBACA;yBACA;;;qBAGJ;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;uBACA;;;mBAGJ;qBACE;qBACA;;mBAEF;YACP,0CAA0C;cACxC;8CACgC;;;iBAG7B;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;mBACA;mBACA;qBACE,0CAA0C;cACjD;8CACgC;;;iBAG7B;mBACE;mBACA;mBACA;mBACA;mBACA;qBACE;;mBAEF;;;eAGJ;iBACE;mBACE;mBACA;mBACA,qCAAqC;mBACrC,QAAQ,SAAS,sBAAsB,wDAAwD;YACtG;YACA,QAAQ;;;;eAIL,wBAAwB;eACxB,0BAA0B;eAC1B,+BAA+B;eAC/B,2BAA2B;;aAE7B;aACA;aACA;aACA;aACA;aACA;aACA,eAAe;;aAEf,eAAe;;WAEjB,wBAAwB;WACxB;WACA;aACE;eACE;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;;aAGJ;eACE;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;iBACE;iBACA;;;;WAIN;aACE;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;;;WAGF;WACA,mCAAmC;WACnC,6BAA6B;WAC7B,uBAAuB,YAAY;aACjC;aACA,aAAa,SAAS;;aAEtB;aACA;aACA;;aAEA;aACA,UAAU;aACV,OAAO"}
@@ -1,7 +1,7 @@
1
1
  import { h as postgresCreateNamespace } from "./postgres-schema-PFL-fpel-s3InB8T0.mjs";
2
2
  import { t as parsePostgresDefault } from "./default-normalizer-Bjtm2F4f-uV5vvkVt.mjs";
3
- import { p as postgresNowGeneratorIdFor } from "./authoring-C3hGtD3B-DPpnMHfT.mjs";
4
- import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CQBdvIPG-CN3m2xcT.mjs";
3
+ import { p as postgresNowGeneratorIdFor } from "./authoring-DhCDnK1T-CGirVrrH.mjs";
4
+ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CQMRNeLX-CF4MvmN_.mjs";
5
5
  import { n as createPostgresDefaultMapping, r as createPostgresTypeMap, t as buildPslDocumentAst } from "./infer-psl-contract-BaZaJAD9-DTVu5Zab.mjs";
6
6
  import { SqlSchemaIR, SqlTableIR } from "@prisma/orm-family-sql/schema-ir/types";
7
7
  import { toModelName } from "@prisma/orm-family-sql/family/psl-infer";
@@ -328,4 +328,4 @@ const prisma7PostgresBinding = {
328
328
  //#endregion
329
329
  export { prisma7PostgresBinding as t };
330
330
 
331
- //# sourceMappingURL=prisma7-binding-BoFnbd5w.mjs.map
331
+ //# sourceMappingURL=prisma7-binding-Db1xpliZ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"prisma7-binding-BoFnbd5w.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.mjs"],"sourcesContent":["import { t as parsePostgresDefault } from \"./default-normalizer-Bjtm2F4f.mjs\";\nimport { s as postgresNowGeneratorIdFor } from \"./authoring-C3hGtD3B.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-PFL-fpel.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-CQBdvIPG.mjs\";\nimport { i as createPostgresDefaultMapping, r as createPostgresTypeMap, t as buildPslDocumentAst } from \"./infer-psl-contract-BaZaJAD9.mjs\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4})-(\\d{2})-(\\d{2})[Tt ](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(?:[Zz]|([+-])(\\d{2}):(\\d{2}))$/;\nconst MICROS_PER_SECOND = 1e6;\nfunction pad(value, width = 2) {\n\treturn String(value).padStart(width, \"0\");\n}\n/**\n* The microseconds Postgres keeps for a fraction-of-a-second digit string. Every digit counts:\n* `.1234565` is an exact tie, and C's `rint` takes the even neighbour 123456, while `.1234565001`\n* is above the tie and rounds up to 123457.\n*/\nfunction fractionMicros(fraction) {\n\tconst micros = Number(`${fraction}000000`.slice(0, 6));\n\tconst beyondTie = fraction.slice(6).replace(/0+$/, \"\");\n\tif (beyondTie === \"\") return micros;\n\tif (beyondTie === \"5\") return micros % 2 === 0 ? micros : micros + 1;\n\treturn beyondTie > \"5\" ? micros + 1 : micros;\n}\nfunction fractionText(micros) {\n\treturn micros === 0 ? \"\" : `.${pad(micros, 6).replace(/0+$/, \"\")}`;\n}\nfunction offsetText(minutes) {\n\tconst magnitude = Math.abs(minutes);\n\tconst rest = magnitude % 60;\n\treturn `${minutes < 0 ? \"-\" : \"+\"}${pad(Math.floor(magnitude / 60))}${rest === 0 ? \"\" : `:${pad(rest)}`}`;\n}\n/**\n* The text of the column default Postgres stores for a Prisma 7 `DateTime`\n* default, which Prisma 7 writes as `'2024-01-02 03:04:05.123 +02:00'`:\n* `date` keeps the written date, `time` and `timestamp` the written wall-clock\n* time without the offset, and `timetz` the time with the written offset.\n* `timestamptz` is carried in its UTC form, the text a session in UTC prints\n* (`2024-01-02 01:04:05+00`, and `0001-12-31 23:30:00+00 BC` before year 1);\n* a session in another time zone prints the same instant differently.\n* Fractional seconds are rounded to microseconds; the column's own precision\n* does not change a stored default.\n*/\nfunction storedTemporalText(text, nativeType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, year = \"\", month = \"\", day = \"\", hour, minute, second, fraction = \"\", sign, offsetHours, offsetMinutes] = match;\n\tif (nativeType === \"date\") return `${year}-${month}-${day}`;\n\tconst micros = fractionMicros(fraction);\n\tconst clockSeconds = Number(hour) * 3600 + Number(minute) * 60 + Number(second) + Math.floor(micros / MICROS_PER_SECOND);\n\tconst fractional = fractionText(micros % MICROS_PER_SECOND);\n\tconst offsetMinutesTotal = sign === void 0 ? 0 : (sign === \"-\" ? -1 : 1) * (Number(offsetHours) * 60 + Number(offsetMinutes));\n\tif (nativeType === \"time\" || nativeType === \"timetz\") {\n\t\tconst clock = `${pad(Math.floor(clockSeconds / 3600))}:${pad(Math.floor(clockSeconds / 60) % 60)}:${pad(clockSeconds % 60)}${fractional}`;\n\t\treturn nativeType === \"time\" ? clock : `${clock}${offsetText(offsetMinutesTotal)}`;\n\t}\n\tconst midnight = /* @__PURE__ */ new Date(0);\n\tmidnight.setUTCFullYear(Number(year), Number(month) - 1, Number(day));\n\tconst utcShift = nativeType === \"timestamptz\" ? offsetMinutesTotal * 60 : 0;\n\tconst stamp = new Date(midnight.getTime() + (clockSeconds - utcShift) * 1e3);\n\tconst astronomicalYear = stamp.getUTCFullYear();\n\tconst wallClock = `${pad(astronomicalYear > 0 ? astronomicalYear : 1 - astronomicalYear, 4)}-${pad(stamp.getUTCMonth() + 1)}-${pad(stamp.getUTCDate())} ${pad(stamp.getUTCHours())}:${pad(stamp.getUTCMinutes())}:${pad(stamp.getUTCSeconds())}${fractional}`;\n\tconst era = astronomicalYear > 0 ? \"\" : \" BC\";\n\treturn nativeType === \"timestamptz\" ? `${wallClock}+00${era}` : `${wallClock}${era}`;\n}\n//#endregion\n//#region src/core/prisma7-type-map.ts\n/**\n* What Prisma 7.10.0 creates in Postgres for each Prisma 7 scalar and `@db.*`\n* native type, expressed as the Prisma 8 authoring type constructor that\n* produces the same column. Derived from the SQL recorded in\n* `test/integration/test/fixtures/prisma7-source/reference/migration.sql`.\n* `args` are the constructor's positional arguments. A `@db.*` attribute's own\n* arguments replace them; without any, the column gets `args`, so `@db.Char`\n* is `Char(1)`, the `character(1)` Postgres stores for Prisma 7's `CHAR`.\n*/\nconst prisma7PostgresTypeMap = {\n\tscalars: {\n\t\tString: {\n\t\t\tconstructorName: \"String\",\n\t\t\targs: []\n\t\t},\n\t\tBoolean: {\n\t\t\tconstructorName: \"Boolean\",\n\t\t\targs: []\n\t\t},\n\t\tInt: {\n\t\t\tconstructorName: \"Int\",\n\t\t\targs: []\n\t\t},\n\t\tBigInt: {\n\t\t\tconstructorName: \"BigInt\",\n\t\t\targs: []\n\t\t},\n\t\tFloat: {\n\t\t\tconstructorName: \"Float\",\n\t\t\targs: []\n\t\t},\n\t\tDecimal: {\n\t\t\tconstructorName: \"Numeric\",\n\t\t\targs: [\"65\", \"30\"]\n\t\t},\n\t\tDateTime: {\n\t\t\tconstructorName: \"Timestamp\",\n\t\t\targs: [\"3\"]\n\t\t},\n\t\tJson: {\n\t\t\tconstructorName: \"Jsonb\",\n\t\t\targs: []\n\t\t},\n\t\tBytes: {\n\t\t\tconstructorName: \"Bytes\",\n\t\t\targs: []\n\t\t}\n\t},\n\tnativeTypes: {\n\t\tText: {\n\t\t\tconstructorName: \"String\",\n\t\t\targs: []\n\t\t},\n\t\tVarChar: {\n\t\t\tconstructorName: \"VarChar\",\n\t\t\targs: []\n\t\t},\n\t\tChar: {\n\t\t\tconstructorName: \"Char\",\n\t\t\targs: [\"1\"]\n\t\t},\n\t\tUuid: {\n\t\t\tconstructorName: \"Uuid\",\n\t\t\targs: []\n\t\t},\n\t\tInet: {\n\t\t\tconstructorName: \"Inet\",\n\t\t\targs: []\n\t\t},\n\t\tBoolean: {\n\t\t\tconstructorName: \"Boolean\",\n\t\t\targs: []\n\t\t},\n\t\tInteger: {\n\t\t\tconstructorName: \"Int\",\n\t\t\targs: []\n\t\t},\n\t\tSmallInt: {\n\t\t\tconstructorName: \"SmallInt\",\n\t\t\targs: []\n\t\t},\n\t\tBigInt: {\n\t\t\tconstructorName: \"BigInt\",\n\t\t\targs: []\n\t\t},\n\t\tReal: {\n\t\t\tconstructorName: \"Real\",\n\t\t\targs: []\n\t\t},\n\t\tDoublePrecision: {\n\t\t\tconstructorName: \"Float\",\n\t\t\targs: []\n\t\t},\n\t\tDecimal: {\n\t\t\tconstructorName: \"Numeric\",\n\t\t\targs: []\n\t\t},\n\t\tTimestamp: {\n\t\t\tconstructorName: \"Timestamp\",\n\t\t\targs: []\n\t\t},\n\t\tTimestamptz: {\n\t\t\tconstructorName: \"Timestamptz\",\n\t\t\targs: []\n\t\t},\n\t\tDate: {\n\t\t\tconstructorName: \"Date\",\n\t\t\targs: []\n\t\t},\n\t\tTime: {\n\t\t\tconstructorName: \"Time\",\n\t\t\targs: []\n\t\t},\n\t\tTimetz: {\n\t\t\tconstructorName: \"Timetz\",\n\t\t\targs: []\n\t\t},\n\t\tJson: {\n\t\t\tconstructorName: \"Json\",\n\t\t\targs: []\n\t\t},\n\t\tJsonB: {\n\t\t\tconstructorName: \"Jsonb\",\n\t\t\targs: []\n\t\t},\n\t\tByteA: {\n\t\t\tconstructorName: \"Bytes\",\n\t\t\targs: []\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\tnativeType: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\tnativeType: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\ttypeMap: createPostgresTypeMap(),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tparseRawDefault: parsePostgresDefault\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\nconst TEMPORAL_NATIVE_TYPES = /* @__PURE__ */ new Set([\n\t\"timestamp\",\n\t\"timestamptz\",\n\t\"date\",\n\t\"time\",\n\t\"timetz\"\n]);\nfunction isTemporalNativeType(nativeType) {\n\treturn TEMPORAL_NATIVE_TYPES.has(nativeType);\n}\nfunction sqlStringLiteral(value) {\n\treturn value === void 0 ? void 0 : `'${value.replace(/'/g, \"''\")}'`;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\nfunction arrayLiteral(literals, typeName) {\n\treturn `ARRAY[${literals.join(\", \")}]::${typeName}[]`;\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is carried as the SQL literal of the default Postgres\n* stores (`'\\x68656c6c6f'`, `'2024-01-02 03:04:05'`), and a list default as an\n* `ARRAY[...]` of those literals cast to the column type, rather than through\n* the column codec, whose JSON form (base64, a Temporal value) is not what\n* introspection reads back; verify parses both sides with the same parser.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tjunctionRelationFieldNames,\n\tupdatedAtGeneratorId: postgresNowGeneratorIdFor,\n\tliteralDefaultForm: ({ nativeType, typeParams }) => {\n\t\tif (nativeType === \"json\" || nativeType === \"jsonb\") return { kind: \"json\" };\n\t\tif (nativeType === \"bytea\") return {\n\t\t\tkind: \"sqlExpression\",\n\t\t\tliteral: (text) => sqlStringLiteral(base64ToHex(text)),\n\t\t\tlist: (literals) => arrayLiteral(literals, \"BYTEA\")\n\t\t};\n\t\tif (!isTemporalNativeType(nativeType)) return void 0;\n\t\tconst precision = typeParams?.[\"precision\"];\n\t\tconst typeName = `${nativeType.toUpperCase()}${typeof precision === \"number\" ? `(${precision})` : \"\"}`;\n\t\treturn {\n\t\t\tkind: \"sqlExpression\",\n\t\t\tliteral: (text) => sqlStringLiteral(storedTemporalText(text, nativeType)),\n\t\t\tlist: (literals) => arrayLiteral(literals, typeName)\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,WAAW;AACjB,MAAM,oBAAoB;AAC1B,SAAS,IAAI,OAAO,QAAQ,GAAG;CAC9B,OAAO,OAAO,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG;AACzC;;;;;;AAMA,SAAS,eAAe,UAAU;CACjC,MAAM,SAAS,OAAO,GAAG,SAAS,QAAQ,MAAM,GAAG,CAAC,CAAC;CACrD,MAAM,YAAY,SAAS,MAAM,CAAC,CAAC,CAAC,QAAQ,OAAO,EAAE;CACrD,IAAI,cAAc,IAAI,OAAO;CAC7B,IAAI,cAAc,KAAK,OAAO,SAAS,MAAM,IAAI,SAAS,SAAS;CACnE,OAAO,Y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["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.mjs"],"sourcesContent":["import { t as parsePostgresDefault } from \"./default-normalizer-Bjtm2F4f.mjs\";\nimport { s as postgresNowGeneratorIdFor } from \"./authoring-DhCDnK1T.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-PFL-fpel.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-CQMRNeLX.mjs\";\nimport { i as createPostgresDefaultMapping, r as createPostgresTypeMap, t as buildPslDocumentAst } from \"./infer-psl-contract-BaZaJAD9.mjs\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4})-(\\d{2})-(\\d{2})[Tt ](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(?:[Zz]|([+-])(\\d{2}):(\\d{2}))$/;\nconst MICROS_PER_SECOND = 1e6;\nfunction pad(value, width = 2) {\n\treturn String(value).padStart(width, \"0\");\n}\n/**\n* The microseconds Postgres keeps for a fraction-of-a-second digit string. Every digit counts:\n* `.1234565` is an exact tie, and C's `rint` takes the even neighbour 123456, while `.1234565001`\n* is above the tie and rounds up to 123457.\n*/\nfunction fractionMicros(fraction) {\n\tconst micros = Number(`${fraction}000000`.slice(0, 6));\n\tconst beyondTie = fraction.slice(6).replace(/0+$/, \"\");\n\tif (beyondTie === \"\") return micros;\n\tif (beyondTie === \"5\") return micros % 2 === 0 ? micros : micros + 1;\n\treturn beyondTie > \"5\" ? micros + 1 : micros;\n}\nfunction fractionText(micros) {\n\treturn micros === 0 ? \"\" : `.${pad(micros, 6).replace(/0+$/, \"\")}`;\n}\nfunction offsetText(minutes) {\n\tconst magnitude = Math.abs(minutes);\n\tconst rest = magnitude % 60;\n\treturn `${minutes < 0 ? \"-\" : \"+\"}${pad(Math.floor(magnitude / 60))}${rest === 0 ? \"\" : `:${pad(rest)}`}`;\n}\n/**\n* The text of the column default Postgres stores for a Prisma 7 `DateTime`\n* default, which Prisma 7 writes as `'2024-01-02 03:04:05.123 +02:00'`:\n* `date` keeps the written date, `time` and `timestamp` the written wall-clock\n* time without the offset, and `timetz` the time with the written offset.\n* `timestamptz` is carried in its UTC form, the text a session in UTC prints\n* (`2024-01-02 01:04:05+00`, and `0001-12-31 23:30:00+00 BC` before year 1);\n* a session in another time zone prints the same instant differently.\n* Fractional seconds are rounded to microseconds; the column's own precision\n* does not change a stored default.\n*/\nfunction storedTemporalText(text, nativeType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, year = \"\", month = \"\", day = \"\", hour, minute, second, fraction = \"\", sign, offsetHours, offsetMinutes] = match;\n\tif (nativeType === \"date\") return `${year}-${month}-${day}`;\n\tconst micros = fractionMicros(fraction);\n\tconst clockSeconds = Number(hour) * 3600 + Number(minute) * 60 + Number(second) + Math.floor(micros / MICROS_PER_SECOND);\n\tconst fractional = fractionText(micros % MICROS_PER_SECOND);\n\tconst offsetMinutesTotal = sign === void 0 ? 0 : (sign === \"-\" ? -1 : 1) * (Number(offsetHours) * 60 + Number(offsetMinutes));\n\tif (nativeType === \"time\" || nativeType === \"timetz\") {\n\t\tconst clock = `${pad(Math.floor(clockSeconds / 3600))}:${pad(Math.floor(clockSeconds / 60) % 60)}:${pad(clockSeconds % 60)}${fractional}`;\n\t\treturn nativeType === \"time\" ? clock : `${clock}${offsetText(offsetMinutesTotal)}`;\n\t}\n\tconst midnight = /* @__PURE__ */ new Date(0);\n\tmidnight.setUTCFullYear(Number(year), Number(month) - 1, Number(day));\n\tconst utcShift = nativeType === \"timestamptz\" ? offsetMinutesTotal * 60 : 0;\n\tconst stamp = new Date(midnight.getTime() + (clockSeconds - utcShift) * 1e3);\n\tconst astronomicalYear = stamp.getUTCFullYear();\n\tconst wallClock = `${pad(astronomicalYear > 0 ? astronomicalYear : 1 - astronomicalYear, 4)}-${pad(stamp.getUTCMonth() + 1)}-${pad(stamp.getUTCDate())} ${pad(stamp.getUTCHours())}:${pad(stamp.getUTCMinutes())}:${pad(stamp.getUTCSeconds())}${fractional}`;\n\tconst era = astronomicalYear > 0 ? \"\" : \" BC\";\n\treturn nativeType === \"timestamptz\" ? `${wallClock}+00${era}` : `${wallClock}${era}`;\n}\n//#endregion\n//#region src/core/prisma7-type-map.ts\n/**\n* What Prisma 7.10.0 creates in Postgres for each Prisma 7 scalar and `@db.*`\n* native type, expressed as the Prisma 8 authoring type constructor that\n* produces the same column. Derived from the SQL recorded in\n* `test/integration/test/fixtures/prisma7-source/reference/migration.sql`.\n* `args` are the constructor's positional arguments. A `@db.*` attribute's own\n* arguments replace them; without any, the column gets `args`, so `@db.Char`\n* is `Char(1)`, the `character(1)` Postgres stores for Prisma 7's `CHAR`.\n*/\nconst prisma7PostgresTypeMap = {\n\tscalars: {\n\t\tString: {\n\t\t\tconstructorName: \"String\",\n\t\t\targs: []\n\t\t},\n\t\tBoolean: {\n\t\t\tconstructorName: \"Boolean\",\n\t\t\targs: []\n\t\t},\n\t\tInt: {\n\t\t\tconstructorName: \"Int\",\n\t\t\targs: []\n\t\t},\n\t\tBigInt: {\n\t\t\tconstructorName: \"BigInt\",\n\t\t\targs: []\n\t\t},\n\t\tFloat: {\n\t\t\tconstructorName: \"Float\",\n\t\t\targs: []\n\t\t},\n\t\tDecimal: {\n\t\t\tconstructorName: \"Numeric\",\n\t\t\targs: [\"65\", \"30\"]\n\t\t},\n\t\tDateTime: {\n\t\t\tconstructorName: \"Timestamp\",\n\t\t\targs: [\"3\"]\n\t\t},\n\t\tJson: {\n\t\t\tconstructorName: \"Jsonb\",\n\t\t\targs: []\n\t\t},\n\t\tBytes: {\n\t\t\tconstructorName: \"Bytes\",\n\t\t\targs: []\n\t\t}\n\t},\n\tnativeTypes: {\n\t\tText: {\n\t\t\tconstructorName: \"String\",\n\t\t\targs: []\n\t\t},\n\t\tVarChar: {\n\t\t\tconstructorName: \"VarChar\",\n\t\t\targs: []\n\t\t},\n\t\tChar: {\n\t\t\tconstructorName: \"Char\",\n\t\t\targs: [\"1\"]\n\t\t},\n\t\tUuid: {\n\t\t\tconstructorName: \"Uuid\",\n\t\t\targs: []\n\t\t},\n\t\tInet: {\n\t\t\tconstructorName: \"Inet\",\n\t\t\targs: []\n\t\t},\n\t\tBoolean: {\n\t\t\tconstructorName: \"Boolean\",\n\t\t\targs: []\n\t\t},\n\t\tInteger: {\n\t\t\tconstructorName: \"Int\",\n\t\t\targs: []\n\t\t},\n\t\tSmallInt: {\n\t\t\tconstructorName: \"SmallInt\",\n\t\t\targs: []\n\t\t},\n\t\tBigInt: {\n\t\t\tconstructorName: \"BigInt\",\n\t\t\targs: []\n\t\t},\n\t\tReal: {\n\t\t\tconstructorName: \"Real\",\n\t\t\targs: []\n\t\t},\n\t\tDoublePrecision: {\n\t\t\tconstructorName: \"Float\",\n\t\t\targs: []\n\t\t},\n\t\tDecimal: {\n\t\t\tconstructorName: \"Numeric\",\n\t\t\targs: []\n\t\t},\n\t\tTimestamp: {\n\t\t\tconstructorName: \"Timestamp\",\n\t\t\targs: []\n\t\t},\n\t\tTimestamptz: {\n\t\t\tconstructorName: \"Timestamptz\",\n\t\t\targs: []\n\t\t},\n\t\tDate: {\n\t\t\tconstructorName: \"Date\",\n\t\t\targs: []\n\t\t},\n\t\tTime: {\n\t\t\tconstructorName: \"Time\",\n\t\t\targs: []\n\t\t},\n\t\tTimetz: {\n\t\t\tconstructorName: \"Timetz\",\n\t\t\targs: []\n\t\t},\n\t\tJson: {\n\t\t\tconstructorName: \"Json\",\n\t\t\targs: []\n\t\t},\n\t\tJsonB: {\n\t\t\tconstructorName: \"Jsonb\",\n\t\t\targs: []\n\t\t},\n\t\tByteA: {\n\t\t\tconstructorName: \"Bytes\",\n\t\t\targs: []\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\tnativeType: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\tnativeType: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\ttypeMap: createPostgresTypeMap(),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tparseRawDefault: parsePostgresDefault\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\nconst TEMPORAL_NATIVE_TYPES = /* @__PURE__ */ new Set([\n\t\"timestamp\",\n\t\"timestamptz\",\n\t\"date\",\n\t\"time\",\n\t\"timetz\"\n]);\nfunction isTemporalNativeType(nativeType) {\n\treturn TEMPORAL_NATIVE_TYPES.has(nativeType);\n}\nfunction sqlStringLiteral(value) {\n\treturn value === void 0 ? void 0 : `'${value.replace(/'/g, \"''\")}'`;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\nfunction arrayLiteral(literals, typeName) {\n\treturn `ARRAY[${literals.join(\", \")}]::${typeName}[]`;\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is carried as the SQL literal of the default Postgres\n* stores (`'\\x68656c6c6f'`, `'2024-01-02 03:04:05'`), and a list default as an\n* `ARRAY[...]` of those literals cast to the column type, rather than through\n* the column codec, whose JSON form (base64, a Temporal value) is not what\n* introspection reads back; verify parses both sides with the same parser.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tjunctionRelationFieldNames,\n\tupdatedAtGeneratorId: postgresNowGeneratorIdFor,\n\tliteralDefaultForm: ({ nativeType, typeParams }) => {\n\t\tif (nativeType === \"json\" || nativeType === \"jsonb\") return { kind: \"json\" };\n\t\tif (nativeType === \"bytea\") return {\n\t\t\tkind: \"sqlExpression\",\n\t\t\tliteral: (text) => sqlStringLiteral(base64ToHex(text)),\n\t\t\tlist: (literals) => arrayLiteral(literals, \"BYTEA\")\n\t\t};\n\t\tif (!isTemporalNativeType(nativeType)) return void 0;\n\t\tconst precision = typeParams?.[\"precision\"];\n\t\tconst typeName = `${nativeType.toUpperCase()}${typeof precision === \"number\" ? `(${precision})` : \"\"}`;\n\t\treturn {\n\t\t\tkind: \"sqlExpression\",\n\t\t\tliteral: (text) => sqlStringLiteral(storedTemporalText(text, nativeType)),\n\t\t\tlist: (literals) => arrayLiteral(literals, typeName)\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,WAAW;AACjB,MAAM,oBAAoB;AAC1B,SAAS,IAAI,OAAO,QAAQ,GAAG;CAC9B,OAAO,OAAO,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG;AACzC;;;;;;AAMA,SAAS,eAAe,UAAU;CACjC,MAAM,SAAS,OAAO,GAAG,SAAS,QAAQ,MAAM,GAAG,CAAC,CAAC;CACrD,MAAM,YAAY,SAAS,MAAM,CAAC,CAAC,CAAC,QAAQ,OAAO,EAAE;CACrD,IAAI,cAAc,IAAI,OAAO;CAC7B,IAAI,cAAc,KAAK,OAAO,SAAS,MAAM,IAAI,SAAS,SAAS;CACnE,OAAO,YAAY,MAAM,SAAS,IAAI;AACvC;AACA,SAAS,aAAa,QAAQ;CAC7B,OAAO,WAAW,IAAI,KAAK,IAAI,IAAI,QAAQ,CAAC,CAAC,CA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E;AAClE;AACA,SAAS,YAAY,QAAQ;CAC5B,IAAI,CAAC,yBAAyB,KAAK,MAAM,KAAK,OAAO,SAAS,MAAM,GAAG,OAAO,KAAK;CACnF,OAAO,MAAM,OAAO,KAAK,QAAQ,QAAQ,CAAC,CAAC,SAAS,KAAK;AAC1D;AACA,SAAS,aAAa,UAAU,UAAU;CACzC,OAAO,SAAS,SAAS,KAAK,IAAI,EAAE,KAAK,SAAS;AACnD;;;;;;;;;AASA,MAAM,yBAAyB;CAC9B,QAAQ;CACR,iBAAiB;CACjB,WAAW,CAAC,cAAc,UAAU;CACpC,SAAS;CACT,YAAY;EACX,YAAY;EACZ,iBAAiB,CAAC,MAAM,MAAM;CAC/B;CACA,YAAY;EACX,OAAO;EACP,MAAM;EACN,KAAK;EACL,MAAM;EACN,QAAQ;EACR,MAAM;CACP;;CAEA,oBAAoB;CACpB;CACA,sBAAsB;CACtB,qBAAqB,EAAE,YAAY,iBAAiB;EACnD,IAAI,eAAe,UAAU,eAAe,SAAS,OAAO,EAAE,MAAM,OAAO;EAC3E,IAAI,eAAe,SAAS,OAAO;GAClC,MAAM;GACN,UAAU,SAAS,iBAAiB,YAAY,IAAI,CAAC;GACrD,OAAO,aAAa,aAAa,UAAU,OAAO;EACnD;EACA,IAAI,CAAC,qBAAqB,UAAU,GAAG,OAAO,KAAK;EACnD,MAAM,YAAY,aAAa;EAC/B,MAAM,WAAW,GAAG,WAAW,YAAY,IAAI,OAAO,cAAc,WAAW,IAAI,UAAU,KAAK;EAClG,OAAO;GACN,MAAM;GACN,UAAU,SAAS,iBAAiB,mBAAmB,MAAM,UAAU,CAAC;GACxE,OAAO,aAAa,aAAa,UAAU,QAAQ;EACpD;CACD;AACD"}
package/dist/target.d.mts CHANGED
@@ -35,7 +35,7 @@ import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2f
35
35
  import { t as PostgresMigration } from "./postgres-migration-BNsrwlxh-CwI5BqAu.mjs";
36
36
  import { a as fn, c as placeholder, d as unique, i as createExtension, l as primaryKey, n as checkExpression, o as foreignKey, r as col, s as lit, t as MigrationCLI, u as rawSql } from "./migration-aFeTWTOJ.mjs";
37
37
  import "./op-factory-call-BTU8I_x0.mjs";
38
- import "./pack-CRA_2QjF.mjs";
38
+ import "./pack-5TvJBjeX.mjs";
39
39
  import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-BaviT8KK-Yo9kw6rs.mjs";
40
40
  import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-CT-7zSfk.mjs";
41
41
  import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-bBCUsq_0.mjs";
@@ -43,7 +43,7 @@ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./pla
43
43
  import "./planner-produced-postgres-migration-D6C0T2xV.mjs";
44
44
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-C4DHAddq.mjs";
45
45
  import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-CFgbRTJw.mjs";
46
- import { t as prisma7PostgresBinding } from "./prisma7-binding-C38o_ABR.mjs";
46
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-BlGmTeNp.mjs";
47
47
  import { t as renderOps } from "./render-ops-DPwhZt2W.mjs";
48
48
  import { t as renderCallsToTypeScript } from "./render-typescript-6sCFvMBh.mjs";
49
49
  import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-BRbiY5Vj.mjs";
package/dist/target.mjs CHANGED
@@ -12,7 +12,7 @@ import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tab
12
12
  import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free-DcfADfM5.mjs";
13
13
  import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-Bjtm2F4f-uV5vvkVt.mjs";
14
14
  import { n as computeContentHash, t as POLICY_OPERATION_PREDICATES } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
15
- import { a as plainDateTimeNow, i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-C3hGtD3B-DPpnMHfT.mjs";
15
+ import { a as plainDateTimeNow, i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DhCDnK1T-CGirVrrH.mjs";
16
16
  import { t as postgresRenderCheckExpressions } from "./check-expressions-DFTeR0rd-CSxSpyMV.mjs";
17
17
  import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
18
18
  import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
@@ -24,16 +24,16 @@ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./pla
24
24
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs";
25
25
  import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-B8x7UxGf-BjTez7am.mjs";
26
26
  import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-BFX0ZWWK-KVfAPOLF.mjs";
27
- import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-CmLEo6wf-DYBBFFMK.mjs";
27
+ import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-BPe8r8jN-DrorQoWW.mjs";
28
28
  import { t as dataTransform } from "./data-transform-ChZzy2dP-CxVCat_8.mjs";
29
- import { t as PostgresMigration } from "./postgres-migration-Bw29VY-O-Bglowo1Y.mjs";
29
+ import { t as PostgresMigration } from "./postgres-migration-CydbiBd3-BRXOU7KP.mjs";
30
30
  import { t as renderOps } from "./render-ops-D2vJApKB-B281fzmn.mjs";
31
31
  import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
32
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CjuBrC8Z-Cv4wCASG.mjs";
33
- import { t as createPostgresMigrationPlanner } from "./planner-CeYeEGDy-UmNDGNc2.mjs";
32
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CNmh50cN-qepqYtvL.mjs";
33
+ import { t as createPostgresMigrationPlanner } from "./planner-C_TrM6kn-Dj1rgql2.mjs";
34
34
  import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
35
- import { t as postgresRenderDefault } from "./control-BQHKNZ5z.mjs";
35
+ import { t as postgresRenderDefault } from "./control-DDfLaDsG.mjs";
36
36
  import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
37
37
  import { t as normalizeSchemaNativeType } from "./native-type-normalizer-yvd3tqv-.mjs";
38
- import { t as prisma7PostgresBinding } from "./prisma7-binding-BoFnbd5w.mjs";
38
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-Db1xpliZ.mjs";
39
39
  export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, INSTANT_NOW_GENERATOR_ID, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, POLICY_OPERATION_PREDICATES, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, unique, validateEnumValueLength };
@@ -1,4 +1,4 @@
1
- import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-C3hGtD3B-DPpnMHfT.mjs";
1
+ import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DhCDnK1T-CGirVrrH.mjs";
2
2
  import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
3
- import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-BQHKNZ5z.mjs";
3
+ import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-DDfLaDsG.mjs";
4
4
  export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresRenderDefault };
@@ -1,5 +1,5 @@
1
1
  import { F as createExtension } from "./op-factory-call-B3-CevCo-CSV5SL9W.mjs";
2
2
  import { t as dataTransform } from "./data-transform-ChZzy2dP-CxVCat_8.mjs";
3
- import { t as PostgresMigration } from "./postgres-migration-Bw29VY-O-Bglowo1Y.mjs";
3
+ import { t as PostgresMigration } from "./postgres-migration-CydbiBd3-BRXOU7KP.mjs";
4
4
  import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
5
5
  export { PostgresMigration as Migration, MigrationCLI, checkExpression, col, createExtension, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };
@@ -1,2 +1,2 @@
1
- import { t as postgresTargetDescriptorMeta } from "./pack-CRA_2QjF.mjs";
1
+ import { t as postgresTargetDescriptorMeta } from "./pack-5TvJBjeX.mjs";
2
2
  export { postgresTargetDescriptorMeta as default };
@@ -1,2 +1,2 @@
1
- import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CQBdvIPG-CN3m2xcT.mjs";
1
+ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CQMRNeLX-CF4MvmN_.mjs";
2
2
  export { postgresTargetDescriptorMeta as default };
@@ -1,2 +1,2 @@
1
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CjuBrC8Z-Cv4wCASG.mjs";
1
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CNmh50cN-qepqYtvL.mjs";
2
2
  export { TypeScriptRenderablePostgresMigration };
@@ -1,3 +1,3 @@
1
1
  import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-BFX0ZWWK-KVfAPOLF.mjs";
2
- import { t as createPostgresMigrationPlanner } from "./planner-CeYeEGDy-UmNDGNc2.mjs";
2
+ import { t as createPostgresMigrationPlanner } from "./planner-C_TrM6kn-Dj1rgql2.mjs";
3
3
  export { contractToPostgresDatabaseSchemaNode, createPostgresMigrationPlanner };
@@ -1,2 +1,2 @@
1
- import { t as prisma7PostgresBinding } from "./prisma7-binding-C38o_ABR.mjs";
1
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-BlGmTeNp.mjs";
2
2
  export { prisma7PostgresBinding };
@@ -1,2 +1,2 @@
1
- import { t as prisma7PostgresBinding } from "./prisma7-binding-BoFnbd5w.mjs";
1
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-Db1xpliZ.mjs";
2
2
  export { prisma7PostgresBinding };
@@ -1,6 +1,6 @@
1
- import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-C3hGtD3B-DPpnMHfT.mjs";
1
+ import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DhCDnK1T-CGirVrrH.mjs";
2
2
  import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs";
3
- import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-CmLEo6wf-DYBBFFMK.mjs";
3
+ import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-BPe8r8jN-DrorQoWW.mjs";
4
4
  import { t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
5
5
  //#region ../../../3-targets/3-targets/postgres/dist/runtime.mjs
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { c as PLAIN_DATE_TIME_NOW_GENERATOR_ID, d as INSTANT_NOW_GENERATOR_ID, f as instantNow, l as plainDateTimeNow } from \"./authoring-C3hGtD3B.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-UwYdV8fD.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-CmLEo6wf.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;AAWA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
1
+ {"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { c as PLAIN_DATE_TIME_NOW_GENERATOR_ID, d as INSTANT_NOW_GENERATOR_ID, f as instantNow, l as plainDateTimeNow } from \"./authoring-DhCDnK1T.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-UwYdV8fD.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-BPe8r8jN.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;AAWA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-postgres",
3
- "version": "8.0.0-rc.11-dev.26",
3
+ "version": "8.0.0-rc.11-dev.28",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,9 +9,9 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-sql": "8.0.0-rc.11-dev.26",
13
- "@prisma/orm-framework": "8.0.0-rc.11-dev.26",
14
- "@prisma/orm-toolchain": "8.0.0-rc.11-dev.26",
12
+ "@prisma/orm-family-sql": "8.0.0-rc.11-dev.28",
13
+ "@prisma/orm-framework": "8.0.0-rc.11-dev.28",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.11-dev.28",
15
15
  "@standard-schema/spec": "^1.1.0",
16
16
  "@types/node": "26.1.2",
17
17
  "@types/pg": "8.20.4",
@@ -22,11 +22,11 @@
22
22
  "postgres-array": "2.0.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@internal/adapter-postgres": "8.0.0-rc.11-dev.26",
26
- "@internal/driver-postgres": "8.0.0-rc.11-dev.26",
27
- "@internal/target-postgres": "8.0.0-rc.11-dev.26",
28
- "@repo/tsconfig": "8.0.0-rc.11-dev.26",
29
- "@repo/tsdown": "8.0.0-rc.11-dev.26",
25
+ "@internal/adapter-postgres": "8.0.0-rc.11-dev.28",
26
+ "@internal/driver-postgres": "8.0.0-rc.11-dev.28",
27
+ "@internal/target-postgres": "8.0.0-rc.11-dev.28",
28
+ "@repo/tsconfig": "8.0.0-rc.11-dev.28",
29
+ "@repo/tsdown": "8.0.0-rc.11-dev.28",
30
30
  "tsdown": "0.22.14",
31
31
  "typescript": "5.9.3",
32
32
  "vitest": "5.0.0-rc.2"