Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Hiboo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
cyrinux
Hiboo
Commits
ddbe34c6
Commit
ddbe34c6
authored
4 years ago
by
kaiyou
Browse files
Options
Downloads
Patches
Plain Diff
Add a server_status field to profiles
parent
30c320c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hiboo/models.py
+1
-0
1 addition, 0 deletions
hiboo/models.py
migrations/versions/99634916f37f_add_server_status.py
+26
-0
26 additions, 0 deletions
migrations/versions/99634916f37f_add_server_status.py
with
27 additions
and
0 deletions
hiboo/models.py
+
1
−
0
View file @
ddbe34c6
...
...
@@ -216,6 +216,7 @@ class Profile(db.Model):
username
=
db
.
Column
(
db
.
String
(
255
),
nullable
=
False
)
status
=
db
.
Column
(
db
.
String
(
25
),
nullable
=
False
)
server_status
=
db
.
Column
(
db
.
String
(
25
))
transition
=
db
.
Column
(
db
.
String
(
25
))
transition_step
=
db
.
Column
(
db
.
String
(
25
))
extra
=
db
.
Column
(
mutable
.
MutableDict
.
as_mutable
(
JSONEncoded
))
...
...
This diff is collapsed.
Click to expand it.
migrations/versions/99634916f37f_add_server_status.py
0 → 100644
+
26
−
0
View file @
ddbe34c6
"""
Add the ability to store a profile server status
Revision ID: 99634916f37f
Revises: 05d7115e90f9
Create Date: 2020-12-16 18:23:39.813366
"""
from
alembic
import
op
import
sqlalchemy
as
sa
import
hiboo
revision
=
'
99634916f37f
'
down_revision
=
'
05d7115e90f9
'
branch_labels
=
None
depends_on
=
None
def
upgrade
():
with
op
.
batch_alter_table
(
'
profile
'
)
as
batch_op
:
batch_op
.
add_column
(
sa
.
Column
(
'
server_status
'
,
sa
.
String
(
length
=
25
),
nullable
=
True
))
def
downgrade
():
with
op
.
batch_alter_table
(
'
profile
'
)
as
batch_op
:
batch_op
.
drop_column
(
'
server_status
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment