@prisma/migrate 6.18.0 → 6.19.0-integration-next.2

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/Migrate.js +3 -3
  2. package/dist/bin.js +26 -27
  3. package/dist/{chunk-Z27SI4AV.js → chunk-43R3GFIU.js} +4 -4
  4. package/dist/{chunk-ZTIS675B.js → chunk-55CU3CV4.js} +7 -42
  5. package/dist/{chunk-3AKRTEIK.js → chunk-AVDCAVMB.js} +7 -7
  6. package/dist/{chunk-O35BTK6Y.js → chunk-EDBWBKKM.js} +5 -5
  7. package/dist/{chunk-F2XCBEZ4.js → chunk-F4ENFSD2.js} +9 -11
  8. package/dist/{chunk-6ORQRJLP.js → chunk-I2VUHLTD.js} +14 -45
  9. package/dist/{chunk-PHXLQVPT.js → chunk-L7EZFBB4.js} +40 -68
  10. package/dist/{chunk-J33EXHZB.js → chunk-NX7CVZ33.js} +9 -11
  11. package/dist/{chunk-7TVX3D4W.js → chunk-RF72HHCJ.js} +6 -6
  12. package/dist/{chunk-D6LYHB65.js → chunk-RMMTCJSW.js} +4 -4
  13. package/dist/{chunk-TW22Y3AA.js → chunk-TIVQQZRQ.js} +6 -6
  14. package/dist/{chunk-BHJMJSM4.js → chunk-TVLHBYPV.js} +6 -6
  15. package/dist/{chunk-D4TRX77Y.js → chunk-W2NKGYXF.js} +7 -9
  16. package/dist/{chunk-R4IWP35Z.js → chunk-YB32XZV6.js} +6 -6
  17. package/dist/{chunk-NB4FRYRQ.js → chunk-ZBQSD3YW.js} +5 -5
  18. package/dist/commands/DbDrop.js +2 -2
  19. package/dist/commands/DbExecute.js +4 -4
  20. package/dist/commands/DbPull.js +4 -5
  21. package/dist/commands/DbPush.js +4 -4
  22. package/dist/commands/DbSeed.js +3 -3
  23. package/dist/commands/MigrateDeploy.js +4 -4
  24. package/dist/commands/MigrateDev.js +5 -5
  25. package/dist/commands/MigrateDiff.js +4 -4
  26. package/dist/commands/MigrateReset.js +5 -5
  27. package/dist/commands/MigrateResolve.js +4 -4
  28. package/dist/commands/MigrateStatus.js +4 -4
  29. package/dist/index.js +30 -31
  30. package/dist/internals/src/cli/getSchema.d.ts +1 -15
  31. package/dist/migrate/src/utils/seed.d.ts +0 -6
  32. package/dist/utils/getDatabaseVersionSafe.js +4 -4
  33. package/dist/utils/introspectSql.js +4 -4
  34. package/dist/utils/seed.js +2 -3
  35. package/package.json +10 -10
  36. package/dist/chunk-RR6BKMNO.js +0 -80
  37. package/dist/migrate/src/utils/replaceOrAddDatasource.d.ts +0 -2
  38. package/dist/migrate/src/utils/replaceOrAddDatasource.test.d.ts +0 -1
  39. package/dist/utils/replaceOrAddDatasource.js +0 -25
  40. package/dist/utils/replaceOrAddDatasource.test.js +0 -207
@@ -1,207 +0,0 @@
1
- "use strict";
2
- var import_chunk_RR6BKMNO = require("../chunk-RR6BKMNO.js");
3
- var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
4
- var replacement = `datasource new {
5
- provider = "sqlite"
6
- url = "file:new.db"
7
- }`;
8
- test("single file, with existing datasource", () => {
9
- const result = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(replacement, [
10
- [
11
- "a.prisma",
12
- `
13
- datasource db {
14
- provider = "postgresql"
15
- url = "postgresql://example.com/db"
16
- }
17
-
18
- model A {
19
- id Int @id
20
- }
21
- `
22
- ]
23
- ]);
24
- expect(result).toMatchInlineSnapshot(`
25
- [
26
- [
27
- "a.prisma",
28
- "datasource new {
29
- provider = "sqlite"
30
- url = "file:new.db"
31
- }
32
-
33
- model A {
34
- id Int @id
35
- }",
36
- ],
37
- ]
38
- `);
39
- });
40
- test("single file, with no datasource", () => {
41
- const result = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(replacement, [
42
- [
43
- "a.prisma",
44
- `
45
- model A {
46
- id Int @id
47
- }
48
- `
49
- ]
50
- ]);
51
- expect(result).toMatchInlineSnapshot(`
52
- [
53
- [
54
- "a.prisma",
55
- "datasource new {
56
- provider = "sqlite"
57
- url = "file:new.db"
58
- }
59
-
60
- model A {
61
- id Int @id
62
- }
63
- ",
64
- ],
65
- ]
66
- `);
67
- });
68
- test("single file, empty", () => {
69
- const result = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(replacement, [["a.prisma", ""]]);
70
- expect(result).toMatchInlineSnapshot(`
71
- [
72
- [
73
- "a.prisma",
74
- "datasource new {
75
- provider = "sqlite"
76
- url = "file:new.db"
77
- }
78
- ",
79
- ],
80
- ]
81
- `);
82
- });
83
- test("single file, with existing datasource and commented out closing bracket", () => {
84
- const result = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(replacement, [
85
- [
86
- "a.prisma",
87
- `
88
- datasource db {
89
- provider = "postgresql"
90
- url = "postgresql://example.com/db"
91
- // }
92
- }
93
-
94
- model A {
95
- id Int @id
96
- }
97
- `
98
- ]
99
- ]);
100
- expect(result).toMatchInlineSnapshot(`
101
- [
102
- [
103
- "a.prisma",
104
- "datasource new {
105
- provider = "sqlite"
106
- url = "file:new.db"
107
- }
108
-
109
- model A {
110
- id Int @id
111
- }",
112
- ],
113
- ]
114
- `);
115
- });
116
- test("multiple files, with existing datasource", () => {
117
- const result = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(replacement, [
118
- [
119
- "a.prisma",
120
- `
121
- model A {
122
- id Int @id
123
- }
124
- `
125
- ],
126
- [
127
- "b.prisma",
128
- `
129
- datasource db {
130
- provider = "postgresql"
131
- url = "postgresql://example.com/db"
132
- }
133
-
134
- model B {
135
- id Int @id
136
- }
137
- `
138
- ]
139
- ]);
140
- expect(result).toMatchInlineSnapshot(`
141
- [
142
- [
143
- "a.prisma",
144
- "
145
- model A {
146
- id Int @id
147
- }
148
- ",
149
- ],
150
- [
151
- "b.prisma",
152
- "datasource new {
153
- provider = "sqlite"
154
- url = "file:new.db"
155
- }
156
-
157
- model B {
158
- id Int @id
159
- }",
160
- ],
161
- ]
162
- `);
163
- });
164
- test("multiple files, no datasource", () => {
165
- const result = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(replacement, [
166
- [
167
- "a.prisma",
168
- `
169
- model A {
170
- id Int @id
171
- }
172
- `
173
- ],
174
- [
175
- "b.prisma",
176
- `
177
- model B {
178
- id Int @id
179
- }
180
- `
181
- ]
182
- ]);
183
- expect(result).toMatchInlineSnapshot(`
184
- [
185
- [
186
- "a.prisma",
187
- "datasource new {
188
- provider = "sqlite"
189
- url = "file:new.db"
190
- }
191
-
192
- model A {
193
- id Int @id
194
- }
195
- ",
196
- ],
197
- [
198
- "b.prisma",
199
- "
200
- model B {
201
- id Int @id
202
- }
203
- ",
204
- ],
205
- ]
206
- `);
207
- });