@zodic/shared 0.0.20 → 0.0.22

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.
@@ -36,6 +36,20 @@
36
36
  "when": 1737649768416,
37
37
  "tag": "0004_light_masked_marvel",
38
38
  "breakpoints": true
39
+ },
40
+ {
41
+ "idx": 5,
42
+ "version": "6",
43
+ "when": 1737650810571,
44
+ "tag": "0005_silky_dagger",
45
+ "breakpoints": true
46
+ },
47
+ {
48
+ "idx": 6,
49
+ "version": "6",
50
+ "when": 1737651252070,
51
+ "tag": "0006_low_silver_centurion",
52
+ "breakpoints": true
39
53
  }
40
54
  ]
41
55
  }
package/db/schema.ts CHANGED
@@ -161,7 +161,7 @@ export const userConcepts = sqliteTable(
161
161
  conceptCombinationId: text('concept_combination_id')
162
162
  .notNull()
163
163
  .references(() => conceptCombinations.id, { onDelete: 'cascade' }),
164
- ...timestampFields,
164
+ ...timestampFields,
165
165
  },
166
166
  (t) => [
167
167
  index('user_concepts_user_id_idx').on(t.userId),
@@ -212,7 +212,7 @@ export const userArtifacts = sqliteTable(
212
212
  status: text('status')
213
213
  .default('pending') // Possible statuses: 'pending', 'post_ready', 'reel_ready', 'completed'
214
214
  .notNull(),
215
- ...timestampFields,
215
+ ...timestampFields,
216
216
  },
217
217
  (t) => [
218
218
  index('user_artifacts_user_id_idx').on(t.userId),
@@ -225,12 +225,11 @@ export const generations = sqliteTable(
225
225
  'generations',
226
226
  {
227
227
  id: text('id').primaryKey(), // generationId from Leonardo
228
- userId: text('user_id')
229
- .notNull()
230
- .references(() => users.id, { onDelete: 'cascade' }),
228
+ userId: text('user_id').references(() => users.id, { onDelete: 'cascade' }),
231
229
  artifactId: text('artifact_id').references(() => artifacts.id, {
232
230
  onDelete: 'cascade',
233
231
  }),
232
+ archetypeIndex: integer('archetype_index'),
234
233
  userArtifactId: text('user_artifact_id').references(
235
234
  () => userArtifacts.id,
236
235
  { onDelete: 'cascade' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -10,7 +10,8 @@
10
10
  "migrate-latest-test": "wrangler d1 execute DB --file=$(ls -t ./db/migrations/*.sql | head -n 1)",
11
11
  "migrate-latest": "wrangler d1 execute DB --file=$(ls -t ./db/migrations/*.sql | head -n 1) --remote",
12
12
  "db:generate": "drizzle-kit generate",
13
- "db:up": "drizzle-kit up"
13
+ "db:up": "drizzle-kit up",
14
+ "db:all": "npm run db:generate && npm run db:up && npm run migrate-latest && npm publish"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@types/inversify": "^2.0.33",