update user realname

update
This commit is contained in:
wangyan 2017-07-05 03:34:40 -07:00
parent d849c36e3f
commit bdf4641c43
2 changed files with 4 additions and 1 deletions

View File

@ -44,4 +44,5 @@ Changelog for harbor database schema
- delete column `user_id` from table `access_log`
- delete foreign key (user_id) references user(user_id)from table `access_log`
- delete foreign key (project_id) references project(project_id)from table `access_log`
- add column `username` varchar (32) to table `access_log`
- add column `username` varchar (32) to table `access_log`
- alter column `realname` on table `user`: varchar(20)->varchar(255)

View File

@ -38,6 +38,8 @@ def upgrade():
"""
bind = op.get_bind()
session = Session(bind=bind)
op.alter_column('user', 'realname', type_=sa.String(255), existing_type=sa.String(20))
#delete column access_log.user_id(access_log_ibfk_1), access_log.project_id(access_log_ibfk_2)
op.drop_constraint('access_log_ibfk_1', 'access_log', type_='foreignkey')