@zodic/shared 0.0.16 → 0.0.18
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/schema.ts +6 -3
- package/package.json +1 -1
package/db/schema.ts
CHANGED
|
@@ -169,13 +169,12 @@ export const userConcepts = sqliteTable(
|
|
|
169
169
|
]
|
|
170
170
|
);
|
|
171
171
|
|
|
172
|
-
|
|
173
172
|
export const artifacts = sqliteTable(
|
|
174
173
|
'artifacts',
|
|
175
174
|
{
|
|
176
175
|
id: text('id').primaryKey(),
|
|
177
176
|
name: text('name').notNull(), // Name of the artifact (e.g., "Cosmic Mirror")
|
|
178
|
-
slug: text('slug').notNull(),
|
|
177
|
+
slug: text('slug').notNull(), // Slug of the artifact (e.g., "cosmic-mirror")
|
|
179
178
|
conceptId: text('concept_id')
|
|
180
179
|
.notNull()
|
|
181
180
|
.references(() => concepts.id, { onDelete: 'cascade' }),
|
|
@@ -196,11 +195,14 @@ export const userArtifacts = sqliteTable(
|
|
|
196
195
|
userId: text('user_id')
|
|
197
196
|
.notNull()
|
|
198
197
|
.references(() => users.id, { onDelete: 'cascade' }),
|
|
198
|
+
userConceptId: text('user_concept_id')
|
|
199
|
+
.notNull()
|
|
200
|
+
.references(() => userConcepts.id, { onDelete: 'cascade' }),
|
|
199
201
|
artifactId: text('artifact_id')
|
|
200
202
|
.notNull()
|
|
201
203
|
.references(() => artifacts.id, { onDelete: 'cascade' }),
|
|
202
204
|
gender: text('gender').notNull(), // Gender of the user or chosen archetype
|
|
203
|
-
|
|
205
|
+
archetypeIndex: text('archetype_index').notNull(), // Chosen archetype for the artifact
|
|
204
206
|
postImageId: text('post_image_id'), // URL for the Instagram post image
|
|
205
207
|
reelImageId: text('reel_image_id'), // URL for the Instagram reels/TikTok image
|
|
206
208
|
postImageUrl: text('post_image_url'), // URL for the Instagram post image
|
|
@@ -238,6 +240,7 @@ export const generations = sqliteTable(
|
|
|
238
240
|
() => userArtifacts.id,
|
|
239
241
|
{ onDelete: 'cascade' }
|
|
240
242
|
),
|
|
243
|
+
gender: text('gender'),
|
|
241
244
|
conceptCombinationId: text('concept_combination_id').references(
|
|
242
245
|
() => conceptCombinations.id,
|
|
243
246
|
{ onDelete: 'cascade' }
|