Created
January 13, 2014 16:37
-
-
Save Willianvdv/8403390 to your computer and use it in GitHub Desktop.
SQL log with require_master_price set to true
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(0.2ms) BEGIN | |
(0.8ms) SELECT COUNT(*) FROM "spree_products" WHERE ("spree_products".deleted_at IS NULL) AND (spree_products.permalink LIKE 'the-other-product%') | |
Spree::Product Load (0.8ms) SELECT "spree_products".* FROM "spree_products" WHERE ("spree_products".deleted_at IS NULL) AND (spree_products.permalink LIKE 'the-other-product%') | |
Spree::Product::Translation Load (0.3ms) SELECT "spree_product_translations".* FROM "spree_product_translations" WHERE "spree_product_translations"."spree_product_id" = $1 [["spree_product_id", 303]] | |
SQL (0.7ms) INSERT INTO "spree_products" ("created_at", "name", "permalink", "shipping_category_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00], ["name", "The Other Product"], ["permalink", "the-other-product-1"], ["shipping_category_id", 1], ["updated_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00]] | |
SQL (0.5ms) INSERT INTO "spree_product_properties" ("created_at", "product_id", "property_id", "updated_at", "value") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00], ["product_id", 307], ["property_id", 763], ["updated_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00], ["value", "cotton"]] | |
Spree::Product Load (0.4ms) SELECT "spree_products".* FROM "spree_products" WHERE ("spree_products".deleted_at IS NULL) AND "spree_products"."id" = $1 ORDER BY "spree_products"."id" ASC LIMIT 1 [["id", 307]] | |
SQL (0.4ms) UPDATE "spree_products" SET "updated_at" = '2014-01-13 16:37:20.593503' WHERE "spree_products"."id" = 307 | |
Spree::Property Load (1.1ms) SELECT "spree_properties".* FROM "spree_properties" INNER JOIN "spree_product_properties" ON "spree_properties"."id" = "spree_product_properties"."property_id" WHERE "spree_product_properties"."product_id" = $1 ORDER BY spree_product_properties.position [["product_id", 307]] | |
Spree::Property::Translation Load (0.3ms) SELECT "spree_property_translations".* FROM "spree_property_translations" WHERE "spree_property_translations"."spree_property_id" = $1 [["spree_property_id", 763]] | |
Spree::Property Load (0.7ms) SELECT "spree_properties".* FROM "spree_properties" INNER JOIN "spree_product_properties" ON "spree_properties"."id" = "spree_product_properties"."property_id" WHERE "spree_product_properties"."product_id" = $1 AND "spree_properties"."name" = 'fabric' ORDER BY spree_product_properties.position LIMIT 1 [["product_id", 307]] | |
Spree::ProductProperty Load (0.4ms) SELECT "spree_product_properties".* FROM "spree_product_properties" WHERE "spree_product_properties"."product_id" = $1 AND "spree_product_properties"."property_id" = 763 ORDER BY spree_product_properties.position LIMIT 1 [["product_id", 307]] | |
Spree::Product::Translation Load (0.2ms) SELECT "spree_product_translations".* FROM "spree_product_translations" WHERE "spree_product_translations"."spree_product_id" = $1 [["spree_product_id", 307]] | |
SQL (0.7ms) UPDATE "spree_products" SET "data" = $1, "updated_at" = $2 WHERE "spree_products"."id" = 307 [["data", {:fabric=>"cotton"}], ["updated_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00]] | |
Spree::Variant Load (0.6ms) SELECT "spree_variants".* FROM "spree_variants" WHERE ("spree_variants".deleted_at IS NULL) AND "spree_variants"."product_id" = $1 AND "spree_variants"."is_master" = 't' ORDER BY "spree_variants"."id" ASC LIMIT 1 [["product_id", 307]] | |
Spree::Variant Load (0.4ms) SELECT "spree_variants".* FROM "spree_variants" WHERE "spree_variants"."product_id" = $1 AND "spree_variants"."is_master" = 't' ORDER BY "spree_variants".position ASC LIMIT 1 [["product_id", 307]] | |
SQL (0.8ms) INSERT INTO "spree_variants" ("cost_currency", "product_id", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["cost_currency", "EUR"], ["product_id", 307], ["updated_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00]] | |
Spree::Variant Load (0.5ms) SELECT "spree_variants".* FROM "spree_variants" WHERE "spree_variants"."id" = $1 ORDER BY "spree_variants"."id" ASC LIMIT 1 [["id", 292]] | |
SQL (0.4ms) INSERT INTO "spree_prices" ("amount", "currency", "variant_id") VALUES ($1, $2, $3) RETURNING "id" [["amount", #<BigDecimal:7ff70036b4c0,'0.1999E2',18(45)>], ["currency", "EUR"], ["variant_id", 292]] | |
Spree::StockLocation Load (0.3ms) SELECT "spree_stock_locations".* FROM "spree_stock_locations" | |
(0.5ms) SELECT MAX("spree_variants"."position") AS max_id FROM "spree_variants" WHERE ("spree_variants".deleted_at IS NULL) AND "spree_variants"."product_id" = $1 AND "spree_variants"."is_master" = 'f' [["product_id", 307]] | |
SQL (0.4ms) UPDATE "spree_variants" SET "position" = 1 WHERE "spree_variants"."id" = 292 | |
SQL (0.3ms) UPDATE "spree_products" SET "updated_at" = '2014-01-13 16:37:20.676790' WHERE "spree_products"."id" = 307 | |
SQL (0.6ms) INSERT INTO "spree_product_translations" ("created_at", "locale", "name", "permalink", "spree_product_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00], ["locale", "nl"], ["name", "The Other Product"], ["permalink", "the-other-product-1"], ["spree_product_id", 307], ["updated_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00]] | |
SQL (0.7ms) UPDATE "spree_variants" SET "is_master" = $1, "updated_at" = $2 WHERE "spree_variants"."id" = 292 [["is_master", true], ["updated_at", Mon, 13 Jan 2014 16:37:20 UTC +00:00]] | |
SQL (0.3ms) UPDATE "spree_products" SET "updated_at" = '2014-01-13 16:37:20.681734' WHERE "spree_products"."id" = 307 | |
(1.5ms) COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment