syncing examples
This commit is contained in:
@@ -61,6 +61,15 @@ The Comment model's ``create table`` would look like the following:
|
|||||||
PRIMARY KEY (photo_id, comment_id)
|
PRIMARY KEY (photo_id, comment_id)
|
||||||
) WITH CLUSTERING ORDER BY (comment_id DESC)
|
) WITH CLUSTERING ORDER BY (comment_id DESC)
|
||||||
|
|
||||||
|
To sync the models to the database, you may do the following:
|
||||||
|
|
||||||
|
`` code-block:: python
|
||||||
|
|
||||||
|
from cqlengine.management import sync_table
|
||||||
|
sync_table(Person)
|
||||||
|
sync_table(Comment)
|
||||||
|
|
||||||
|
|
||||||
Columns
|
Columns
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user