Database Class default Columns

Hi, its me again :slight_smile:

i got a question about the Database. So as i hopefully understand right, the Database Classes, lets say AvaxTransactions is generated once a user with acutal AvaxTransactions somehow connects to Moralis.
Same for the AvaxTokenTransactions Class… and any other Blockchain.

What if i need more columns at these Classes? Like i need them “instantly” once these Classes are created in the Database. I dont want to add them manually after them got created.

So is there a way to be able, that this column is added automatically once the Class is created?

Greetings

the database is mongo db, it doesn’t really have columns in reality (a row is more like a json object), if you add them in the dashboard interface it will appear in the dashboard interface, if you want to set them some value you can use beforeSave or afterSave hook

1 Like

ohhh i understand, so like i just can add to my object whatever i want to, the dashboard will show it, as it “just reads a json object”

something like that, you will also have to add that column in the dashboard so that it knows what for to look in that json object

is there a difference in the classes for testnets and mainnets? or are they created with the same name, so i can just create everything beforehand with the testnet, and switch over to the mainnet later on, without need to rename classes or in my application?

they should have the same name, if you don’t change the chain like from BSC to ETH

obviously. cool thx yeah i mean i will use all the chains moralis is supporting, so i just need every class to be created to i can access it from my main application. Thx for the explanation, great as always.