migration: make auth_token for builds nullable
This commit is contained in:
parent
998c6007cd
commit
da15eda2bf
2 changed files with 31 additions and 1 deletions
|
@ -378,7 +378,7 @@ class RepositoryBuildTrigger(BaseModel):
|
|||
service = ForeignKeyField(BuildTriggerService, index=True)
|
||||
repository = ForeignKeyField(Repository, index=True)
|
||||
connected_user = QuayUserField()
|
||||
auth_token = CharField()
|
||||
auth_token = CharField(null=True)
|
||||
private_key = TextField(null=True)
|
||||
config = TextField(default='{}')
|
||||
write_token = ForeignKeyField(AccessToken, null=True)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
"""make auth_token nullable
|
||||
|
||||
Revision ID: 3fee6f979c2a
|
||||
Revises: 31288f79df53
|
||||
Create Date: 2015-03-27 11:11:24.046996
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3fee6f979c2a'
|
||||
down_revision = '31288f79df53'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
def upgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('repositorybuildtrigger', 'auth_token',
|
||||
existing_type=mysql.VARCHAR(length=255),
|
||||
nullable=True)
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade(tables):
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('repositorybuildtrigger', 'auth_token',
|
||||
existing_type=mysql.VARCHAR(length=255),
|
||||
nullable=False)
|
||||
### end Alembic commands ###
|
Reference in a new issue