allen
allen2y ago

Is there a way to push the code defined

Is there a way to push the code-defined schema and instantiate empty tables in the admin console without executing an insertion via a mutation? (specifically the dev env)
11 Replies
allen
allenOP2y ago
Or possibly to define seed data that would instantiate them? There are some tables I don't wish to have the data base managed by the app (at least for now) and instead manage it via the console. This would also be helpful in bootstrapping new dev environments.
ballingt
ballingt2y ago
You can populate seed data via the CLI convex import command (or paste a row at a time in the dashboard object viewer, or add row modal), but these are currently separate operations from syncing the code-defined schema.
allen
allenOP2y ago
As for pasting - -that was the reason i asked originally. The tables aren't available in the admin console when they are empty, but defined in schema.
ballingt
ballingt2y ago
There's a button to create a table at the top left, but absolutely see how this could be made automatic.
allen
allenOP2y ago
Yeah, seems cumbersome and prone to human error. Thinking through the case of onboarding a new dev and getting their environment provisioned quickly so they can start utilizing the admin immediately once checking out the code and running convex dev. Speaking of the admin and table management... it seems the x-overflow is set to hidden for the data view, making it impossible to see all the columns if they extend past the viewport.
ballingt
ballingt2y ago
Thinking through the case of onboarding a new dev and getting their environment provisioned quickly so they can start utilizing the admin immediately once checking out the code and running convex dev.
On the same page here, the current version of this is that a new dev will not have to define a schema at all: they can create their tables and data manually and start writing queries. But the path for schema-first dev is one we're working on improving — that's the background most of us are coming from.
the x-overflow is set to hidden for the data view, making it impossible to see all the columns if they extend past the viewport.
What browser are you using? If you resize a column to be larger, do you not get a horizontal scroll bar?
allen
allenOP2y ago
I'm on Firefox 110.0. There is no horizontal scroll bars when the columns overflow the container.
ballingt
ballingt2y ago
I see this too, thanks for reporting!
allen
allenOP2y ago
Is there a way to creation relationship fields in the web admin?
ballingt
ballingt2y ago
Yes, you need to use the object editor for this
allen
allenOP2y ago
ah gotcha, didn't realize the javascript input was that snazzy

Did you find this page helpful?