Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
fee8a868
Commit
fee8a868
authored
Mar 07, 2024
by
takatost
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify migrations
parent
ea883b5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
42e85ed5564d_conversation_columns_set_nullable.py
...ersions/42e85ed5564d_conversation_columns_set_nullable.py
+48
-0
b289e2408ee2_add_workflow.py
api/migrations/versions/b289e2408ee2_add_workflow.py
+0
-2
No files found.
api/migrations/versions/42e85ed5564d_conversation_columns_set_nullable.py
0 → 100644
View file @
fee8a868
"""conversation columns set nullable
Revision ID: 42e85ed5564d
Revises: f9107f83abab
Create Date: 2024-03-07 08:30:29.133614
"""
import
sqlalchemy
as
sa
from
alembic
import
op
from
sqlalchemy.dialects
import
postgresql
# revision identifiers, used by Alembic.
revision
=
'42e85ed5564d'
down_revision
=
'f9107f83abab'
branch_labels
=
None
depends_on
=
None
def
upgrade
():
# ### commands auto generated by Alembic - please adjust! ###
with
op
.
batch_alter_table
(
'conversations'
,
schema
=
None
)
as
batch_op
:
batch_op
.
alter_column
(
'app_model_config_id'
,
existing_type
=
postgresql
.
UUID
(),
nullable
=
True
)
batch_op
.
alter_column
(
'model_provider'
,
existing_type
=
sa
.
VARCHAR
(
length
=
255
),
nullable
=
True
)
batch_op
.
alter_column
(
'model_id'
,
existing_type
=
sa
.
VARCHAR
(
length
=
255
),
nullable
=
True
)
# ### end Alembic commands ###
def
downgrade
():
# ### commands auto generated by Alembic - please adjust! ###
with
op
.
batch_alter_table
(
'conversations'
,
schema
=
None
)
as
batch_op
:
batch_op
.
alter_column
(
'model_id'
,
existing_type
=
sa
.
VARCHAR
(
length
=
255
),
nullable
=
False
)
batch_op
.
alter_column
(
'model_provider'
,
existing_type
=
sa
.
VARCHAR
(
length
=
255
),
nullable
=
False
)
batch_op
.
alter_column
(
'app_model_config_id'
,
existing_type
=
postgresql
.
UUID
(),
nullable
=
False
)
# ### end Alembic commands ###
api/migrations/versions/b289e2408ee2_add_workflow.py
View file @
fee8a868
...
...
@@ -78,8 +78,6 @@ def upgrade():
sa
.
Column
(
'error'
,
sa
.
Text
(),
nullable
=
True
),
sa
.
Column
(
'elapsed_time'
,
sa
.
Float
(),
server_default
=
sa
.
text
(
'0'
),
nullable
=
False
),
sa
.
Column
(
'total_tokens'
,
sa
.
Integer
(),
server_default
=
sa
.
text
(
'0'
),
nullable
=
False
),
sa
.
Column
(
'total_price'
,
sa
.
Numeric
(
precision
=
10
,
scale
=
7
),
nullable
=
True
),
sa
.
Column
(
'currency'
,
sa
.
String
(
length
=
255
),
nullable
=
True
),
sa
.
Column
(
'total_steps'
,
sa
.
Integer
(),
server_default
=
sa
.
text
(
'0'
),
nullable
=
True
),
sa
.
Column
(
'created_by_role'
,
sa
.
String
(
length
=
255
),
nullable
=
False
),
sa
.
Column
(
'created_by'
,
postgresql
.
UUID
(),
nullable
=
False
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment