Skip to content

Commit

Permalink
Merge pull request #704 from eddieferrer/add_shoes_Jan2023
Browse files Browse the repository at this point in the history
added new shoes
  • Loading branch information
eddieferrer committed Feb 1, 2023
2 parents d3c8a89 + fdccc0a commit b6141e7
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions migrations/versions/15d014361866_new_shoes_jan2023.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""new shoes jan2023
Revision ID: 15d014361866
Revises: 0ab059fb0421
Create Date: 2023-01-31 17:42:12.446005
"""

# revision identifiers, used by Alembic.
revision = '15d014361866'
down_revision = '0ab059fb0421'

from alembic import op
from sqlalchemy.sql import table, column
from sqlalchemy import String, Integer

def upgrade():
# Create an ad-hoc table to use for the insert statement.
item_table = table('item',
column('model', String),
column('brand_id', Integer),
column('gender_id', Integer),
column('small_image_url', String),
column('medium_image_url', String),
column('type', String)
)

# 28|unparallel|US
op.bulk_insert(
item_table, [
{'model': 'up-rise pro', 'brand_id': '28',
'gender_id': '3', 'type': 'rock'},
{'model': 'up pivot', 'brand_id': '28',
'gender_id': '3', 'type': 'rock'},
{'model': 'souped up', 'brand_id': '28',
'gender_id': '3', 'type': 'rock'},
{'model': 'engage lace', 'brand_id': '28',
'gender_id': '3', 'type': 'rock'},
{'model': 'flagship lv', 'brand_id': '28',
'gender_id': '2', 'type': 'rock'},
{'model': 'flagship', 'brand_id': '28',
'gender_id': '1', 'type': 'rock'},
{'model': 'tn pro lv', 'brand_id': '28',
'gender_id': '2', 'type': 'rock'},
{'model': 'tn pro', 'brand_id': '28',
'gender_id': '1', 'type': 'rock'},
])

# 1|evolv|US
op.bulk_insert(
item_table, [
{'model': 'yosemite bum', 'brand_id': '1',
'gender_id': '1', 'type': 'rock'},
{'model': 'yosemite bum lv', 'brand_id': '1',
'gender_id': '2', 'type': 'rock'},
])

# 3|la sportiva|EUR
op.bulk_insert(
item_table, [
{'model': 'quantix SF', 'brand_id': '3',
'gender_id': '1', 'type': 'rock'},
{'model': 'quantix SF', 'brand_id': '3',
'gender_id': '2', 'type': 'rock'},
{'model': 'mantra', 'brand_id': '3',
'gender_id': '3', 'type': 'rock'},
])

# 7|tenaya|US
op.bulk_insert(
item_table, [
{'model': 'indalo', 'brand_id': '7',
'gender_id': '3', 'type': 'rock'},
])

def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###

0 comments on commit b6141e7

Please sign in to comment.