Skip to content

Commit 000903b

Browse files
committed
feat(#125): add user seed
1 parent f325ee0 commit 000903b

File tree

63 files changed

+537
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+537
-28
lines changed

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export default tseslint.config(
136136
'perfectionist/sort-sets': ['error', { partitionByComment: true }],
137137
'perfectionist/sort-union-types': ['error', { partitionByComment: true }],
138138
'unicorn/no-null': 'off',
139+
'unicorn/number-literal-case': 'off',
139140
'unicorn/numeric-separators-style': [
140141
'error',
141142
{

projects/app-web-e2e/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@vers/data": ["../lib-data/src"],
1212
"@vers/design-system": ["../lib-design-system/src"],
1313
"@vers/email-templates": ["../lib-email-templates/src"],
14+
"@vers/game-utils": ["../lib-game-utils/src"],
1415
"@vers/idle-client": ["../lib-idle-client/src"],
1516
"@vers/idle-core": ["../lib-idle-core/src"],
1617
"@vers/panda-preset": ["../lib-panda-preset/src"],

projects/app-web/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@vers/data": ["../lib-data/src"],
2020
"@vers/design-system": ["../lib-design-system/src"],
2121
"@vers/email-templates": ["../lib-email-templates/src"],
22+
"@vers/game-utils": ["../lib-game-utils/src"],
2223
"@vers/idle-client": ["../lib-idle-client/src"],
2324
"@vers/idle-core": ["../lib-idle-core/src"],
2425
"@vers/panda-preset": ["../lib-panda-preset/src"],

projects/db-mongo/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"@vers/data": ["../lib-data/src"],
1111
"@vers/design-system": ["../lib-design-system/src"],
1212
"@vers/email-templates": ["../lib-email-templates/src"],
13+
"@vers/game-utils": ["../lib-game-utils/src"],
1314
"@vers/idle-client": ["../lib-idle-client/src"],
1415
"@vers/idle-core": ["../lib-idle-core/src"],
1516
"@vers/panda-preset": ["../lib-panda-preset/src"],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "users" ADD COLUMN "seed" integer DEFAULT 0 NOT NULL;
Lines changed: 348 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,348 @@
1+
{
2+
"id": "7a3eb82b-1ee0-4dd6-ba33-9ddbf22e7c48",
3+
"prevId": "5da6e581-8949-4b33-92a6-2f3052fb3c7e",
4+
"version": "7",
5+
"dialect": "postgresql",
6+
"tables": {
7+
"public.avatars": {
8+
"name": "avatars",
9+
"schema": "",
10+
"columns": {
11+
"class": {
12+
"name": "class",
13+
"type": "avatar_class",
14+
"typeSchema": "public",
15+
"primaryKey": false,
16+
"notNull": true
17+
},
18+
"id": {
19+
"name": "id",
20+
"type": "text",
21+
"primaryKey": true,
22+
"notNull": true
23+
},
24+
"level": {
25+
"name": "level",
26+
"type": "integer",
27+
"primaryKey": false,
28+
"notNull": true,
29+
"default": 1
30+
},
31+
"name": {
32+
"name": "name",
33+
"type": "text",
34+
"primaryKey": false,
35+
"notNull": true
36+
},
37+
"user_id": {
38+
"name": "user_id",
39+
"type": "text",
40+
"primaryKey": false,
41+
"notNull": true
42+
},
43+
"xp": {
44+
"name": "xp",
45+
"type": "integer",
46+
"primaryKey": false,
47+
"notNull": true,
48+
"default": 0
49+
},
50+
"created_at": {
51+
"name": "created_at",
52+
"type": "timestamp",
53+
"primaryKey": false,
54+
"notNull": true,
55+
"default": "now()"
56+
},
57+
"updated_at": {
58+
"name": "updated_at",
59+
"type": "timestamp",
60+
"primaryKey": false,
61+
"notNull": true,
62+
"default": "now()"
63+
}
64+
},
65+
"indexes": {},
66+
"foreignKeys": {
67+
"avatars_user_id_users_id_fk": {
68+
"name": "avatars_user_id_users_id_fk",
69+
"tableFrom": "avatars",
70+
"tableTo": "users",
71+
"columnsFrom": ["user_id"],
72+
"columnsTo": ["id"],
73+
"onDelete": "cascade",
74+
"onUpdate": "cascade"
75+
}
76+
},
77+
"compositePrimaryKeys": {},
78+
"uniqueConstraints": {
79+
"avatars_name_unique": {
80+
"name": "avatars_name_unique",
81+
"nullsNotDistinct": false,
82+
"columns": ["name"]
83+
}
84+
},
85+
"policies": {},
86+
"checkConstraints": {},
87+
"isRLSEnabled": false
88+
},
89+
"public.sessions": {
90+
"name": "sessions",
91+
"schema": "",
92+
"columns": {
93+
"created_at": {
94+
"name": "created_at",
95+
"type": "timestamp",
96+
"primaryKey": false,
97+
"notNull": true,
98+
"default": "now()"
99+
},
100+
"expires_at": {
101+
"name": "expires_at",
102+
"type": "timestamp",
103+
"primaryKey": false,
104+
"notNull": true
105+
},
106+
"id": {
107+
"name": "id",
108+
"type": "text",
109+
"primaryKey": true,
110+
"notNull": true
111+
},
112+
"ip_address": {
113+
"name": "ip_address",
114+
"type": "text",
115+
"primaryKey": false,
116+
"notNull": true
117+
},
118+
"refresh_token": {
119+
"name": "refresh_token",
120+
"type": "text",
121+
"primaryKey": false,
122+
"notNull": false
123+
},
124+
"updated_at": {
125+
"name": "updated_at",
126+
"type": "timestamp",
127+
"primaryKey": false,
128+
"notNull": true,
129+
"default": "now()"
130+
},
131+
"user_id": {
132+
"name": "user_id",
133+
"type": "text",
134+
"primaryKey": false,
135+
"notNull": true
136+
},
137+
"verified": {
138+
"name": "verified",
139+
"type": "boolean",
140+
"primaryKey": false,
141+
"notNull": true,
142+
"default": false
143+
}
144+
},
145+
"indexes": {},
146+
"foreignKeys": {
147+
"sessions_user_id_users_id_fk": {
148+
"name": "sessions_user_id_users_id_fk",
149+
"tableFrom": "sessions",
150+
"tableTo": "users",
151+
"columnsFrom": ["user_id"],
152+
"columnsTo": ["id"],
153+
"onDelete": "cascade",
154+
"onUpdate": "cascade"
155+
}
156+
},
157+
"compositePrimaryKeys": {},
158+
"uniqueConstraints": {},
159+
"policies": {},
160+
"checkConstraints": {},
161+
"isRLSEnabled": false
162+
},
163+
"public.users": {
164+
"name": "users",
165+
"schema": "",
166+
"columns": {
167+
"created_at": {
168+
"name": "created_at",
169+
"type": "timestamp",
170+
"primaryKey": false,
171+
"notNull": true,
172+
"default": "now()"
173+
},
174+
"email": {
175+
"name": "email",
176+
"type": "text",
177+
"primaryKey": false,
178+
"notNull": true
179+
},
180+
"id": {
181+
"name": "id",
182+
"type": "text",
183+
"primaryKey": true,
184+
"notNull": true
185+
},
186+
"name": {
187+
"name": "name",
188+
"type": "text",
189+
"primaryKey": false,
190+
"notNull": true
191+
},
192+
"password_hash": {
193+
"name": "password_hash",
194+
"type": "text",
195+
"primaryKey": false,
196+
"notNull": false
197+
},
198+
"password_reset_token": {
199+
"name": "password_reset_token",
200+
"type": "text",
201+
"primaryKey": false,
202+
"notNull": false
203+
},
204+
"password_reset_token_expires_at": {
205+
"name": "password_reset_token_expires_at",
206+
"type": "timestamp",
207+
"primaryKey": false,
208+
"notNull": false
209+
},
210+
"seed": {
211+
"name": "seed",
212+
"type": "integer",
213+
"primaryKey": false,
214+
"notNull": true,
215+
"default": 0
216+
},
217+
"updated_at": {
218+
"name": "updated_at",
219+
"type": "timestamp",
220+
"primaryKey": false,
221+
"notNull": true,
222+
"default": "now()"
223+
},
224+
"username": {
225+
"name": "username",
226+
"type": "text",
227+
"primaryKey": false,
228+
"notNull": true
229+
}
230+
},
231+
"indexes": {},
232+
"foreignKeys": {},
233+
"compositePrimaryKeys": {},
234+
"uniqueConstraints": {
235+
"users_email_unique": {
236+
"name": "users_email_unique",
237+
"nullsNotDistinct": false,
238+
"columns": ["email"]
239+
},
240+
"users_username_unique": {
241+
"name": "users_username_unique",
242+
"nullsNotDistinct": false,
243+
"columns": ["username"]
244+
}
245+
},
246+
"policies": {},
247+
"checkConstraints": {},
248+
"isRLSEnabled": false
249+
},
250+
"public.verifications": {
251+
"name": "verifications",
252+
"schema": "",
253+
"columns": {
254+
"algorithm": {
255+
"name": "algorithm",
256+
"type": "text",
257+
"primaryKey": false,
258+
"notNull": true
259+
},
260+
"char_set": {
261+
"name": "char_set",
262+
"type": "text",
263+
"primaryKey": false,
264+
"notNull": true
265+
},
266+
"created_at": {
267+
"name": "created_at",
268+
"type": "timestamp",
269+
"primaryKey": false,
270+
"notNull": true,
271+
"default": "now()"
272+
},
273+
"digits": {
274+
"name": "digits",
275+
"type": "integer",
276+
"primaryKey": false,
277+
"notNull": true
278+
},
279+
"expires_at": {
280+
"name": "expires_at",
281+
"type": "timestamp",
282+
"primaryKey": false,
283+
"notNull": false
284+
},
285+
"id": {
286+
"name": "id",
287+
"type": "text",
288+
"primaryKey": true,
289+
"notNull": true
290+
},
291+
"period": {
292+
"name": "period",
293+
"type": "integer",
294+
"primaryKey": false,
295+
"notNull": true
296+
},
297+
"secret": {
298+
"name": "secret",
299+
"type": "text",
300+
"primaryKey": false,
301+
"notNull": true
302+
},
303+
"target": {
304+
"name": "target",
305+
"type": "text",
306+
"primaryKey": false,
307+
"notNull": true
308+
},
309+
"type": {
310+
"name": "type",
311+
"type": "verification_type",
312+
"typeSchema": "public",
313+
"primaryKey": false,
314+
"notNull": true
315+
}
316+
},
317+
"indexes": {},
318+
"foreignKeys": {},
319+
"compositePrimaryKeys": {},
320+
"uniqueConstraints": {},
321+
"policies": {},
322+
"checkConstraints": {},
323+
"isRLSEnabled": false
324+
}
325+
},
326+
"enums": {
327+
"public.avatar_class": {
328+
"name": "avatar_class",
329+
"schema": "public",
330+
"values": ["brute", "scoundrel", "scholar"]
331+
},
332+
"public.verification_type": {
333+
"name": "verification_type",
334+
"schema": "public",
335+
"values": ["2fa", "2fa-setup", "onboarding", "change-email"]
336+
}
337+
},
338+
"schemas": {},
339+
"sequences": {},
340+
"roles": {},
341+
"policies": {},
342+
"views": {},
343+
"_meta": {
344+
"columns": {},
345+
"schemas": {},
346+
"tables": {}
347+
}
348+
}

projects/db-postgres/migrations/meta/_journal.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
"when": 1743577875051,
7979
"tag": "0010_stiff_spiral",
8080
"breakpoints": true
81+
},
82+
{
83+
"idx": 11,
84+
"version": "7",
85+
"when": 1744187991943,
86+
"tag": "0011_nosy_the_stranger",
87+
"breakpoints": true
8188
}
8289
]
8390
}

0 commit comments

Comments
 (0)