File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
apps/docs/content/guides/cli Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -71,18 +71,20 @@ You can use the Snaplet configuration file `seed.mts` to define the values you w
7171import { createSeedClient } from ' @snaplet/seed'
7272import { copycat } from ' @snaplet/copycat'
7373
74- const seed = await createSeedClient ();
75-
76- await seed .posts ([{
77- title: " There is a lot of snow around here!"
78- createdBy : {
79- email : (ctx ) =>
80- copycat .email (ctx .seed , {
81- domain: ' acme.org' ,
82- })
74+ const seed = await createSeedClient ()
75+
76+ await seed .posts ([
77+ {
78+ title: ' There is a lot of snow around here!' ,
79+ createdBy: {
80+ email : (ctx ) =>
81+ copycat .email (ctx .seed , {
82+ domain: ' acme.org' ,
83+ }),
84+ },
85+ comments : (x ) => x (3 ),
8386 },
84- comments : (x ) => x (3 )
85- }])
87+ ])
8688```
8789
8890Running ` npx tsx seed.mts > supabase/seed.sql ` generates the relevant SQL statements inside your ` supabase/seed.sql ` file:
You can’t perform that action at this time.
0 commit comments