Unverified Commit b4697995 authored by Peter Stanko's avatar Peter Stanko
Browse files

Upgraded migrations and fixed db.Column

parent f594d2b6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
FROM kontr2/base-pipenv

LABEL maintainer="Barbora Kompisova"

RUN apk add --update --no-cache g++ gcc libxslt-dev postgresql-dev postgresql-libs openldap-dev python3-dev

ADD . /app
+4 −3
Original line number Diff line number Diff line
"""empty message

Revision ID: 38031726c9b7
Revision ID: e97b256e67e0
Revises: 
Create Date: 2018-09-02 13:40:56.387248
Create Date: 2018-09-02 14:47:00.204184

"""
from alembic import op
@@ -10,7 +10,7 @@ import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '38031726c9b7'
revision = 'e97b256e67e0'
down_revision = None
branch_labels = None
depends_on = None
@@ -103,6 +103,7 @@ def upgrade():
    sa.Column('name', sa.String(length=30), nullable=False),
    sa.Column('url', sa.String(length=250), nullable=False),
    sa.Column('tags', sa.Text(), nullable=True),
    sa.Column('portal_secret', sa.String(length=64), nullable=True),
    sa.Column('state', sa.Enum('CREATED', 'READY', 'STOPPED', name='WorkerState'), nullable=False),
    sa.ForeignKeyConstraint(['id'], ['client.id'], ),
    sa.PrimaryKeyConstraint('id'),
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ FRONTEND_URL = "http://kontr.pstanko.net/gitlabLogin"
# URI to connect to the database
# if 'sqlite://' - the in memory database will be used
#SQLALCHEMY_DATABASE_URI = f"sqlite:////{ROOT_DIR}/devel.db"
#SQLALCHEMY_DATABASE_URI = f"postgresql://postgres:postgres@localhost:5432/postgres"
SQLALCHEMY_DATABASE_URI = f"postgresql://postgres:postgres@localhost:5432/postgres"
#SQLALCHEMY_ECHO=False
#SQLALCHEMY_RECORD_QUERIES

+1 −1
Original line number Diff line number Diff line
@@ -976,7 +976,7 @@ class Worker(EntityBase, Client):
    name = db.Column(db.String(30), nullable=False, unique=True)
    url = db.Column(db.String(250), nullable=False)
    tags = db.Column(db.Text())  # set by a Worker at init
    portal_secret = db.String(64)  # set by a Worker at init
    portal_secret = db.Column(db.String(64))  # set by a Worker at init
    state = db.Column(db.Enum(WorkerState, name='WorkerState'), nullable=False)

    __mapper_args__ = {