Create products csv file for db seeding# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Committer: Sunny Israni <sunnyisrani@Sunnys-MacBook-Pro.local>## On branch setup-db# Changes to be committed:#   (use "git reset HEAD <file>..." to unstage)##	new file:   app/assets/csvs/colors.csv#	new file:   app/assets/csvs/patterns.csv#	new file:   app/assets/csvs/products.csv#diff --git a/app/assets/csvs/colors.csv b/app/assets/csvs/colors.csvnew file mode 100644index 0000000..757df4e--- /dev/null+++ b/app/assets/csvs/colors.csv@@ -0,0 +1 @@+ColorDarkNeutralBright\ No newline at end of filediff --git a/app/assets/csvs/patterns.csv b/app/assets/csvs/patterns.csvnew file mode 100644index 0000000..3953e7d--- /dev/null+++ b/app/assets/csvs/patterns.csv@@ -0,0 +1 @@+PatternStripesArgylePindotsGeometricsPolkadotCamoPaiselyFloralNovelty\ No newline at end of filediff --git a/app/assets/csvs/products.csv b/app/assets/csvs/products.csvnew file mode 100644index 0000000..30a15d9--- /dev/null+++ b/app/assets/csvs/products.csv@@ -0,0 +1 @@+Handle,Title,Body (HTML),Vendor,Type,Tags,Option1 Name,Option1 Value,Option2 Name,Option2 Value,Option3 Name,Option3 Value,Variant SKU,Variant Grams,Variant Inventory Tracker,Variant Inventory Qty,Variant Inventory Policy,Variant Fulfillment Service,Variant Price,Variant Compare At Price,Variant Requires Shipping,Variant Taxable,Image SrcHS_PA01-035,Pink Paisley,"<ul><li>80% Combed Cotton, 17% Polyamide, 3% Elastane</li><li>Fits men's shoe size 7-13.</li><li>Style#PA01-035</li><li>Designed in Sweden. Made in Turkey.",Happy Socks,All,"Fashion Socks,Fun Socks,Happy Socks,Print,PaisleyCrew,Pink,Cotton,Men,New",Default Title,Default Title,,,,,HS_PA01-035,2,Shopify,24,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/PA01-035.jpgHS_PA01-479,Holiday Paisley,"<ul><li>80% Combed Cotton, 17% Polyamide, 3% Elastane</li><li>Fits men's shoe size 7-13.</li><li>Style#PA01-479</li><li>Designed in Sweden. Made in Turkey.",Happy Socks,All,"Fashion Socks,Fun Socks,Happy Socks,Print,Crew,Red,Cotton,Men,New",Default Title,Default Title,,,,,HS_PA01-479,2,Shopify,24,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/PA01-479.jpgHS_OP01-705,Optic Green,"<ul><li>80% Combed Cotton, 17% Polyamide, 3% Elastane</li><li>Fits men's shoe size 7-13.</li><li>Style#OP01-705</li><li>Designed in Sweden. Made in Turkey.",Happy Socks,All,"Fun Socks,Happy Socks,Blocks,Print,Crew,Green,Cotton,Men,New",Default Title,Default Title,,,,,HS_OP01-705,2,Shopify,24,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/OP01-705.jpgHS_MS01-063,Eclectic Blue,"<ul><li>80% Combed Cotton, 17% Polyamide, 3% Elastane</li><li>Fits men's shoe size 7-13.</li><li>Style#MS01-063</li><li>Designed in Sweden. Made in Turkey.",Happy Socks,All,"Fashion Socks,Fun Socks,Happy Socks,Print,Crew,Blue,Cotton,Men,New",Default Title,Default Title,,,,,HS_MS01-063,2,Shopify,18,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/MS01-063.jpgKB_1960M-Black,Puzzled,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1960M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,KB_1960M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1960M-Black.jpgKB_1953M-Black,Grinding Gears,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1953M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,KB_1953M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1953M-Black.jpgKB_1933M-Dkred,Crazy Blocks,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1933M-Dkred</li><li>Made in Korea.",K.Bell,All,"Fashion Socks,Fun Socks,K.Bell,Blocks,Crew,Red,Yellow,Cotton,Men,New",Default Title,Default Title,,,,,KB_1933M-Dkred,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1933M-Dkred.jpgKB_1942M-Bkred,Black Ravioli,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1942M-Bkred</li><li>Made in Korea.",K.Bell,All,"Fashion Socks,Dress Socks,K.Bell,Blocks,Print,Crew,Black,Red,Cotton,Men,New",Default Title,Default Title,,,,,KB_1942M-Bkred,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1942M-Bkred.jpgKB_61655M-Black,Mind Games,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#61655M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,KB_61655M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/61655M-Black.jpgKB_66913M-Black,Pink Pipes,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#66913M-Black</li><li>Made in Korea.",K.Bell,All,"Fashion Socks,Dress Socks,K.Bell,Stripes,Crew,Purple,Pink,Cotton,Men,New",Default Title,Default Title,,,,,KB_66913M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/66913M-Black.jpgKB_66913M-Tourmalin,Green Pipes,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#66913M-Tourmalin</li><li>Made in Korea.",K.Bell,All,"Fashion Socks,Dress Socks,K.Bell,Stripes,Crew,Green,Brown,Cotton,Men,New",Default Title,Default Title,,,,,KB_66913M-Tourmalin,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/66913M-Tourmalin.jpgKB_65772M-Chrhr,Grandpa Plaid,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#65772M-Chrhr</li><li>Made in Korea.",K.Bell,All,"Dress Socks,K.Bell,Blocks,Crew,Gray,Cotton,Men,New",Default Title,Default Title,,,,,KB_65772M-Chrhr,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/65772M-Chrhr.jpgKB_1970M-Redturq,Two Tone Dots,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1970M-Redturq</li><li>Made in Korea.",K.Bell,All,"Fashion Socks,Fun Socks,K.Bell,Dots,Crew,Blue,Red,Cotton,Men,New",Default Title,Default Title,,,,,KB_1970M-Redturq,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1970M-Redturq.jpgKB_61712M-Black,Scrabble,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#61712M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Blocks,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,KB_61712M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/61712M-Black.jpgKB_1942M-Bkblue,Blue Ravioli,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1942M-Bkblue</li><li>Made in Korea.",K.Bell,All,"Fashion Socks,Dress Socks,K.Bell,Blocks,Print,Crew,Black,Blue,Cotton,Men,New",Default Title,Default Title,,,,,KB_1942M-Bkblue,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1942M-Bkblue.jpgKB_62523M-Red,Robotic,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#62523M-Red</li><li>Made in Korea.",K.Bell,All,"Fun Socks,K.Bell,Print,Crew,Red,Cotton,Men,New",Default Title,Default Title,,,,,KB_62523M-Red,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/62523M-Red.jpgKB_61632M-Black,Multi-Color Bikes,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#61632M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,KB_61632M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/61632M-Black.jpgKB_1962M-Black,Green Monster,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#1962M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Print,Crew,Black,Green,Cotton,Men,New",Default Title,Default Title,,,,,KB_1962M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/1962M-Black.jpgKB_61634M-Black,Rubik's Cube,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#61634M-Black</li><li>Made in Korea.",K.Bell,All,"Fun Socks,Dress Socks,K.Bell,Blocks,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,KB_61634M-Black,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/61634M-Black.jpgKB_65772M-Navy,Plaid Navy,"<ul><li>60% Cotton, 38% Polyester, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#65772M-Navy</li><li>Made in Korea.",K.Bell,All,"Casual Socks,Dress Socks,K.Bell,Blocks,Print,Crew,Blue,Cotton,Men,New",Default Title,Default Title,,,,,KB_65772M-Navy,2,Shopify,6,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/65772M-Navy.jpgSITM_MEF0073,T-Rex!,"<ul><li>75% Cotton, 20% Polyester, 5% Spandex</li><li>Fits men's shoe size 8-13.</li><li>Style#MEF0073</li><li>Made in Korea.",Sock it to Me,All,"Sock it to Me,Print,Crew,Blue,Cotton,Men,New",Default Title,Default Title,,,,,SITM_MEF0073,2,Shopify,36,deny,manual,10,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/MEF0073.jpgSITM_MEF0068,Sasquatch,"<ul><li>75% Cotton, 20% Polyester, 5% Spandex</li><li>Fits men's shoe size 8-13.</li><li>Style#MEF0068</li><li>Made in Korea.",Sock it to Me,All,"Casual Socks,Fun Socks,Sock it to Me,Print,Crew,Brown,Cotton,Men,New",Default Title,Default Title,,,,,SITM_MEF0068,2,Shopify,36,deny,manual,10,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/MEF0068.jpgSITM_MEF0067,Bad Ass,"<ul><li>75% Cotton, 20% Polyester, 5% Spandex</li><li>Fits men's shoe size 8-13.</li><li>Style#MEF0067</li><li>Made in Korea.",Sock it to Me,All,"Fun Socks,Sock it to Me,Print,Crew,Black,Cotton,Men,New",Default Title,Default Title,,,,,SITM_MEF0067,2,Shopify,36,deny,manual,10,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/MEF0067.jpgOz_824-07,Fair Isle - Red,"<ul><li>85% Cotton, 14% Nylon, 1% Spandex</li><li>Fits men's shoe size 8-13.</li><li>Style#824-07</li><li>Made in Colombia.",Ozone,All,"Fashion Socks,Casual Socks,Ozone,Print,Crew,Red,Gray,Cotton,Men,New",Default Title,Default Title,,,,,Oz_824-07,2,Shopify,6,deny,manual,15,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/824-07.jpgOz_824-14,Fair Isle - Navy,"<ul><li>85% Cotton, 14% Nylon, 1% Spandex</li><li>Fits men's shoe size 8-13.</li><li>Style#824-14</li><li>Made in Colombia.",Ozone,All,"Fashion Socks,Casual Socks,Ozone,Print,Crew,Blue,Cotton,Men,New",Default Title,Default Title,,,,,Oz_824-14,2,Shopify,12,deny,manual,15,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/824-14.jpgHX_HM100054-Black,Envigorated Stripes,"<ul><li>60% Cotton, 23% Nylon, 12% Polyester, 3% Rubber, 2% Spandex</li><li>Fits men's shoe size 7-13.</li><li>Style#HM100054-Black</li><li>Made in Korea.",Hot Sox,All,"Hot Sox,Stripes,Crew,Green,Cotton,Men,New",Default Title,Default Title,,,,,HX_HM100054-Black,2,Shopify,18,deny,manual,11,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/HM100054-Black.jpgRP_STG02,Stargazer Yellow,"<ul><li>68% Combed Cotton, 16% Polyester, 13% Nylon, 3% Spandex</li><li>Fits men's shoe size 6-12.</li><li>Style#STG02</li><li>Made in Korea.",Richer Poorer,All,"Fashion Socks,Richer Poorer,Dots,Crew,Yellow,Cotton,Men,New",Default Title,Default Title,,,,,RP_STG02,2,Shopify,6,deny,manual,12,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/STG02.jpgRP_VIS06,Visionary Yellow,"<ul><li>68% Combed Cotton, 16% Polyester, 13% Nylon, 3% Spandex</li><li>Fits men's shoe size 6-12.</li><li>Style#VIS06</li><li>Made in Korea.",Richer Poorer,All,"Fashion Socks,Richer Poorer,Print,Crew,Yellow,Cotton,Men,New",Default Title,Default Title,,,,,RP_VIS06,2,Shopify,6,deny,manual,12,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/VIS06.jpgRP_RFN03,Ruffian Navy,"<ul><li>68% Combed Cotton, 16% Polyester, 13% Nylon, 3% Spandex</li><li>Fits men's shoe size 6-12.</li><li>Style#RFN03</li><li>Made in Korea.",Richer Poorer,All,"Casual Socks,Dress Socks,Richer Poorer,Print,Crew,Blue,Cotton,Men,New",Default Title,Default Title,,,,,RP_RFN03,2,Shopify,6,deny,manual,12,,TRUE,FALSE,https://dl.dropboxusercontent.com/u/65994410/uploads/12.3.13/RFN03.jpg\ No newline at end of file
Create products table migration
Create products model
Create migrations for patterns table and colors table
Create color and pattern models
Correct model filename error
Create join table migrations for ColorsProducts and PatternsProducts
Establish HABM relationships between color/product and pattern/product
Change from HABM relationships to belongs_to relationship since a product only has one color and one pattern
Rollback db schema to eliminate unncessary join tables
Remove unneccessary join table migrations
Create migrations to add color ref and pattern ref to products table
Merge pull request #2 from SunnyIzr/setup-db

Setup db