@zodic/shared 0.0.17 → 0.0.19

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 (2) hide show
  1. package/db/schema.ts +6 -3
  2. package/package.json +1 -1
package/db/schema.ts CHANGED
@@ -33,6 +33,7 @@ export const users = sqliteTable(
33
33
  createdAt: text('created_at')
34
34
  .default(sql`CURRENT_TIMESTAMP`)
35
35
  .notNull(),
36
+ updatedAt: text('updated_at').default(sql`CURRENT_TIMESTAMP`),
36
37
  },
37
38
  (t) => [index('users_email_idx').on(t.email)]
38
39
  );
@@ -169,13 +170,12 @@ export const userConcepts = sqliteTable(
169
170
  ]
170
171
  );
171
172
 
172
-
173
173
  export const artifacts = sqliteTable(
174
174
  'artifacts',
175
175
  {
176
176
  id: text('id').primaryKey(),
177
177
  name: text('name').notNull(), // Name of the artifact (e.g., "Cosmic Mirror")
178
- slug: text('slug').notNull(), // Slug of the artifact (e.g., "cosmic-mirror")
178
+ slug: text('slug').notNull().unique(), // Slug of the artifact (e.g., "cosmic-mirror")
179
179
  conceptId: text('concept_id')
180
180
  .notNull()
181
181
  .references(() => concepts.id, { onDelete: 'cascade' }),
@@ -196,11 +196,14 @@ export const userArtifacts = sqliteTable(
196
196
  userId: text('user_id')
197
197
  .notNull()
198
198
  .references(() => users.id, { onDelete: 'cascade' }),
199
+ userConceptId: text('user_concept_id')
200
+ .notNull()
201
+ .references(() => userConcepts.id, { onDelete: 'cascade' }),
199
202
  artifactId: text('artifact_id')
200
203
  .notNull()
201
204
  .references(() => artifacts.id, { onDelete: 'cascade' }),
202
205
  gender: text('gender').notNull(), // Gender of the user or chosen archetype
203
- archetypeId: text('archetype_id').notNull(), // Chosen archetype for the artifact
206
+ archetypeIndex: text('archetype_index').notNull(), // Chosen archetype for the artifact
204
207
  postImageId: text('post_image_id'), // URL for the Instagram post image
205
208
  reelImageId: text('reel_image_id'), // URL for the Instagram reels/TikTok image
206
209
  postImageUrl: text('post_image_url'), // URL for the Instagram post image
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {