@zodic/shared 0.0.283 → 0.0.286
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/db/migrations/0006_fine_manta.sql +1 -0
- package/db/migrations/0007_typical_grim_reaper.sql +1 -0
- package/db/migrations/meta/0006_snapshot.json +2425 -0
- package/db/migrations/meta/0007_snapshot.json +2433 -0
- package/db/migrations/meta/_journal.json +14 -0
- package/db/schema.ts +14 -3
- package/package.json +1 -1
- package/types/scopes/generic.ts +2 -1
|
@@ -43,6 +43,20 @@
|
|
|
43
43
|
"when": 1742419128409,
|
|
44
44
|
"tag": "0005_famous_cammi",
|
|
45
45
|
"breakpoints": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"idx": 6,
|
|
49
|
+
"version": "6",
|
|
50
|
+
"when": 1742576766950,
|
|
51
|
+
"tag": "0006_fine_manta",
|
|
52
|
+
"breakpoints": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"idx": 7,
|
|
56
|
+
"version": "6",
|
|
57
|
+
"when": 1742661456728,
|
|
58
|
+
"tag": "0007_typical_grim_reaper",
|
|
59
|
+
"breakpoints": true
|
|
46
60
|
}
|
|
47
61
|
]
|
|
48
62
|
}
|
package/db/schema.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
real,
|
|
6
6
|
sqliteTable,
|
|
7
7
|
text,
|
|
8
|
+
uniqueIndex,
|
|
8
9
|
} from 'drizzle-orm/sqlite-core';
|
|
9
10
|
|
|
10
11
|
export const timestampFields = {
|
|
@@ -246,8 +247,14 @@ export const aspectReports = sqliteTable(
|
|
|
246
247
|
index('aspect_reports_aspecting_idx').on(t.aspectingPlanet),
|
|
247
248
|
index('aspect_reports_aspected_idx').on(t.aspectedPlanet),
|
|
248
249
|
index('aspect_reports_aspect_idx').on(t.aspect),
|
|
249
|
-
index('aspect_reports_combined_idx').on(
|
|
250
|
-
|
|
250
|
+
index('aspect_reports_combined_idx').on(
|
|
251
|
+
t.aspectingPlanet,
|
|
252
|
+
t.aspectedPlanet,
|
|
253
|
+
t.aspect
|
|
254
|
+
),
|
|
255
|
+
index('aspect_reports_description_template_idx').on(
|
|
256
|
+
t.descriptionTemplateId
|
|
257
|
+
), // NEW: Index for foreign key performance
|
|
251
258
|
]
|
|
252
259
|
);
|
|
253
260
|
|
|
@@ -268,7 +275,9 @@ export const astroFeatureReports = sqliteTable(
|
|
|
268
275
|
},
|
|
269
276
|
(t) => [
|
|
270
277
|
index('astro_feature_reports_type_name_idx').on(t.featureType, t.name),
|
|
271
|
-
index('astro_feature_reports_description_template_idx').on(
|
|
278
|
+
index('astro_feature_reports_description_template_idx').on(
|
|
279
|
+
t.descriptionTemplateId
|
|
280
|
+
), // NEW: Index for foreign key performance
|
|
272
281
|
]
|
|
273
282
|
);
|
|
274
283
|
|
|
@@ -337,10 +346,12 @@ export const userConcepts = sqliteTable(
|
|
|
337
346
|
.notNull()
|
|
338
347
|
.references(() => conceptCombinations.id, { onDelete: 'cascade' }),
|
|
339
348
|
...timestampFields,
|
|
349
|
+
imageIdx: integer().default(0),
|
|
340
350
|
},
|
|
341
351
|
(t) => [
|
|
342
352
|
index('user_concepts_user_id_idx').on(t.userId),
|
|
343
353
|
index('user_concepts_concept_id_idx').on(t.conceptId),
|
|
354
|
+
uniqueIndex('user_concepts_unique_user_concept').on(t.userId, t.conceptId),
|
|
344
355
|
]
|
|
345
356
|
);
|
|
346
357
|
|
package/package.json
CHANGED
package/types/scopes/generic.ts
CHANGED
|
@@ -554,7 +554,8 @@ export type UserConceptData = {
|
|
|
554
554
|
reel: any[]; // From conceptsData.reelImages (text, JSON-stringified array, parsed)
|
|
555
555
|
};
|
|
556
556
|
combinationString: string; // e.g., "sagittarius-aquarius-libra"
|
|
557
|
-
conceptSlug: Concept;
|
|
557
|
+
conceptSlug: Concept;
|
|
558
|
+
imageIdx: number;
|
|
558
559
|
};
|
|
559
560
|
|
|
560
561
|
export type UserProfile = {
|