@zodic/shared 0.0.355 → 0.0.357
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
CHANGED
|
@@ -532,6 +532,27 @@ export const tokens = sqliteTable(
|
|
|
532
532
|
]
|
|
533
533
|
);
|
|
534
534
|
|
|
535
|
+
export const cosmicMirrorImages = sqliteTable(
|
|
536
|
+
'cosmic_mirror_images',
|
|
537
|
+
{
|
|
538
|
+
id: text('id').primaryKey(), // Format: "cosmic-mirror:{userArtifactId}:{imageId}"
|
|
539
|
+
userArtifactId: text('user_artifact_id')
|
|
540
|
+
.notNull()
|
|
541
|
+
.references(() => userArtifacts.id, { onDelete: 'cascade' }),
|
|
542
|
+
leonardoId: text('leonardo_id').notNull(), // ID from Leonardo
|
|
543
|
+
url: text('url').notNull(), // Image URL
|
|
544
|
+
width: integer('width').notNull(),
|
|
545
|
+
height: integer('height').notNull(),
|
|
546
|
+
generationType: text('generation_type').notNull(), // 'characterOnly' or 'contentCharacter'
|
|
547
|
+
timestamp: integer('timestamp', { mode: 'timestamp' }).notNull(),
|
|
548
|
+
...timestampFields,
|
|
549
|
+
},
|
|
550
|
+
(t) => [
|
|
551
|
+
index('cosmic_mirror_images_user_artifact_idx').on(t.userArtifactId),
|
|
552
|
+
index('cosmic_mirror_images_type_idx').on(t.generationType),
|
|
553
|
+
]
|
|
554
|
+
);
|
|
555
|
+
|
|
535
556
|
export const logs = sqliteTable(
|
|
536
557
|
'logs',
|
|
537
558
|
{
|