ibrahimyaacob
ibrahimyaacob11mo ago

What are these tables with * in Schema ?

How do i remove it ??
No description
34 Replies
erquhart
erquhart11mo ago
@ibrahimyaacob that just means you have some tables defined in your schema and some aren't. The ones with asterisks aren't.
ibrahimyaacob
ibrahimyaacobOP11mo ago
sorry for not giving much context, im actually using convex ents for my schema,
erquhart
erquhart11mo ago
You can remove the asterisk by defining the table in your schema.
ibrahimyaacob
ibrahimyaacobOP11mo ago
this is how it looks like
ibrahimyaacob
ibrahimyaacobOP11mo ago
No description
erquhart
erquhart11mo ago
So you didn't mean to create organization and invitation tables right
ibrahimyaacob
ibrahimyaacobOP11mo ago
you see that invitation edge("organization"), this works
erquhart
erquhart11mo ago
oohh...hmm
ibrahimyaacob
ibrahimyaacobOP11mo ago
but if i change it to organizations with s
ibrahimyaacob
ibrahimyaacobOP11mo ago
No description
ibrahimyaacob
ibrahimyaacobOP11mo ago
i got this error
No description
erquhart
erquhart11mo ago
I'm still getting to know Ents, let me check the docs
ibrahimyaacob
ibrahimyaacobOP11mo ago
okay, hope that explains where does *organization is coming from
Michal Srb
Michal Srb11mo ago
My guess is that something wrote into the table without s at the end. If it's the Ents framework it sounds like a bug. What happens if you delete the table (if you can), and rerun your code? (the singular edge will not create a new table, that edge is stored on the document itself, in your case in a field called organizationId)
ibrahimyaacob
ibrahimyaacobOP11mo ago
so i comment out the code for invtiation schema
ibrahimyaacob
ibrahimyaacobOP11mo ago
No description
ibrahimyaacob
ibrahimyaacobOP11mo ago
it didnt go away now both invitation & invitations are marked with *
erquhart
erquhart11mo ago
Maybe looking at the data in the invitation or organization table will give some clues
ibrahimyaacob
ibrahimyaacobOP11mo ago
they're empty no data
erquhart
erquhart11mo ago
have you tried deleting them and they keep showing back up? Otherwise I'd try deleting.
ibrahimyaacob
ibrahimyaacobOP11mo ago
yes, it still there
erquhart
erquhart11mo ago
If you delete the table through the dashboard it doesn't delete?
ibrahimyaacob
ibrahimyaacobOP11mo ago
apparently it doesnt
erquhart
erquhart11mo ago
Just trying to understand what's happening - what happens when you click delete table?
ibrahimyaacob
ibrahimyaacobOP11mo ago
my bad you mean delete from dashboard
erquhart
erquhart11mo ago
right
ibrahimyaacob
ibrahimyaacobOP11mo ago
i thought just comment out the schema code okay i'll try okay everything seems to work
erquhart
erquhart11mo ago
cool cool
ibrahimyaacob
ibrahimyaacobOP11mo ago
i just thougth the table would automatically deleted if i deleted the code lol
erquhart
erquhart11mo ago
Guessing those were created by Ents while you were making changes to your schema
ibrahimyaacob
ibrahimyaacobOP11mo ago
but yeah how ents work with plural and singlular (with "s" and without) are weird
erquhart
erquhart11mo ago
I don't believe it actually cares about singular or plural, that's just the recommended pattern if that makes sense Some relations require a dedicated table to track, and the table is named based on what you pass into .edge()/.edges(). So it's not like Ents is looking at your existing table name and then naming another table with the singular version of your table name. The names are all set by you. At least I think they are, now that I'm reading the Ent schema docs more slowly I'm a little less sure lol
Michal Srb
Michal Srb11mo ago
Yeah others have noted that the default pluralization is weird. I have made changes to the docs to call out how you can control the naming entirely. See https://github.com/xixixao/convex-ents/issues/21 for more details
GitHub
Usability: Table name pluralization in edge() vs edges() is confusi...
I don't think it's very usable to make the table name change pluralization when adding an edge() vs adding an edges(). It seems okay in simple cases: configs: defineEnt({}) .edges("foo...
CodingWithJamal
CodingWithJamal11mo ago
The * simply means you have tables defined that are not being used. Thats the only time i ever see them.

Did you find this page helpful?