zou 0.19.49__py3-none-any.whl → 0.19.50__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zou/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.19.49"
1
+ __version__ = "0.19.50"
@@ -8,6 +8,10 @@ Create Date: 2024-07-19 15:24:21.064991
8
8
 
9
9
  from alembic import op
10
10
  import sqlalchemy as sa
11
+ from sqlalchemy import orm
12
+ from sqlalchemy.ext.declarative import declarative_base
13
+ from zou.migrations.utils.base import BaseMixin
14
+ from sqlalchemy_utils import UUIDType, ChoiceType
11
15
 
12
16
 
13
17
  # revision identifiers, used by Alembic.
@@ -18,6 +22,65 @@ depends_on = None
18
22
 
19
23
 
20
24
  def upgrade():
25
+ base = declarative_base()
26
+
27
+ TYPES = [
28
+ ("comment", "Comment"),
29
+ ("mention", "Mention"),
30
+ ("assignation", "Assignation"),
31
+ ("reply", "Reply"),
32
+ ("reply-mention", "Reply Mention"),
33
+ ]
34
+
35
+ class Notification(base, BaseMixin):
36
+ """
37
+ A notification is stored each time a comment is posted.
38
+ """
39
+
40
+ __tablename__ = "notification"
41
+ read = sa.Column(sa.Boolean, nullable=False, default=False)
42
+ change = sa.Column(sa.Boolean, nullable=False, default=False)
43
+ type = sa.Column(ChoiceType(TYPES), nullable=False)
44
+ person_id = sa.Column(
45
+ UUIDType(binary=False),
46
+ nullable=False,
47
+ index=True,
48
+ )
49
+ author_id = sa.Column(
50
+ UUIDType(binary=False),
51
+ nullable=False,
52
+ index=True,
53
+ )
54
+ comment_id = sa.Column(
55
+ UUIDType(binary=False),
56
+ nullable=True,
57
+ index=True,
58
+ )
59
+ task_id = sa.Column(
60
+ UUIDType(binary=False),
61
+ nullable=False,
62
+ index=True,
63
+ )
64
+ reply_id = sa.Column(UUIDType(binary=False), nullable=True, index=True)
65
+
66
+ __table_args__ = (
67
+ sa.UniqueConstraint(
68
+ "person_id",
69
+ "author_id",
70
+ "comment_id",
71
+ "reply_id",
72
+ "type",
73
+ name="notification_uc",
74
+ ),
75
+ )
76
+
77
+ bind = op.get_bind()
78
+ session = orm.Session(bind=bind)
79
+ session.query(Notification).where(Notification.type == None).update(
80
+ {Notification.type: "comment"}
81
+ )
82
+ session.commit()
83
+
21
84
  # ### commands auto generated by Alembic - please adjust! ###
22
85
  with op.batch_alter_table("notification", schema=None) as batch_op:
23
86
  batch_op.alter_column(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zou
3
- Version: 0.19.49
3
+ Version: 0.19.50
4
4
  Summary: API to store and manage the data of your animation production
5
5
  Home-page: https://zou.cg-wire.com
6
6
  Author: CG Wire
@@ -40,7 +40,7 @@ Requires-Dist: flask-jwt-extended ==4.6.0
40
40
  Requires-Dist: flask-migrate ==4.0.7
41
41
  Requires-Dist: flask-socketio ==5.3.6
42
42
  Requires-Dist: flask ==3.0.3
43
- Requires-Dist: gazu ==0.10.11
43
+ Requires-Dist: gazu ==0.10.13
44
44
  Requires-Dist: gevent-websocket ==0.10.1
45
45
  Requires-Dist: gevent ==24.2.1
46
46
  Requires-Dist: gunicorn ==22.0.0
@@ -1,4 +1,4 @@
1
- zou/__init__.py,sha256=dHA3ivizZbqkbljCj6i2XUOazCdJZ-Uzexp50egxhIM,24
1
+ zou/__init__.py,sha256=_Gy_AT8DQ-udpLfSZgx_ouKt88H4OjNcTtS35Oi8b7I,24
2
2
  zou/cli.py,sha256=2cDkbEOqp_m9hzBQf5wpxc_h0WjoH8KtxQQMNuREYlc,18201
3
3
  zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
4
4
  zou/event_stream.py,sha256=zgob2dZKray2lxPa11hdRNmOg8XRlKDdRcGdF80ylwg,8245
@@ -374,7 +374,7 @@ zou/migrations/versions/c49e41f1298b_add_previewbackground.py,sha256=7TOXMsEK9YW
374
374
  zou/migrations/versions/c68c2a62cfac_add_mimetype_column_to_attachment.py,sha256=cEFnRMYHurag8D9-7ycE34gnVH5TdsDfRYQqs5v_g8M,727
375
375
  zou/migrations/versions/c726b98be194_.py,sha256=nbqWFmPg4OUCL-txrVjWyQiFm_PuuaDZeE2gOB-DM3w,701
376
376
  zou/migrations/versions/c81f3e83bdb5_.py,sha256=eGoGIOImywjBRSqe-isbt_N_o3zK1ktrPWSo0nyAXgA,720
377
- zou/migrations/versions/ca28796a2a62_add_is_done_field_to_the_task_model.py,sha256=EEgoF4mI3_Yd0vcyHeyzMTRoz5g6yOV80R9EvB0MDAs,1207
377
+ zou/migrations/versions/ca28796a2a62_add_is_done_field_to_the_task_model.py,sha256=adalMYr3AvOEpPR5V1nj6QxsVJUz-44VYaGnHM_tQyA,3046
378
378
  zou/migrations/versions/cf3d365de164_add_entity_version_model.py,sha256=n3k3ojRQAk0tJAOBIUgDEoZbNFERx4vs3hg5hrFm7v4,1763
379
379
  zou/migrations/versions/cf6cec6d6bf5_add_status_field_to_preview_file.py,sha256=0c8_OghAaaM0R6bKbs7MADvOkZ1sFE3SVp_nNB2ACgQ,950
380
380
  zou/migrations/versions/d80267806131_task_status_new_column_is_default.py,sha256=7HtK0bfBUh9MrJIbpUgz6S-Ye_R_4DbHILpODMBVVwE,2610
@@ -408,9 +408,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
408
408
  zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
409
409
  zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
410
410
  zou/utils/movie.py,sha256=u9LCEOvmkxwm-KiZ6jKNdB9LSC6XXUDwJpVx8LkDwJg,16416
411
- zou-0.19.49.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
412
- zou-0.19.49.dist-info/METADATA,sha256=zUBRGCacwhZP0FDXgogBUhhRG4TT7wJs5kVPnqFhcsg,6725
413
- zou-0.19.49.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
414
- zou-0.19.49.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
415
- zou-0.19.49.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
416
- zou-0.19.49.dist-info/RECORD,,
411
+ zou-0.19.50.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
412
+ zou-0.19.50.dist-info/METADATA,sha256=QQwGEWHpVwuuwp5RgWo0k6rFY2flwv1AHlRLtDDJ4xo,6725
413
+ zou-0.19.50.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
414
+ zou-0.19.50.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
415
+ zou-0.19.50.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
416
+ zou-0.19.50.dist-info/RECORD,,
File without changes
File without changes