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
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
Commits
4b0bd082
Commit
4b0bd082
authored
4 years ago
by
kaiyou
Browse files
Options
Downloads
Patches
Plain Diff
Add a profile status transition field
parent
796f5202
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!20
Add 'remember me' button
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/dfaca8ae3426_add_profile_transition.py
+27
-0
27 additions, 0 deletions
migrations/versions/dfaca8ae3426_add_profile_transition.py
with
28 additions
and
0 deletions
hiboo/models.py
+
1
−
0
View file @
4b0bd082
...
...
@@ -194,6 +194,7 @@ class Profile(db.Model):
username
=
db
.
Column
(
db
.
String
(
255
),
nullable
=
False
)
status
=
db
.
Column
(
db
.
String
(
25
),
nullable
=
False
)
transition
=
db
.
Column
(
db
.
String
(
25
))
extra
=
db
.
Column
(
mutable
.
MutableDict
.
as_mutable
(
JSONEncoded
))
@property
...
...
This diff is collapsed.
Click to expand it.
migrations/versions/dfaca8ae3426_add_profile_transition.py
0 → 100644
+
27
−
0
View file @
4b0bd082
"""
Add a state transition for profiles
Revision ID: dfaca8ae3426
Revises: 665cdee2f311
Create Date: 2020-08-26 17:39:20.285881
"""
from
alembic
import
op
import
sqlalchemy
as
sa
import
hiboo
revision
=
'
dfaca8ae3426
'
down_revision
=
'
665cdee2f311
'
branch_labels
=
None
depends_on
=
None
def
upgrade
():
with
op
.
batch_alter_table
(
'
profile
'
)
as
batch_op
:
batch_op
.
add_column
(
sa
.
Column
(
'
transition
'
,
sa
.
String
(
length
=
25
),
nullable
=
True
))
def
downgrade
():
with
op
.
batch_alter_table
(
'
profile
'
)
as
batch_op
:
batch_op
.
drop_column
(
'
transition
'
)
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