fixing the default value on the example partition key
This commit is contained in:
@@ -27,7 +27,7 @@ from cqlengine.models import Model
|
||||
|
||||
class ExampleModel(Model):
|
||||
read_repair_chance = 0.05 # optional - defaults to 0.1
|
||||
example_id = columns.UUID(primary_key=True)
|
||||
example_id = columns.UUID(primary_key=True, default=uuid.uuid4)
|
||||
example_type = columns.Integer(index=True)
|
||||
created_at = columns.DateTime()
|
||||
description = columns.Text(required=False)
|
||||
|
||||
@@ -36,7 +36,7 @@ Getting Started
|
||||
from cqlengine import Model
|
||||
|
||||
class ExampleModel(Model):
|
||||
example_id = columns.UUID(primary_key=True)
|
||||
example_id = columns.UUID(primary_key=True, default=uuid.uuid4)
|
||||
example_type = columns.Integer(index=True)
|
||||
created_at = columns.DateTime()
|
||||
description = columns.Text(required=False)
|
||||
|
||||
Reference in New Issue
Block a user