Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Hiboo
Manage
Activity
Members
Labels
Plan
Issues
36
Issue boards
Milestones
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACIDES
Hiboo
Merge requests
!93
fix: KeyError at profile creation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix: KeyError at profile creation
145-keyerror-a-la-creation-d-un-nouveau-profile
into
dev
Overview
1
Commits
1
Pipelines
2
Changes
1
Merged
f00wl
requested to merge
145-keyerror-a-la-creation-d-un-nouveau-profile
into
dev
4 months ago
Overview
1
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#145 (closed)
👍
0
👎
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
9888638c
1 commit,
4 months ago
1 file
+
46
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
migrations/versions/0147b747696e_set_default_service_profile_format.py
0 → 100644
+
46
−
0
Options
"""
update and set empty service.profile_format to server_default
'
lowercase
'
Revision ID: 0147b747696e
Revises: f9130c1a10f7
Create Date: 2024-09-30 18:10:42.200989
"""
from
alembic
import
op
import
sqlalchemy
as
sa
import
hiboo
revision
=
"
0147b747696e
"
down_revision
=
"
f9130c1a10f7
"
branch_labels
=
None
depends_on
=
None
service_table
=
sa
.
Table
(
"
service
"
,
sa
.
MetaData
(),
sa
.
Column
(
"
profile_format
"
,
sa
.
String
(
length
=
255
))
)
def
upgrade
():
with
op
.
batch_alter_table
(
"
service
"
)
as
batch_op
:
batch_op
.
alter_column
(
"
profile_format
"
,
existing_type
=
sa
.
String
(
length
=
255
),
server_default
=
"
lowercase
"
,
nullable
=
False
,
)
connection
=
op
.
get_bind
()
connection
.
execute
(
service_table
.
update
()
.
where
(
service_table
.
c
.
profile_format
==
""
)
.
values
(
profile_format
=
"
lowercase
"
)
)
def
downgrade
():
with
op
.
batch_alter_table
(
"
service
"
)
as
batch_op
:
batch_op
.
alter_column
(
"
profile_format
"
,
existing_type
=
sa
.
String
(
length
=
255
),
server_default
=
None
,
nullable
=
True
,
)
Loading