Skip to content

Commit 2d1f3a8

Browse files
toiroakrclaude
andcommitted
chore: add migration 0008 for new types and fields
Add migration for: - ProfileComment type (n-1 relation to NestedProfile) - ProfileDetail type (1-1 relation to NestedProfile) - NestedProfile.ownerID field (n-1 relation to User) - NestedProfile.avatar file field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8c4daf5 commit 2d1f3a8

1 file changed

Lines changed: 107 additions & 0 deletions

File tree

example/migrations/0008/diff.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"version": 1,
3+
"namespace": "tailordb",
4+
"createdAt": "2026-02-05T02:04:29.299Z",
5+
"changes": [
6+
{
7+
"kind": "type_added",
8+
"typeName": "ProfileComment",
9+
"after": {
10+
"name": "ProfileComment",
11+
"fields": {
12+
"id": {
13+
"type": "uuid",
14+
"required": true
15+
},
16+
"content": {
17+
"type": "string",
18+
"required": true
19+
},
20+
"profileID": {
21+
"type": "uuid",
22+
"required": true,
23+
"index": true,
24+
"foreignKey": true,
25+
"foreignKeyType": "NestedProfile",
26+
"foreignKeyField": "id"
27+
},
28+
"createdAt": {
29+
"type": "datetime",
30+
"required": true
31+
},
32+
"updatedAt": {
33+
"type": "datetime",
34+
"required": false
35+
}
36+
},
37+
"pluralForm": "ProfileComments",
38+
"description": "Comment on a profile",
39+
"settings": {}
40+
}
41+
},
42+
{
43+
"kind": "type_added",
44+
"typeName": "ProfileDetail",
45+
"after": {
46+
"name": "ProfileDetail",
47+
"fields": {
48+
"id": {
49+
"type": "uuid",
50+
"required": true
51+
},
52+
"bio": {
53+
"type": "string",
54+
"required": false
55+
},
56+
"profileID": {
57+
"type": "uuid",
58+
"required": true,
59+
"index": true,
60+
"unique": true,
61+
"foreignKey": true,
62+
"foreignKeyType": "NestedProfile",
63+
"foreignKeyField": "id"
64+
},
65+
"createdAt": {
66+
"type": "datetime",
67+
"required": true
68+
},
69+
"updatedAt": {
70+
"type": "datetime",
71+
"required": false
72+
}
73+
},
74+
"pluralForm": "ProfileDetails",
75+
"description": "Additional detail for a profile",
76+
"settings": {}
77+
}
78+
},
79+
{
80+
"kind": "field_added",
81+
"typeName": "NestedProfile",
82+
"fieldName": "ownerID",
83+
"after": {
84+
"type": "uuid",
85+
"required": false,
86+
"index": true,
87+
"foreignKey": true,
88+
"foreignKeyType": "User",
89+
"foreignKeyField": "id"
90+
}
91+
},
92+
{
93+
"kind": "type_modified",
94+
"typeName": "NestedProfile",
95+
"reason": "File field \"avatar\" added",
96+
"before": {},
97+
"after": {
98+
"files": {
99+
"avatar": "profile avatar image"
100+
}
101+
}
102+
}
103+
],
104+
"hasBreakingChanges": false,
105+
"breakingChanges": [],
106+
"requiresMigrationScript": false
107+
}

0 commit comments

Comments
 (0)