Skip to content

Commit 0899e2e

Browse files
feat(seeder): add file seeds for web
1 parent ae520ee commit 0899e2e

File tree

1 file changed

+10
-0
lines changed
  • backend/explorer/infrastructure/db

1 file changed

+10
-0
lines changed

backend/explorer/infrastructure/db/seed.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ await db.execute(sql`
8181
INSERT INTO files (id, folder_id, name, ext, size)
8282
SELECT gen_random_uuid(), id, 'guide', 'pdf', 512000
8383
FROM folders WHERE path = 'infokes.projects.web.user_manual'::ltree;
84+
85+
-- user_manual: index.html
86+
INSERT INTO files (id, folder_id, name, ext, size)
87+
SELECT gen_random_uuid(), id, 'index', 'html', 3072
88+
FROM folders WHERE path = 'infokes.projects.web'::ltree;
89+
90+
-- user_manual: index.ts
91+
INSERT INTO files (id, folder_id, name, ext, size)
92+
SELECT gen_random_uuid(), id, 'index', 'ts', 4096
93+
FROM folders WHERE path = 'infokes.projects.web'::ltree;
8494
`);
8595

8696
console.log('✅ Seed done');

0 commit comments

Comments
 (0)