Commit d3f821fc authored by Tyler Williamson's avatar Tyler Williamson

Merge branch 'develop' into 'master'

Develop

See merge request !82
parents 61de806c b274b559
Pipeline #166 passed with stages
in 40 seconds
......@@ -19,7 +19,7 @@ def record():
data = Metric(host=request.host, user_agent=request.headers.get('User-Agent'), content_type=request.content_type,
method=request.method, remote_addr=ip_addr, path=request.path,
full_path=request.full_path, scheme=request.scheme, date=date)
full_path=request.full_path, date=date, url=request.url)
add_data(data)
......@@ -50,7 +50,7 @@ class Metric(db.Model):
content_type = db.Column(db.String(50))
method = db.Column(db.String(5))
remote_addr = db.Column(db.String(500))
path = db.Column(db.String(500))
full_path = db.Column(db.String(500))
scheme = db.Column(db.String(10))
path = db.Column(db.String(1000))
full_path = db.Column(db.String(1000))
date = db.Column(db.String(75))
url = db.Column(db.String(1000))
"""Altering column sizes, removing scheme column. Adding url column
Revision ID: b107cf1e99a3
Revises: 794893146afe
Create Date: 2020-08-27 15:26:19.594984
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b107cf1e99a3'
down_revision = '794893146afe'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('metric', schema=None) as batch_op:
batch_op.add_column(sa.Column('url', sa.String(length=1000), nullable=True))
batch_op.drop_column('scheme')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('metric', schema=None) as batch_op:
batch_op.add_column(sa.Column('scheme', sa.VARCHAR(length=10), nullable=True))
batch_op.drop_column('url')
# ### end Alembic commands ###
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment