Unverified Commit 3057ba5a authored by Dylan Jones's avatar Dylan Jones
Browse files

coldness

parent ae28fea1
"""add coldness
Revision ID: f0d89367cd54
Revises: 24dfd0eb9da6
Create Date: 2020-02-16 19:24:40.144498
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f0d89367cd54'
down_revision = '24dfd0eb9da6'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('category', sa.Column('icon', sa.String(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('category', 'icon')
# ### end Alembic commands ###
......@@ -26,9 +26,12 @@ def test_data():
session.query(sa.Point).delete()
session.query(sa.Field).delete()
session.query(sa.Category).delete()
# Water Fountain, the class.
wf = sa.Category()
wf.name = "Water Fountain"
wf.slug = "water_fountain"
wf.icon
# coldness
if __name__ == '__main__':
......
......@@ -66,6 +66,7 @@ class Category(Base):
__tablename__ = 'category'
name = Column(String, nullable=False, unique=True)
icon = Column(String, nullable=True)
fields = relationship("Field")
......
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