@zodic/shared 0.0.11 → 0.0.13

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.
@@ -1,71 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_astrological_data` (
3
- `id` text PRIMARY KEY NOT NULL,
4
- `user_id` text NOT NULL,
5
- `planet` text NOT NULL,
6
- `sign` text NOT NULL,
7
- `house` integer NOT NULL,
8
- `full_degree` real NOT NULL,
9
- `norm_degree` real NOT NULL,
10
- `speed` real NOT NULL,
11
- `is_retro` integer NOT NULL,
12
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
13
- );
14
- --> statement-breakpoint
15
- INSERT INTO `__new_astrological_data`("id", "user_id", "planet", "sign", "house", "full_degree", "norm_degree", "speed", "is_retro") SELECT "id", "user_id", "planet", "sign", "house", "full_degree", "norm_degree", "speed", "is_retro" FROM `astrological_data`;--> statement-breakpoint
16
- DROP TABLE `astrological_data`;--> statement-breakpoint
17
- ALTER TABLE `__new_astrological_data` RENAME TO `astrological_data`;--> statement-breakpoint
18
- PRAGMA foreign_keys=ON;--> statement-breakpoint
19
- CREATE INDEX `astrological_data_user_id_idx` ON `astrological_data` (`user_id`);--> statement-breakpoint
20
- CREATE TABLE `__new_generations` (
21
- `id` text PRIMARY KEY NOT NULL,
22
- `user_id` text NOT NULL,
23
- `product_id` text NOT NULL,
24
- `type` text NOT NULL,
25
- `image_id` text,
26
- `image_url` text,
27
- `report_content` text,
28
- `external_source_url` text,
29
- `created_at` text DEFAULT 'CURRENT_TIMESTAMP',
30
- `metadata` text,
31
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
32
- FOREIGN KEY (`product_id`) REFERENCES `products`(`id`) ON UPDATE no action ON DELETE set null
33
- );
34
- --> statement-breakpoint
35
- INSERT INTO `__new_generations`("id", "user_id", "product_id", "type", "image_id", "image_url", "report_content", "external_source_url", "created_at", "metadata") SELECT "id", "user_id", "product_id", "type", "image_id", "image_url", "report_content", "external_source_url", "created_at", "metadata" FROM `generations`;--> statement-breakpoint
36
- DROP TABLE `generations`;--> statement-breakpoint
37
- ALTER TABLE `__new_generations` RENAME TO `generations`;--> statement-breakpoint
38
- CREATE INDEX `generations_user_id_idx` ON `generations` (`user_id`);--> statement-breakpoint
39
- CREATE INDEX `generations_product_id_idx` ON `generations` (`product_id`);--> statement-breakpoint
40
- CREATE INDEX `generations_user_id_product_id_idx` ON `generations` (`user_id`,`product_id`);--> statement-breakpoint
41
- CREATE TABLE `__new_products` (
42
- `id` text PRIMARY KEY NOT NULL,
43
- `name` text NOT NULL,
44
- `description` text,
45
- `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
46
- );
47
- --> statement-breakpoint
48
- INSERT INTO `__new_products`("id", "name", "description", "created_at") SELECT "id", "name", "description", "created_at" FROM `products`;--> statement-breakpoint
49
- DROP TABLE `products`;--> statement-breakpoint
50
- ALTER TABLE `__new_products` RENAME TO `products`;--> statement-breakpoint
51
- CREATE UNIQUE INDEX `products_name_unique` ON `products` (`name`);--> statement-breakpoint
52
- CREATE INDEX `products_name_idx` ON `products` (`name`);--> statement-breakpoint
53
- CREATE TABLE `__new_users` (
54
- `id` text PRIMARY KEY NOT NULL,
55
- `email` text NOT NULL,
56
- `name` text NOT NULL,
57
- `profile_image` text,
58
- `user_photo_id` text,
59
- `user_photo_url` text,
60
- `gender` text,
61
- `birth_date_time` text,
62
- `latitude` real,
63
- `longitude` real,
64
- `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
65
- );
66
- --> statement-breakpoint
67
- INSERT INTO `__new_users`("id", "email", "name", "profile_image", "user_photo_id", "user_photo_url", "gender", "birth_date_time", "latitude", "longitude", "created_at") SELECT "id", "email", "name", "profile_image", "user_photo_id", "user_photo_url", "gender", "birth_date_time", "latitude", "longitude", "created_at" FROM `users`;--> statement-breakpoint
68
- DROP TABLE `users`;--> statement-breakpoint
69
- ALTER TABLE `__new_users` RENAME TO `users`;--> statement-breakpoint
70
- CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);--> statement-breakpoint
71
- CREATE INDEX `users_email_idx` ON `users` (`email`);
@@ -1,19 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_astrological_data` (
3
- `id` text PRIMARY KEY NOT NULL,
4
- `user_id` text NOT NULL,
5
- `planet` text NOT NULL,
6
- `sign` text NOT NULL,
7
- `house` integer NOT NULL,
8
- `full_degree` real,
9
- `norm_degree` real,
10
- `speed` real,
11
- `is_retro` integer,
12
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
13
- );
14
- --> statement-breakpoint
15
- INSERT INTO `__new_astrological_data`("id", "user_id", "planet", "sign", "house", "full_degree", "norm_degree", "speed", "is_retro") SELECT "id", "user_id", "planet", "sign", "house", "full_degree", "norm_degree", "speed", "is_retro" FROM `astrological_data`;--> statement-breakpoint
16
- DROP TABLE `astrological_data`;--> statement-breakpoint
17
- ALTER TABLE `__new_astrological_data` RENAME TO `astrological_data`;--> statement-breakpoint
18
- PRAGMA foreign_keys=ON;--> statement-breakpoint
19
- CREATE INDEX `astrological_data_user_id_idx` ON `astrological_data` (`user_id`);
@@ -1,480 +0,0 @@
1
- {
2
- "version": "6",
3
- "dialect": "sqlite",
4
- "id": "410a1786-702f-44bf-97da-28c75550b90f",
5
- "prevId": "ebd56564-96c0-4785-a419-40258282dbc0",
6
- "tables": {
7
- "astrological_data": {
8
- "name": "astrological_data",
9
- "columns": {
10
- "id": {
11
- "name": "id",
12
- "type": "text",
13
- "primaryKey": true,
14
- "notNull": true,
15
- "autoincrement": false
16
- },
17
- "user_id": {
18
- "name": "user_id",
19
- "type": "text",
20
- "primaryKey": false,
21
- "notNull": true,
22
- "autoincrement": false
23
- },
24
- "planet": {
25
- "name": "planet",
26
- "type": "text",
27
- "primaryKey": false,
28
- "notNull": true,
29
- "autoincrement": false
30
- },
31
- "sign": {
32
- "name": "sign",
33
- "type": "text",
34
- "primaryKey": false,
35
- "notNull": true,
36
- "autoincrement": false
37
- },
38
- "house": {
39
- "name": "house",
40
- "type": "integer",
41
- "primaryKey": false,
42
- "notNull": true,
43
- "autoincrement": false
44
- },
45
- "full_degree": {
46
- "name": "full_degree",
47
- "type": "real",
48
- "primaryKey": false,
49
- "notNull": true,
50
- "autoincrement": false
51
- },
52
- "norm_degree": {
53
- "name": "norm_degree",
54
- "type": "real",
55
- "primaryKey": false,
56
- "notNull": true,
57
- "autoincrement": false
58
- },
59
- "speed": {
60
- "name": "speed",
61
- "type": "real",
62
- "primaryKey": false,
63
- "notNull": true,
64
- "autoincrement": false
65
- },
66
- "is_retro": {
67
- "name": "is_retro",
68
- "type": "integer",
69
- "primaryKey": false,
70
- "notNull": true,
71
- "autoincrement": false
72
- }
73
- },
74
- "indexes": {
75
- "astrological_data_user_id_idx": {
76
- "name": "astrological_data_user_id_idx",
77
- "columns": [
78
- "user_id"
79
- ],
80
- "isUnique": false
81
- }
82
- },
83
- "foreignKeys": {
84
- "astrological_data_user_id_users_id_fk": {
85
- "name": "astrological_data_user_id_users_id_fk",
86
- "tableFrom": "astrological_data",
87
- "tableTo": "users",
88
- "columnsFrom": [
89
- "user_id"
90
- ],
91
- "columnsTo": [
92
- "id"
93
- ],
94
- "onDelete": "cascade",
95
- "onUpdate": "no action"
96
- }
97
- },
98
- "compositePrimaryKeys": {},
99
- "uniqueConstraints": {},
100
- "checkConstraints": {}
101
- },
102
- "generations": {
103
- "name": "generations",
104
- "columns": {
105
- "id": {
106
- "name": "id",
107
- "type": "text",
108
- "primaryKey": true,
109
- "notNull": true,
110
- "autoincrement": false
111
- },
112
- "user_id": {
113
- "name": "user_id",
114
- "type": "text",
115
- "primaryKey": false,
116
- "notNull": true,
117
- "autoincrement": false
118
- },
119
- "product_id": {
120
- "name": "product_id",
121
- "type": "text",
122
- "primaryKey": false,
123
- "notNull": true,
124
- "autoincrement": false
125
- },
126
- "type": {
127
- "name": "type",
128
- "type": "text",
129
- "primaryKey": false,
130
- "notNull": true,
131
- "autoincrement": false
132
- },
133
- "image_id": {
134
- "name": "image_id",
135
- "type": "text",
136
- "primaryKey": false,
137
- "notNull": false,
138
- "autoincrement": false
139
- },
140
- "image_url": {
141
- "name": "image_url",
142
- "type": "text",
143
- "primaryKey": false,
144
- "notNull": false,
145
- "autoincrement": false
146
- },
147
- "report_content": {
148
- "name": "report_content",
149
- "type": "text",
150
- "primaryKey": false,
151
- "notNull": false,
152
- "autoincrement": false
153
- },
154
- "external_source_url": {
155
- "name": "external_source_url",
156
- "type": "text",
157
- "primaryKey": false,
158
- "notNull": false,
159
- "autoincrement": false
160
- },
161
- "created_at": {
162
- "name": "created_at",
163
- "type": "text",
164
- "primaryKey": false,
165
- "notNull": false,
166
- "autoincrement": false,
167
- "default": "'CURRENT_TIMESTAMP'"
168
- },
169
- "metadata": {
170
- "name": "metadata",
171
- "type": "text",
172
- "primaryKey": false,
173
- "notNull": false,
174
- "autoincrement": false
175
- }
176
- },
177
- "indexes": {
178
- "generations_user_id_idx": {
179
- "name": "generations_user_id_idx",
180
- "columns": [
181
- "user_id"
182
- ],
183
- "isUnique": false
184
- },
185
- "generations_product_id_idx": {
186
- "name": "generations_product_id_idx",
187
- "columns": [
188
- "product_id"
189
- ],
190
- "isUnique": false
191
- },
192
- "generations_user_id_product_id_idx": {
193
- "name": "generations_user_id_product_id_idx",
194
- "columns": [
195
- "user_id",
196
- "product_id"
197
- ],
198
- "isUnique": false
199
- }
200
- },
201
- "foreignKeys": {
202
- "generations_user_id_users_id_fk": {
203
- "name": "generations_user_id_users_id_fk",
204
- "tableFrom": "generations",
205
- "tableTo": "users",
206
- "columnsFrom": [
207
- "user_id"
208
- ],
209
- "columnsTo": [
210
- "id"
211
- ],
212
- "onDelete": "cascade",
213
- "onUpdate": "no action"
214
- },
215
- "generations_product_id_products_id_fk": {
216
- "name": "generations_product_id_products_id_fk",
217
- "tableFrom": "generations",
218
- "tableTo": "products",
219
- "columnsFrom": [
220
- "product_id"
221
- ],
222
- "columnsTo": [
223
- "id"
224
- ],
225
- "onDelete": "set null",
226
- "onUpdate": "no action"
227
- }
228
- },
229
- "compositePrimaryKeys": {},
230
- "uniqueConstraints": {},
231
- "checkConstraints": {}
232
- },
233
- "products": {
234
- "name": "products",
235
- "columns": {
236
- "id": {
237
- "name": "id",
238
- "type": "text",
239
- "primaryKey": true,
240
- "notNull": true,
241
- "autoincrement": false
242
- },
243
- "name": {
244
- "name": "name",
245
- "type": "text",
246
- "primaryKey": false,
247
- "notNull": true,
248
- "autoincrement": false
249
- },
250
- "description": {
251
- "name": "description",
252
- "type": "text",
253
- "primaryKey": false,
254
- "notNull": false,
255
- "autoincrement": false
256
- },
257
- "created_at": {
258
- "name": "created_at",
259
- "type": "text",
260
- "primaryKey": false,
261
- "notNull": true,
262
- "autoincrement": false,
263
- "default": "CURRENT_TIMESTAMP"
264
- }
265
- },
266
- "indexes": {
267
- "products_name_unique": {
268
- "name": "products_name_unique",
269
- "columns": [
270
- "name"
271
- ],
272
- "isUnique": true
273
- },
274
- "products_name_idx": {
275
- "name": "products_name_idx",
276
- "columns": [
277
- "name"
278
- ],
279
- "isUnique": false
280
- }
281
- },
282
- "foreignKeys": {},
283
- "compositePrimaryKeys": {},
284
- "uniqueConstraints": {},
285
- "checkConstraints": {}
286
- },
287
- "tokens": {
288
- "name": "tokens",
289
- "columns": {
290
- "id": {
291
- "name": "id",
292
- "type": "text",
293
- "primaryKey": true,
294
- "notNull": true,
295
- "autoincrement": false
296
- },
297
- "user_id": {
298
- "name": "user_id",
299
- "type": "text",
300
- "primaryKey": false,
301
- "notNull": true,
302
- "autoincrement": false
303
- },
304
- "refresh_token": {
305
- "name": "refresh_token",
306
- "type": "text",
307
- "primaryKey": false,
308
- "notNull": true,
309
- "autoincrement": false
310
- },
311
- "expires_at": {
312
- "name": "expires_at",
313
- "type": "text",
314
- "primaryKey": false,
315
- "notNull": true,
316
- "autoincrement": false
317
- },
318
- "created_at": {
319
- "name": "created_at",
320
- "type": "text",
321
- "primaryKey": false,
322
- "notNull": true,
323
- "autoincrement": false,
324
- "default": "CURRENT_TIMESTAMP"
325
- }
326
- },
327
- "indexes": {
328
- "tokens_refresh_token_unique": {
329
- "name": "tokens_refresh_token_unique",
330
- "columns": [
331
- "refresh_token"
332
- ],
333
- "isUnique": true
334
- },
335
- "tokens_user_id_idx": {
336
- "name": "tokens_user_id_idx",
337
- "columns": [
338
- "user_id"
339
- ],
340
- "isUnique": false
341
- }
342
- },
343
- "foreignKeys": {
344
- "tokens_user_id_users_id_fk": {
345
- "name": "tokens_user_id_users_id_fk",
346
- "tableFrom": "tokens",
347
- "tableTo": "users",
348
- "columnsFrom": [
349
- "user_id"
350
- ],
351
- "columnsTo": [
352
- "id"
353
- ],
354
- "onDelete": "cascade",
355
- "onUpdate": "no action"
356
- }
357
- },
358
- "compositePrimaryKeys": {},
359
- "uniqueConstraints": {},
360
- "checkConstraints": {}
361
- },
362
- "users": {
363
- "name": "users",
364
- "columns": {
365
- "id": {
366
- "name": "id",
367
- "type": "text",
368
- "primaryKey": true,
369
- "notNull": true,
370
- "autoincrement": false
371
- },
372
- "email": {
373
- "name": "email",
374
- "type": "text",
375
- "primaryKey": false,
376
- "notNull": true,
377
- "autoincrement": false
378
- },
379
- "name": {
380
- "name": "name",
381
- "type": "text",
382
- "primaryKey": false,
383
- "notNull": true,
384
- "autoincrement": false
385
- },
386
- "profile_image": {
387
- "name": "profile_image",
388
- "type": "text",
389
- "primaryKey": false,
390
- "notNull": false,
391
- "autoincrement": false
392
- },
393
- "user_photo_id": {
394
- "name": "user_photo_id",
395
- "type": "text",
396
- "primaryKey": false,
397
- "notNull": false,
398
- "autoincrement": false
399
- },
400
- "user_photo_url": {
401
- "name": "user_photo_url",
402
- "type": "text",
403
- "primaryKey": false,
404
- "notNull": false,
405
- "autoincrement": false
406
- },
407
- "gender": {
408
- "name": "gender",
409
- "type": "text",
410
- "primaryKey": false,
411
- "notNull": false,
412
- "autoincrement": false
413
- },
414
- "birth_date_time": {
415
- "name": "birth_date_time",
416
- "type": "text",
417
- "primaryKey": false,
418
- "notNull": true,
419
- "autoincrement": false
420
- },
421
- "latitude": {
422
- "name": "latitude",
423
- "type": "real",
424
- "primaryKey": false,
425
- "notNull": true,
426
- "autoincrement": false
427
- },
428
- "longitude": {
429
- "name": "longitude",
430
- "type": "real",
431
- "primaryKey": false,
432
- "notNull": true,
433
- "autoincrement": false
434
- },
435
- "created_at": {
436
- "name": "created_at",
437
- "type": "text",
438
- "primaryKey": false,
439
- "notNull": true,
440
- "autoincrement": false,
441
- "default": "CURRENT_TIMESTAMP"
442
- }
443
- },
444
- "indexes": {
445
- "users_email_unique": {
446
- "name": "users_email_unique",
447
- "columns": [
448
- "email"
449
- ],
450
- "isUnique": true
451
- },
452
- "users_email_idx": {
453
- "name": "users_email_idx",
454
- "columns": [
455
- "email"
456
- ],
457
- "isUnique": false
458
- }
459
- },
460
- "foreignKeys": {},
461
- "compositePrimaryKeys": {},
462
- "uniqueConstraints": {},
463
- "checkConstraints": {}
464
- }
465
- },
466
- "views": {},
467
- "enums": {},
468
- "_meta": {
469
- "schemas": {},
470
- "tables": {
471
- "\"users_table\"": "\"users\""
472
- },
473
- "columns": {
474
- "\"users\".\"birth_time\"": "\"users\".\"birth_date_time\""
475
- }
476
- },
477
- "internal": {
478
- "indexes": {}
479
- }
480
- }