Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

kingjaga28_177573 avatar image
kingjaga28_177573 asked ·

Can anyone please suggest the example for schema definition and migration in NodeJS for Cassandra? , like mongoose for MongoDB

schema migration
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I'm guessing you've seen the nodejs driver docs here: https://github.com/datastax/nodejs-driver/tree/master/doc/getting-started is there something in particular you're looking for?

1 Like 1 · ·

This one I saw. But there is no information about how to define a schema.

I can see only connection and query execution there

0 Likes 0 · ·

1 Answer

markc avatar image
markc answered ·

Ok so the driver should be compatible with normal CQL3 commands as per FAQ docs here says:

https://github.com/datastax/nodejs-driver/tree/master/doc/faq

>Which versions of CQL does the driver support?

>It supports CQL version 3.

So you should be able to use a normal create table statement. Note one word of caution when doing schema changes programmatically - dont throw those in like you would normal writes. They need to be done less frequently and with more care.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.