mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 18:55:18 +01:00
Merge pull request #3594 from ninjadq/migrator_1_2_0_rc_to_1_3_0
fix issue when upgrade from 1.2.0rc1 to 1.3.0
This commit is contained in:
commit
327ea1c530
@ -39,6 +39,11 @@ def upgrade():
|
|||||||
bind = op.get_bind()
|
bind = op.get_bind()
|
||||||
session = Session(bind=bind)
|
session = Session(bind=bind)
|
||||||
|
|
||||||
|
# This is to solve the legacy issue when upgrade from 1.2.0rc1 to 1.3.0 refered by #3077
|
||||||
|
username_coloumn = session.execute("show columns from user where field='username'").fetchone()
|
||||||
|
if username_coloumn[1] != 'varchar(255)':
|
||||||
|
op.alter_column('user', 'username', type_=sa.String(255))
|
||||||
|
|
||||||
# create table project_metadata
|
# create table project_metadata
|
||||||
ProjectMetadata.__table__.create(bind)
|
ProjectMetadata.__table__.create(bind)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user