Skip to content

Commit 772719e

Browse files
committed
fix: fixed local db
1 parent 5e011f1 commit 772719e

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

common/src/db/migrations/0022_whole_juggernaut.sql renamed to common/src/db/migrations/0022_graceful_titanium_man.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CREATE TABLE IF NOT EXISTS "agent_template" (
2-
"id" text,
2+
"id" text NOT NULL,
33
"version" text NOT NULL,
44
"publisher_id" text NOT NULL,
55
"major" integer GENERATED ALWAYS AS (CAST(SPLIT_PART("agent_template"."version", '.', 1) AS INTEGER)) STORED,

common/src/db/migrations/meta/0022_snapshot.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "c146ca44-468f-494f-9719-e6881f45e907",
2+
"id": "4f20a67c-89c7-4a7c-abff-8907b1db6682",
33
"prevId": "6b134fd1-0feb-4e1a-9dfe-57d36b605348",
44
"version": "7",
55
"dialect": "postgresql",
@@ -113,7 +113,7 @@
113113
"name": "id",
114114
"type": "text",
115115
"primaryKey": false,
116-
"notNull": false
116+
"notNull": true
117117
},
118118
"version": {
119119
"name": "version",

common/src/db/migrations/meta/_journal.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@
159159
{
160160
"idx": 22,
161161
"version": "7",
162-
"when": 1753410608165,
163-
"tag": "0022_whole_juggernaut",
162+
"when": 1753833343254,
163+
"tag": "0022_graceful_titanium_man",
164164
"breakpoints": true
165165
}
166166
]

common/src/db/schema.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ export const gitEvalResults = pgTable('git_eval_results', {
423423
export const publisher = pgTable('publisher', {
424424
id: text('id')
425425
.primaryKey()
426+
.notNull()
426427
.$defaultFn(() => crypto.randomUUID()),
427428
slug: text('slug').unique().notNull(), // for store reference
428429
name: text('name').notNull(),
@@ -441,7 +442,9 @@ export const publisher = pgTable('publisher', {
441442
export const agentTemplate = pgTable(
442443
'agent_template',
443444
{
444-
id: text('id').$defaultFn(() => crypto.randomUUID()),
445+
id: text('id')
446+
.notNull()
447+
.$defaultFn(() => crypto.randomUUID()),
445448
version: text('version').notNull(), // Semantic version e.g., '1.0.0'
446449
publisher_id: text('publisher_id')
447450
.notNull()

0 commit comments

Comments
 (0)