You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
468 B
Python
14 lines
468 B
Python
from database.config import DATABASE_TYPE
|
|
from database.models.components.progress_step import ProgressStep
|
|
from database.models.components.sqlite_middlewares import JSONField
|
|
from playhouse.postgres_ext import BinaryJSONField
|
|
|
|
|
|
class UserStories(ProgressStep):
|
|
if DATABASE_TYPE == 'postgres':
|
|
user_stories = BinaryJSONField()
|
|
else:
|
|
user_stories = JSONField() # Custom JSON field for SQLite
|
|
class Meta:
|
|
table_name = 'user_stories'
|