spec/dummy/log/development.log in stateful_models-0.0.2 vs spec/dummy/log/development.log in stateful_models-0.0.3

- old
+ new

@@ -255,5 +255,91 @@ TRANSACTION (0.1ms) COMMIT TRANSACTION /*application='Dummy'*/ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ TRANSACTION (0.1ms) BEGIN immediate TRANSACTION /*application='Dummy'*/ KYCState Create (0.6ms) INSERT INTO "has_states_states" ("type", "state_type", "status", "metadata", "stateable_type", "stateable_id", "completed_at", "created_at", "updated_at") VALUES ('KYCState', 'kyc', 'pending', '{"document_type":"passport"}', 'User', 1, NULL, '2024-12-23 21:38:20.849253', '2024-12-23 21:38:20.849253') RETURNING "id" /*application='Dummy'*/ TRANSACTION (14.6ms) COMMIT TRANSACTION /*application='Dummy'*/ + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.4ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' /* loading for pp */ ORDER BY "has_states_states"."created_at" DESC LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + HasStates::State Load (0.3ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."type" = 'HasStates::State' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Exists? (0.2ms) SELECT 1 AS one FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'onboarding' AND "has_states_states"."status" = 'pending' LIMIT 1 /*application='Dummy'*/ + HasStates::Base Exists? (0.3ms) SELECT 1 AS one FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'onboarding' AND "has_states_states"."status" = 'email_verified' LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.3ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + HasStates::State Pluck (0.2ms) SELECT "has_states_states"."type" FROM "has_states_states" WHERE "has_states_states"."type" = 'HasStates::State' /*application='Dummy'*/ + HasStates::State Load (0.3ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."type" = 'HasStates::State' /*application='Dummy'*/ + HasStates::Base Load (0.3ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + HasStates::State Update All (0.2ms) UPDATE "has_states_states" SET "type" = 'HasStates::State' WHERE "has_states_states"."type" = 'HasStates::State' AND "has_states_states"."type" = 'TestState' /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.3ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::State Update All (13.4ms) UPDATE "has_states_states" SET "type" = 'HasStates::State' WHERE "has_states_states"."type" = 'HasStates::State' /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for pp */ LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' /* loading for pp */ ORDER BY "has_states_states"."created_at" DESC LIMIT 11 /*application='Dummy'*/ + HasStates::Base Load (0.1ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' /* loading for inspect */ LIMIT 11 /*application='Dummy'*/ +  (0.2ms) SELECT id, type, state_type, status FROM has_states_states /*application='Dummy'*/ + HasStates::Base Update All (0.5ms) UPDATE "has_states_states" SET "type" = 'HasStates::State' WHERE "has_states_states"."type" IN ('TestState', 'KYCState') /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' /* loading for pp */ ORDER BY "has_states_states"."created_at" DESC LIMIT 11 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.3ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Load (0.2ms) SELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Exists? (0.1ms) SELECT 1 AS one FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' AND "has_states_states"."status" = 'approved' LIMIT 1 /*application='Dummy'*/ + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/ + HasStates::Base Exists? (0.1ms) SELECT 1 AS one FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' AND "has_states_states"."status" = 'approved' LIMIT 1 /*application='Dummy'*/ + ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/ + ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/ +Migrating to CreateIndexesOnHasStatesStates (20250114175939) + ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/ + ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/ +Migrating to CreateIndexesOnHasStatesStates (20250114175939) + TRANSACTION (0.0ms) BEGIN immediate TRANSACTION /*application='Dummy'*/ +  (0.6ms) CREATE INDEX "index_has_states_states_on_stateable_id_and_state_type" ON "has_states_states" ("stateable_id", "state_type") /*application='Dummy'*/ +  (0.1ms) CREATE INDEX "idx_on_stateable_id_state_type_status_6d3d026e4d" ON "has_states_states" ("stateable_id", "state_type", "status") /*application='Dummy'*/ +  (0.0ms) CREATE INDEX "idx_on_stateable_id_state_type_created_at_b5d09fb6ee" ON "has_states_states" ("stateable_id", "state_type", "created_at") /*application='Dummy'*/ +  (0.0ms) CREATE INDEX "idx_on_stateable_id_state_type_status_created_at_19e1cf37c2" ON "has_states_states" ("stateable_id", "state_type", "status", "created_at") /*application='Dummy'*/ +  (0.1ms) CREATE INDEX "index_has_states_states_on_stateble_type_and_stateable_id" ON "has_states_states" ("stateble_type", "stateable_id") /*application='Dummy'*/ + TRANSACTION (0.0ms) ROLLBACK TRANSACTION /*application='Dummy'*/ + ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/ + ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/ +Migrating to CreateIndexesOnHasStatesStates (20250114175939) + TRANSACTION (0.0ms) BEGIN immediate TRANSACTION /*application='Dummy'*/ +  (0.7ms) CREATE INDEX "index_has_states_states_on_stateable_id_and_state_type" ON "has_states_states" ("stateable_id", "state_type") /*application='Dummy'*/ +  (0.1ms) CREATE INDEX "idx_on_stateable_id_state_type_status_6d3d026e4d" ON "has_states_states" ("stateable_id", "state_type", "status") /*application='Dummy'*/ +  (0.0ms) CREATE INDEX "idx_on_stateable_id_state_type_created_at_b5d09fb6ee" ON "has_states_states" ("stateable_id", "state_type", "created_at") /*application='Dummy'*/ +  (0.0ms) CREATE INDEX "idx_on_stateable_id_state_type_status_created_at_19e1cf37c2" ON "has_states_states" ("stateable_id", "state_type", "status", "created_at") /*application='Dummy'*/ +  (0.1ms) CREATE INDEX "index_has_states_states_on_stateable_type_and_stateable_id" ON "has_states_states" ("stateable_type", "stateable_id") /*application='Dummy'*/ + TRANSACTION (0.0ms) ROLLBACK TRANSACTION /*application='Dummy'*/ + ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/ + ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/ +Migrating to CreateIndexesOnHasStatesStates (20250114175939) + TRANSACTION (0.0ms) BEGIN immediate TRANSACTION /*application='Dummy'*/ +  (0.7ms) CREATE INDEX "index_has_states_states_on_stateable_id_and_state_type" ON "has_states_states" ("stateable_id", "state_type") /*application='Dummy'*/ +  (0.1ms) CREATE INDEX "idx_on_stateable_id_state_type_status_6d3d026e4d" ON "has_states_states" ("stateable_id", "state_type", "status") /*application='Dummy'*/ +  (0.0ms) CREATE INDEX "idx_on_stateable_id_state_type_created_at_b5d09fb6ee" ON "has_states_states" ("stateable_id", "state_type", "created_at") /*application='Dummy'*/ +  (0.0ms) CREATE INDEX "idx_on_stateable_id_state_type_status_created_at_19e1cf37c2" ON "has_states_states" ("stateable_id", "state_type", "status", "created_at") /*application='Dummy'*/ + ActiveRecord::SchemaMigration Create (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250114175939') RETURNING "version" /*application='Dummy'*/ + TRANSACTION (14.2ms) COMMIT TRANSACTION /*application='Dummy'*/ + ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/