Skip to content

Commit ad67e51

Browse files
authored
Flying docs (#60)
* Adds cognition project file indicator updates * Adds update for converstion columns * Submodule update
1 parent 7557bf4 commit ad67e51

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

upgrade_logic/business_objects/gateway.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,39 @@
1111
from submodules.model import enums
1212

1313

14+
def gateway_1_15_0() -> bool:
15+
# here, we update data for cognition using the gateway pattern
16+
# as the corresponding database updates (alembic) are managed using the refinery gateway it is
17+
# ensured that these updates are executed at the correct time
18+
__gateway_1_15_0_add_cognition_project_file_defaults()
19+
__gateway_1_15_0_add_cognition_conversation_file_defaults()
20+
return True
21+
22+
23+
def __gateway_1_15_0_add_cognition_project_file_defaults() -> bool:
24+
query = """
25+
UPDATE cognition.project
26+
SET max_file_size_mb = 3,
27+
allow_file_upload = FALSE
28+
WHERE max_file_size_mb IS NULL
29+
"""
30+
general.execute(query)
31+
general.commit()
32+
return True
33+
34+
35+
def __gateway_1_15_0_add_cognition_conversation_file_defaults() -> bool:
36+
query = """
37+
UPDATE cognition.conversation
38+
SET has_tmp_files = FALSE,
39+
archived = FALSE
40+
WHERE has_tmp_files IS NULL
41+
"""
42+
general.execute(query)
43+
general.commit()
44+
return True
45+
46+
1447
def gateway_1_14_0() -> bool:
1548
# here, we update data for cognition using the gateway pattern
1649
# as the corresponding database updates (alembic) are managed using the refinery gateway it is

0 commit comments

Comments
 (0)