snf_core 0.2.95 → 0.2.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/snf_core/auth_controller.rb +0 -42
  3. data/app/models/snf_core/quotation.rb +41 -0
  4. data/app/models/snf_core/user.rb +18 -19
  5. data/app/models/snf_core/virtual_account.rb +4 -4
  6. data/app/models/snf_core/virtual_account_transaction.rb +10 -10
  7. data/config/routes.rb +0 -3
  8. data/db/migrate/20250310122954_create_snf_core_virtual_accounts.rb +1 -1
  9. data/db/migrate/20250310143604_create_snf_core_item_requests.rb +5 -5
  10. data/db/migrate/20250312043359_create_snf_core_quotations.rb +14 -0
  11. data/lib/snf_core/version.rb +1 -1
  12. data/spec/dummy/db/schema.rb +14 -1
  13. data/spec/dummy/log/development.log +798 -0
  14. data/spec/dummy/log/test.log +16434 -0
  15. data/spec/dummy/tmp/storage/39/fi/39fibqwgi0xq9xbood6b68hlp4af +0 -0
  16. data/spec/dummy/tmp/storage/5m/j8/5mj8ypl6zxx8g3h7vqmu4p2la4pk +0 -0
  17. data/spec/dummy/tmp/storage/7u/5y/7u5ymxnw5e2jbr7037m2eth7qdkl +0 -0
  18. data/spec/dummy/tmp/storage/dw/75/dw75t7gej4irzb3hcqssl8w5vhde +0 -0
  19. data/spec/dummy/tmp/storage/dz/dq/dzdq3gkuy7tdiue1yqmciu86nzfg +0 -0
  20. data/spec/dummy/tmp/storage/iz/eu/izeu0nc2gf1beo8nvl7iblxc46oj +0 -0
  21. data/spec/dummy/tmp/storage/j4/ln/j4lnbjjufbp59yxsdetbqs0cyjia +0 -0
  22. data/spec/dummy/tmp/storage/l8/1u/l81unawd0p9c61x8k6ofq0y227yt +0 -0
  23. data/spec/dummy/tmp/storage/oh/ls/ohlsxs36tio52r2ydrbzez1u0w26 +0 -0
  24. data/spec/dummy/tmp/storage/qq/vt/qqvtf3h8ge74ce67gghth8ivch0g +0 -0
  25. data/spec/dummy/tmp/storage/uy/sl/uyslcroe2rycfyrrb5bhsfodzg5y +0 -0
  26. data/spec/dummy/tmp/storage/v5/c9/v5c9opt3yikmy2gwg4ftmde0vyt5 +0 -0
  27. data/spec/dummy/tmp/storage/za/ov/zaov1yasuhakxa5olzoed94khnf8 +0 -0
  28. data/spec/dummy/tmp/storage/zc/d6/zcd6d4lsb12obz7m7r6240qka8xw +0 -0
  29. data/spec/dummy/tmp/storage/zq/ts/zqtsmjmvozdu6y5i5d1n3kb9q0vw +0 -0
  30. data/spec/examples.txt +196 -189
  31. data/spec/factories/snf_core/quotations.rb +10 -0
  32. data/spec/models/snf_core/item_request_spec.rb +2 -2
  33. data/spec/models/snf_core/quotation_spec.rb +54 -0
  34. data/spec/models/snf_core/user_spec.rb +18 -19
  35. data/spec/models/snf_core/virtual_account_spec.rb +0 -1
  36. data/spec/models/snf_core/virtual_account_transaction_spec.rb +1 -1
  37. data/spec/requests/snf_core/auth_spec.rb +0 -84
  38. metadata +21 -2
@@ -5286,3 +5286,801 @@ FOREIGN KEY ("user_id")
5286
5286
  ActiveRecord::InternalMetadata Update (1.1ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-11 05:34:36.009754' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
5287
5287
  ActiveRecord::InternalMetadata Load (0.4ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5288
5288
  ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '8f9fff732890dd4b4ce6db66c5ce832562876d08', '2025-03-11 05:34:36.014309', '2025-03-11 05:34:36.014313') RETURNING "key" /*application='Dummy'*/
5289
+ ActiveRecord::SchemaMigration Load (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5290
+ ActiveRecord::InternalMetadata Load (3.7ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5291
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5292
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5293
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5294
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5295
+ SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
5296
+  (151.3ms) DROP DATABASE IF EXISTS "snf_dev" /*application='Dummy'*/
5297
+ SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
5298
+  (46.7ms) DROP DATABASE IF EXISTS "snf_test" /*application='Dummy'*/
5299
+ SQL (0.2ms) SET search_path TO public /*application='Dummy'*/
5300
+  (207.6ms) CREATE DATABASE "snf_dev" ENCODING = 'unicode' /*application='Dummy'*/
5301
+ SQL (0.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
5302
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_attachments" CASCADE /*application='Dummy'*/
5303
+  (15.2ms) CREATE TABLE "active_storage_attachments" ("id" bigserial primary key, "name" character varying NOT NULL, "record_type" character varying NOT NULL, "record_id" bigint NOT NULL, "blob_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5304
+  (2.9ms) CREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id") /*application='Dummy'*/
5305
+  (2.0ms) CREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id") /*application='Dummy'*/
5306
+  (0.3ms) DROP TABLE IF EXISTS "active_storage_blobs" CASCADE /*application='Dummy'*/
5307
+  (5.9ms) CREATE TABLE "active_storage_blobs" ("id" bigserial primary key, "key" character varying NOT NULL, "filename" character varying NOT NULL, "content_type" character varying, "metadata" text, "service_name" character varying NOT NULL, "byte_size" bigint NOT NULL, "checksum" character varying, "created_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5308
+  (1.9ms) CREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key") /*application='Dummy'*/
5309
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_variant_records" CASCADE /*application='Dummy'*/
5310
+  (5.4ms) CREATE TABLE "active_storage_variant_records" ("id" bigserial primary key, "blob_id" bigint NOT NULL, "variation_digest" character varying NOT NULL) /*application='Dummy'*/
5311
+  (1.8ms) CREATE UNIQUE INDEX "index_active_storage_variant_records_uniqueness" ON "active_storage_variant_records" ("blob_id", "variation_digest") /*application='Dummy'*/
5312
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_account_transfers" CASCADE /*application='Dummy'*/
5313
+  (6.1ms) CREATE TABLE "snf_core_account_transfers" ("id" bigserial primary key, "source_account_type" character varying NOT NULL, "source_account_id" bigint NOT NULL, "destination_account_type" character varying NOT NULL, "destination_account_id" bigint NOT NULL, "user_id" bigint NOT NULL, "amount" decimal(15,2) NOT NULL, "reference_number" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "transfer_type" integer NOT NULL, "description" text, "failure_reason" text, "completed_at" timestamp(6), "reversal_transfer_id" bigint, "cbs_response_data" jsonb, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5314
+  (1.9ms) CREATE INDEX "index_snf_core_account_transfers_on_destination_account" ON "snf_core_account_transfers" ("destination_account_type", "destination_account_id") /*application='Dummy'*/
5315
+  (16.3ms) CREATE UNIQUE INDEX "index_snf_core_account_transfers_on_reference_number" ON "snf_core_account_transfers" ("reference_number") /*application='Dummy'*/
5316
+  (3.4ms) CREATE INDEX "index_snf_core_account_transfers_on_reversal_transfer_id" ON "snf_core_account_transfers" ("reversal_transfer_id") /*application='Dummy'*/
5317
+  (1.9ms) CREATE INDEX "index_snf_core_account_transfers_on_source_account" ON "snf_core_account_transfers" ("source_account_type", "source_account_id") /*application='Dummy'*/
5318
+  (1.3ms) CREATE INDEX "index_snf_core_account_transfers_on_user_id" ON "snf_core_account_transfers" ("user_id") /*application='Dummy'*/
5319
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_addresses" CASCADE /*application='Dummy'*/
5320
+  (7.0ms) CREATE TABLE "snf_core_addresses" ("id" bigserial primary key, "address_type" character varying NOT NULL, "city" character varying NOT NULL, "sub_city" character varying NOT NULL, "woreda" character varying, "latitude" decimal NOT NULL, "longitude" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "house_number" character varying) /*application='Dummy'*/
5321
+  (0.7ms) DROP TABLE IF EXISTS "snf_core_business_documents" CASCADE /*application='Dummy'*/
5322
+  (3.9ms) CREATE TABLE "snf_core_business_documents" ("id" bigserial primary key, "business_id" bigint NOT NULL, "document_type" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "uploaded_at" timestamp(6), "is_verified" boolean DEFAULT FALSE NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5323
+  (1.4ms) CREATE INDEX "index_snf_core_business_documents_on_business_id" ON "snf_core_business_documents" ("business_id") /*application='Dummy'*/
5324
+  (1.6ms) CREATE INDEX "index_snf_core_business_documents_on_verified_by_id" ON "snf_core_business_documents" ("verified_by_id") /*application='Dummy'*/
5325
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_businesses" CASCADE /*application='Dummy'*/
5326
+  (5.6ms) CREATE TABLE "snf_core_businesses" ("id" bigserial primary key, "user_id" bigint NOT NULL, "business_name" character varying NOT NULL, "tin_number" character varying NOT NULL, "business_type" integer NOT NULL, "verified_at" timestamp(6), "verification_status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5327
+  (1.6ms) CREATE INDEX "index_snf_core_businesses_on_user_id" ON "snf_core_businesses" ("user_id") /*application='Dummy'*/
5328
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_categories" CASCADE /*application='Dummy'*/
5329
+  (4.5ms) CREATE TABLE "snf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5330
+  (1.8ms) CREATE INDEX "index_snf_core_categories_on_parent_id" ON "snf_core_categories" ("parent_id") /*application='Dummy'*/
5331
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_customer_groups" CASCADE /*application='Dummy'*/
5332
+  (5.4ms) CREATE TABLE "snf_core_customer_groups" ("id" bigserial primary key, "discount_code" character varying, "expire_date" timestamp(6), "is_used" boolean, "group_id" bigint NOT NULL, "customer_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5333
+  (1.9ms) CREATE INDEX "index_snf_core_customer_groups_on_customer_id" ON "snf_core_customer_groups" ("customer_id") /*application='Dummy'*/
5334
+  (2.0ms) CREATE INDEX "index_snf_core_customer_groups_on_group_id" ON "snf_core_customer_groups" ("group_id") /*application='Dummy'*/
5335
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_delivery_orders" CASCADE /*application='Dummy'*/
5336
+  (5.6ms) CREATE TABLE "snf_core_delivery_orders" ("id" bigserial primary key, "order_id" bigint NOT NULL, "delivery_address" character varying NOT NULL, "contact_phone" character varying NOT NULL, "delivery_notes" text NOT NULL, "estimated_delivery_time" timestamp(6) NOT NULL, "actual_delivery_time" timestamp(6), "status" integer NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5337
+  (1.6ms) CREATE INDEX "index_snf_core_delivery_orders_on_order_id" ON "snf_core_delivery_orders" ("order_id") /*application='Dummy'*/
5338
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_groups" CASCADE /*application='Dummy'*/
5339
+  (9.2ms) CREATE TABLE "snf_core_groups" ("id" bigserial primary key, "name" character varying NOT NULL, "business_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5340
+  (1.8ms) CREATE INDEX "index_snf_core_groups_on_business_id" ON "snf_core_groups" ("business_id") /*application='Dummy'*/
5341
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_item_requests" CASCADE /*application='Dummy'*/
5342
+  (5.8ms) CREATE TABLE "snf_core_item_requests" ("id" bigserial primary key, "user_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "requested_delivery_date" date NOT NULL, "notes" text, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5343
+  (2.1ms) CREATE INDEX "index_snf_core_item_requests_on_product_id" ON "snf_core_item_requests" ("product_id") /*application='Dummy'*/
5344
+  (1.7ms) CREATE INDEX "index_snf_core_item_requests_on_user_id" ON "snf_core_item_requests" ("user_id") /*application='Dummy'*/
5345
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_order_items" CASCADE /*application='Dummy'*/
5346
+  (6.4ms) CREATE TABLE "snf_core_order_items" ("id" bigserial primary key, "order_id" bigint NOT NULL, "store_inventory_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5347
+  (1.8ms) CREATE INDEX "index_snf_core_order_items_on_order_id" ON "snf_core_order_items" ("order_id") /*application='Dummy'*/
5348
+  (1.5ms) CREATE INDEX "index_snf_core_order_items_on_store_inventory_id" ON "snf_core_order_items" ("store_inventory_id") /*application='Dummy'*/
5349
+  (0.4ms) DROP TABLE IF EXISTS "snf_core_orders" CASCADE /*application='Dummy'*/
5350
+  (7.3ms) CREATE TABLE "snf_core_orders" ("id" bigserial primary key, "user_id" bigint NOT NULL, "store_id" bigint NOT NULL, "status" integer DEFAULT 1 NOT NULL, "total_amount" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5351
+  (2.4ms) CREATE INDEX "index_snf_core_orders_on_store_id" ON "snf_core_orders" ("store_id") /*application='Dummy'*/
5352
+  (1.8ms) CREATE INDEX "index_snf_core_orders_on_user_id" ON "snf_core_orders" ("user_id") /*application='Dummy'*/
5353
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_products" CASCADE /*application='Dummy'*/
5354
+  (6.8ms) CREATE TABLE "snf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying, "category_id" bigint NOT NULL, "base_price" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5355
+  (1.9ms) CREATE INDEX "index_snf_core_products_on_category_id" ON "snf_core_products" ("category_id") /*application='Dummy'*/
5356
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_roles" CASCADE /*application='Dummy'*/
5357
+  (4.5ms) CREATE TABLE "snf_core_roles" ("id" bigserial primary key, "name" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5358
+  (0.6ms) DROP TABLE IF EXISTS "snf_core_store_inventories" CASCADE /*application='Dummy'*/
5359
+  (3.4ms) CREATE TABLE "snf_core_store_inventories" ("id" bigserial primary key, "store_id" bigint NOT NULL, "product_id" bigint NOT NULL, "base_price" decimal(10,2) NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "status" integer DEFAULT 0 NOT NULL) /*application='Dummy'*/
5360
+  (1.8ms) CREATE INDEX "index_snf_core_store_inventories_on_product_id" ON "snf_core_store_inventories" ("product_id") /*application='Dummy'*/
5361
+  (1.9ms) CREATE UNIQUE INDEX "index_snf_core_store_inventories_on_store_id_and_product_id" ON "snf_core_store_inventories" ("store_id", "product_id") /*application='Dummy'*/
5362
+  (1.6ms) CREATE INDEX "index_snf_core_store_inventories_on_store_id" ON "snf_core_store_inventories" ("store_id") /*application='Dummy'*/
5363
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_stores" CASCADE /*application='Dummy'*/
5364
+  (7.8ms) CREATE TABLE "snf_core_stores" ("id" bigserial primary key, "name" character varying NOT NULL, "email" character varying, "operational_status" integer DEFAULT 1 NOT NULL, "business_id" bigint NOT NULL, "address_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5365
+  (3.2ms) CREATE INDEX "index_snf_core_stores_on_address_id" ON "snf_core_stores" ("address_id") /*application='Dummy'*/
5366
+  (2.0ms) CREATE INDEX "index_snf_core_stores_on_business_id" ON "snf_core_stores" ("business_id") /*application='Dummy'*/
5367
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_user_roles" CASCADE /*application='Dummy'*/
5368
+  (4.5ms) CREATE TABLE "snf_core_user_roles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "role_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5369
+  (2.1ms) CREATE INDEX "index_snf_core_user_roles_on_role_id" ON "snf_core_user_roles" ("role_id") /*application='Dummy'*/
5370
+  (1.4ms) CREATE INDEX "index_snf_core_user_roles_on_user_id" ON "snf_core_user_roles" ("user_id") /*application='Dummy'*/
5371
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_users" CASCADE /*application='Dummy'*/
5372
+  (8.8ms) CREATE TABLE "snf_core_users" ("id" bigserial primary key, "first_name" character varying NOT NULL, "middle_name" character varying NOT NULL, "last_name" character varying NOT NULL, "email" character varying, "phone_number" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "password_digest" character varying NOT NULL, "password_changed" boolean DEFAULT FALSE, "reset_password_token" character varying, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying, "source_of_funds" character varying, "kyc_status" integer, "gender" integer, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint) /*application='Dummy'*/
5373
+  (0.4ms) DROP TABLE IF EXISTS "snf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
5374
+  (6.5ms) CREATE TABLE "snf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint, "to_account_id" bigint, "amount" decimal NOT NULL, "transaction_type" integer NOT NULL, "status" integer DEFAULT 0 NOT NULL, "reference_number" character varying NOT NULL, "description" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5375
+  (6.2ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_created_at" ON "snf_core_virtual_account_transactions" ("created_at") /*application='Dummy'*/
5376
+  (1.8ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_from_account_id" ON "snf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
5377
+  (1.8ms) CREATE UNIQUE INDEX "idx_on_reference_number_bd9be00f20" ON "snf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
5378
+  (2.6ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_to_account_id" ON "snf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
5379
+  (0.4ms) DROP TABLE IF EXISTS "snf_core_virtual_accounts" CASCADE /*application='Dummy'*/
5380
+  (6.4ms) CREATE TABLE "snf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying(11) NOT NULL, "cbs_account_number" character varying NOT NULL, "balance" decimal DEFAULT 0.0 NOT NULL, "interest_rate" decimal DEFAULT 0.0 NOT NULL, "interest_type" integer DEFAULT 0 NOT NULL, "active" boolean DEFAULT TRUE NOT NULL, "branch_code" character varying(3) NOT NULL, "product_scheme" character varying(1) NOT NULL, "voucher_type" character varying(1) NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5381
+  (3.6ms) CREATE UNIQUE INDEX "index_snf_core_virtual_accounts_on_account_number" ON "snf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
5382
+  (4.7ms) CREATE INDEX "idx_on_branch_code_product_scheme_voucher_type_b7038b3d5f" ON "snf_core_virtual_accounts" ("branch_code", "product_scheme", "voucher_type") /*application='Dummy'*/
5383
+  (4.2ms) CREATE UNIQUE INDEX "index_snf_core_virtual_accounts_on_cbs_account_number" ON "snf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
5384
+  (1.4ms) CREATE INDEX "index_snf_core_virtual_accounts_on_user_id" ON "snf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
5385
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_wallets" CASCADE /*application='Dummy'*/
5386
+  (4.4ms) CREATE TABLE "snf_core_wallets" ("id" bigserial primary key, "user_id" bigint NOT NULL, "wallet_number" character varying NOT NULL, "balance" decimal NOT NULL, "is_active" boolean DEFAULT TRUE NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5387
+  (1.4ms) CREATE INDEX "index_snf_core_wallets_on_user_id" ON "snf_core_wallets" ("user_id") /*application='Dummy'*/
5388
+  (1.8ms) CREATE UNIQUE INDEX "index_snf_core_wallets_on_wallet_number" ON "snf_core_wallets" ("wallet_number") /*application='Dummy'*/
5389
+  (4.0ms) ALTER TABLE "active_storage_attachments" ADD CONSTRAINT "fk_rails_c3b3935057"
5390
+ FOREIGN KEY ("blob_id")
5391
+ REFERENCES "active_storage_blobs" ("id")
5392
+ /*application='Dummy'*/
5393
+  (1.6ms) ALTER TABLE "active_storage_variant_records" ADD CONSTRAINT "fk_rails_993965df05"
5394
+ FOREIGN KEY ("blob_id")
5395
+ REFERENCES "active_storage_blobs" ("id")
5396
+ /*application='Dummy'*/
5397
+  (2.0ms) ALTER TABLE "snf_core_account_transfers" ADD CONSTRAINT "fk_rails_0d109a55ef"
5398
+ FOREIGN KEY ("user_id")
5399
+ REFERENCES "snf_core_users" ("id")
5400
+ /*application='Dummy'*/
5401
+  (2.2ms) ALTER TABLE "snf_core_business_documents" ADD CONSTRAINT "fk_rails_1efd7338ed"
5402
+ FOREIGN KEY ("business_id")
5403
+ REFERENCES "snf_core_businesses" ("id")
5404
+ /*application='Dummy'*/
5405
+  (1.3ms) ALTER TABLE "snf_core_business_documents" ADD CONSTRAINT "fk_rails_a6157021cc"
5406
+ FOREIGN KEY ("verified_by_id")
5407
+ REFERENCES "snf_core_users" ("id")
5408
+ /*application='Dummy'*/
5409
+  (0.9ms) ALTER TABLE "snf_core_businesses" ADD CONSTRAINT "fk_rails_a61edcbd4b"
5410
+ FOREIGN KEY ("user_id")
5411
+ REFERENCES "snf_core_users" ("id")
5412
+ /*application='Dummy'*/
5413
+  (1.8ms) ALTER TABLE "snf_core_categories" ADD CONSTRAINT "fk_rails_26a925b05d"
5414
+ FOREIGN KEY ("parent_id")
5415
+ REFERENCES "snf_core_categories" ("id")
5416
+ /*application='Dummy'*/
5417
+  (1.8ms) ALTER TABLE "snf_core_customer_groups" ADD CONSTRAINT "fk_rails_9c45f4015a"
5418
+ FOREIGN KEY ("group_id")
5419
+ REFERENCES "snf_core_groups" ("id")
5420
+ /*application='Dummy'*/
5421
+  (1.2ms) ALTER TABLE "snf_core_customer_groups" ADD CONSTRAINT "fk_rails_792eb3404d"
5422
+ FOREIGN KEY ("customer_id")
5423
+ REFERENCES "snf_core_users" ("id")
5424
+ /*application='Dummy'*/
5425
+  (1.8ms) ALTER TABLE "snf_core_delivery_orders" ADD CONSTRAINT "fk_rails_450d17b1b2"
5426
+ FOREIGN KEY ("order_id")
5427
+ REFERENCES "snf_core_orders" ("id")
5428
+ /*application='Dummy'*/
5429
+  (1.3ms) ALTER TABLE "snf_core_groups" ADD CONSTRAINT "fk_rails_c52b27ad67"
5430
+ FOREIGN KEY ("business_id")
5431
+ REFERENCES "snf_core_businesses" ("id")
5432
+ /*application='Dummy'*/
5433
+  (1.8ms) ALTER TABLE "snf_core_item_requests" ADD CONSTRAINT "fk_rails_a718316b94"
5434
+ FOREIGN KEY ("product_id")
5435
+ REFERENCES "snf_core_products" ("id")
5436
+ /*application='Dummy'*/
5437
+  (1.8ms) ALTER TABLE "snf_core_item_requests" ADD CONSTRAINT "fk_rails_0aa2ea2057"
5438
+ FOREIGN KEY ("user_id")
5439
+ REFERENCES "snf_core_users" ("id")
5440
+ /*application='Dummy'*/
5441
+  (1.6ms) ALTER TABLE "snf_core_order_items" ADD CONSTRAINT "fk_rails_1f4046ba92"
5442
+ FOREIGN KEY ("order_id")
5443
+ REFERENCES "snf_core_orders" ("id")
5444
+ /*application='Dummy'*/
5445
+  (2.7ms) ALTER TABLE "snf_core_order_items" ADD CONSTRAINT "fk_rails_50419437e9"
5446
+ FOREIGN KEY ("store_inventory_id")
5447
+ REFERENCES "snf_core_store_inventories" ("id")
5448
+ /*application='Dummy'*/
5449
+  (2.4ms) ALTER TABLE "snf_core_orders" ADD CONSTRAINT "fk_rails_400cf2029c"
5450
+ FOREIGN KEY ("store_id")
5451
+ REFERENCES "snf_core_stores" ("id")
5452
+ /*application='Dummy'*/
5453
+  (1.3ms) ALTER TABLE "snf_core_orders" ADD CONSTRAINT "fk_rails_45b78fb6f9"
5454
+ FOREIGN KEY ("user_id")
5455
+ REFERENCES "snf_core_users" ("id")
5456
+ /*application='Dummy'*/
5457
+  (2.1ms) ALTER TABLE "snf_core_products" ADD CONSTRAINT "fk_rails_a0ba3fa883"
5458
+ FOREIGN KEY ("category_id")
5459
+ REFERENCES "snf_core_categories" ("id")
5460
+ /*application='Dummy'*/
5461
+  (1.7ms) ALTER TABLE "snf_core_store_inventories" ADD CONSTRAINT "fk_rails_15fb263e75"
5462
+ FOREIGN KEY ("product_id")
5463
+ REFERENCES "snf_core_products" ("id")
5464
+ /*application='Dummy'*/
5465
+  (1.1ms) ALTER TABLE "snf_core_store_inventories" ADD CONSTRAINT "fk_rails_2ca88d30e2"
5466
+ FOREIGN KEY ("store_id")
5467
+ REFERENCES "snf_core_stores" ("id")
5468
+ /*application='Dummy'*/
5469
+  (1.2ms) ALTER TABLE "snf_core_stores" ADD CONSTRAINT "fk_rails_421441da8e"
5470
+ FOREIGN KEY ("address_id")
5471
+ REFERENCES "snf_core_addresses" ("id")
5472
+ /*application='Dummy'*/
5473
+  (1.1ms) ALTER TABLE "snf_core_stores" ADD CONSTRAINT "fk_rails_e100fc7454"
5474
+ FOREIGN KEY ("business_id")
5475
+ REFERENCES "snf_core_businesses" ("id")
5476
+ /*application='Dummy'*/
5477
+  (2.1ms) ALTER TABLE "snf_core_user_roles" ADD CONSTRAINT "fk_rails_0e70d7ce00"
5478
+ FOREIGN KEY ("role_id")
5479
+ REFERENCES "snf_core_roles" ("id")
5480
+ /*application='Dummy'*/
5481
+  (1.2ms) ALTER TABLE "snf_core_user_roles" ADD CONSTRAINT "fk_rails_9ad2e78133"
5482
+ FOREIGN KEY ("user_id")
5483
+ REFERENCES "snf_core_users" ("id")
5484
+ /*application='Dummy'*/
5485
+  (1.2ms) ALTER TABLE "snf_core_users" ADD CONSTRAINT "fk_rails_aaf9dcb5a5"
5486
+ FOREIGN KEY ("address_id")
5487
+ REFERENCES "snf_core_addresses" ("id")
5488
+ /*application='Dummy'*/
5489
+  (0.9ms) ALTER TABLE "snf_core_users" ADD CONSTRAINT "fk_rails_e672dea3f8"
5490
+ FOREIGN KEY ("verified_by_id")
5491
+ REFERENCES "snf_core_users" ("id")
5492
+ ON DELETE SET NULL /*application='Dummy'*/
5493
+  (2.4ms) ALTER TABLE "snf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_746fa19f46"
5494
+ FOREIGN KEY ("from_account_id")
5495
+ REFERENCES "snf_core_virtual_accounts" ("id")
5496
+ /*application='Dummy'*/
5497
+  (1.1ms) ALTER TABLE "snf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_87430c1b60"
5498
+ FOREIGN KEY ("to_account_id")
5499
+ REFERENCES "snf_core_virtual_accounts" ("id")
5500
+ /*application='Dummy'*/
5501
+  (1.1ms) ALTER TABLE "snf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_5b22a265fb"
5502
+ FOREIGN KEY ("user_id")
5503
+ REFERENCES "snf_core_users" ("id")
5504
+ /*application='Dummy'*/
5505
+  (2.2ms) ALTER TABLE "snf_core_wallets" ADD CONSTRAINT "fk_rails_77c94979ce"
5506
+ FOREIGN KEY ("user_id")
5507
+ REFERENCES "snf_core_users" ("id")
5508
+ /*application='Dummy'*/
5509
+  (4.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
5510
+ ActiveRecord::SchemaMigration Load (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5511
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES (20250311000000) /*application='Dummy'*/
5512
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES
5513
+ (20250310143604),
5514
+ (20250310133249),
5515
+ (20250310123127),
5516
+ (20250310122954),
5517
+ (20250306074713),
5518
+ (20250305232530),
5519
+ (20250305232529),
5520
+ (20250305201008),
5521
+ (20250305170248),
5522
+ (20250305165926),
5523
+ (20250227102833),
5524
+ (20250227075048),
5525
+ (20250226193938),
5526
+ (20250226192104),
5527
+ (20250226190000),
5528
+ (20250226181007),
5529
+ (20250226123213),
5530
+ (20250226115215),
5531
+ (20250226110217),
5532
+ (20250226102931),
5533
+ (20250226080323),
5534
+ (20250226064444),
5535
+ (20250226042622); /*application='Dummy'*/
5536
+  (5.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5537
+ ActiveRecord::InternalMetadata Load (1.4ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5538
+ ActiveRecord::InternalMetadata Create (0.8ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-12 02:52:35.101037', '2025-03-12 02:52:35.101040') RETURNING "key" /*application='Dummy'*/
5539
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5540
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5541
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '139da439c16c30ce13d228e1851d357076cdd081', '2025-03-12 02:52:35.105002', '2025-03-12 02:52:35.105003') RETURNING "key" /*application='Dummy'*/
5542
+  (0.3ms) SELECT pg_try_advisory_lock(869468062957908540) /*application='Dummy'*/
5543
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5544
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5545
+  (0.5ms) SELECT pg_advisory_unlock(869468062957908540) /*application='Dummy'*/
5546
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5547
+ SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
5548
+  (31.6ms) CREATE DATABASE "snf_dev" ENCODING = 'unicode' /*application='Dummy'*/
5549
+ SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
5550
+  (262.2ms) CREATE DATABASE "snf_test" ENCODING = 'unicode' /*application='Dummy'*/
5551
+ ActiveRecord::SchemaMigration Load (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5552
+ ActiveRecord::InternalMetadata Load (1.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5553
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5554
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5555
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5556
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5557
+ SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
5558
+  (75.6ms) DROP DATABASE IF EXISTS "snf_test" /*application='Dummy'*/
5559
+  (139.2ms) CREATE DATABASE "snf_test" ENCODING = 'unicode' /*application='Dummy'*/
5560
+ SQL (19.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
5561
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_attachments" CASCADE /*application='Dummy'*/
5562
+  (6.4ms) CREATE TABLE "active_storage_attachments" ("id" bigserial primary key, "name" character varying NOT NULL, "record_type" character varying NOT NULL, "record_id" bigint NOT NULL, "blob_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5563
+  (0.7ms) CREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id") /*application='Dummy'*/
5564
+  (1.2ms) CREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id") /*application='Dummy'*/
5565
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_blobs" CASCADE /*application='Dummy'*/
5566
+  (2.1ms) CREATE TABLE "active_storage_blobs" ("id" bigserial primary key, "key" character varying NOT NULL, "filename" character varying NOT NULL, "content_type" character varying, "metadata" text, "service_name" character varying NOT NULL, "byte_size" bigint NOT NULL, "checksum" character varying, "created_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5567
+  (1.5ms) CREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key") /*application='Dummy'*/
5568
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_variant_records" CASCADE /*application='Dummy'*/
5569
+  (3.3ms) CREATE TABLE "active_storage_variant_records" ("id" bigserial primary key, "blob_id" bigint NOT NULL, "variation_digest" character varying NOT NULL) /*application='Dummy'*/
5570
+  (1.0ms) CREATE UNIQUE INDEX "index_active_storage_variant_records_uniqueness" ON "active_storage_variant_records" ("blob_id", "variation_digest") /*application='Dummy'*/
5571
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_account_transfers" CASCADE /*application='Dummy'*/
5572
+  (3.3ms) CREATE TABLE "snf_core_account_transfers" ("id" bigserial primary key, "source_account_type" character varying NOT NULL, "source_account_id" bigint NOT NULL, "destination_account_type" character varying NOT NULL, "destination_account_id" bigint NOT NULL, "user_id" bigint NOT NULL, "amount" decimal(15,2) NOT NULL, "reference_number" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "transfer_type" integer NOT NULL, "description" text, "failure_reason" text, "completed_at" timestamp(6), "reversal_transfer_id" bigint, "cbs_response_data" jsonb, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5573
+  (0.9ms) CREATE INDEX "index_snf_core_account_transfers_on_destination_account" ON "snf_core_account_transfers" ("destination_account_type", "destination_account_id") /*application='Dummy'*/
5574
+  (1.4ms) CREATE UNIQUE INDEX "index_snf_core_account_transfers_on_reference_number" ON "snf_core_account_transfers" ("reference_number") /*application='Dummy'*/
5575
+  (0.7ms) CREATE INDEX "index_snf_core_account_transfers_on_reversal_transfer_id" ON "snf_core_account_transfers" ("reversal_transfer_id") /*application='Dummy'*/
5576
+  (0.9ms) CREATE INDEX "index_snf_core_account_transfers_on_source_account" ON "snf_core_account_transfers" ("source_account_type", "source_account_id") /*application='Dummy'*/
5577
+  (0.6ms) CREATE INDEX "index_snf_core_account_transfers_on_user_id" ON "snf_core_account_transfers" ("user_id") /*application='Dummy'*/
5578
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_addresses" CASCADE /*application='Dummy'*/
5579
+  (4.2ms) CREATE TABLE "snf_core_addresses" ("id" bigserial primary key, "address_type" character varying NOT NULL, "city" character varying NOT NULL, "sub_city" character varying NOT NULL, "woreda" character varying, "latitude" decimal NOT NULL, "longitude" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "house_number" character varying) /*application='Dummy'*/
5580
+  (0.5ms) DROP TABLE IF EXISTS "snf_core_business_documents" CASCADE /*application='Dummy'*/
5581
+  (2.0ms) CREATE TABLE "snf_core_business_documents" ("id" bigserial primary key, "business_id" bigint NOT NULL, "document_type" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "uploaded_at" timestamp(6), "is_verified" boolean DEFAULT FALSE NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5582
+  (1.0ms) CREATE INDEX "index_snf_core_business_documents_on_business_id" ON "snf_core_business_documents" ("business_id") /*application='Dummy'*/
5583
+  (0.9ms) CREATE INDEX "index_snf_core_business_documents_on_verified_by_id" ON "snf_core_business_documents" ("verified_by_id") /*application='Dummy'*/
5584
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_businesses" CASCADE /*application='Dummy'*/
5585
+  (2.4ms) CREATE TABLE "snf_core_businesses" ("id" bigserial primary key, "user_id" bigint NOT NULL, "business_name" character varying NOT NULL, "tin_number" character varying NOT NULL, "business_type" integer NOT NULL, "verified_at" timestamp(6), "verification_status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5586
+  (1.2ms) CREATE INDEX "index_snf_core_businesses_on_user_id" ON "snf_core_businesses" ("user_id") /*application='Dummy'*/
5587
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_categories" CASCADE /*application='Dummy'*/
5588
+  (2.7ms) CREATE TABLE "snf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5589
+  (0.7ms) CREATE INDEX "index_snf_core_categories_on_parent_id" ON "snf_core_categories" ("parent_id") /*application='Dummy'*/
5590
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_customer_groups" CASCADE /*application='Dummy'*/
5591
+  (2.3ms) CREATE TABLE "snf_core_customer_groups" ("id" bigserial primary key, "discount_code" character varying, "expire_date" timestamp(6), "is_used" boolean, "group_id" bigint NOT NULL, "customer_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5592
+  (0.8ms) CREATE INDEX "index_snf_core_customer_groups_on_customer_id" ON "snf_core_customer_groups" ("customer_id") /*application='Dummy'*/
5593
+  (1.3ms) CREATE INDEX "index_snf_core_customer_groups_on_group_id" ON "snf_core_customer_groups" ("group_id") /*application='Dummy'*/
5594
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_delivery_orders" CASCADE /*application='Dummy'*/
5595
+  (2.4ms) CREATE TABLE "snf_core_delivery_orders" ("id" bigserial primary key, "order_id" bigint NOT NULL, "delivery_address" character varying NOT NULL, "contact_phone" character varying NOT NULL, "delivery_notes" text NOT NULL, "estimated_delivery_time" timestamp(6) NOT NULL, "actual_delivery_time" timestamp(6), "status" integer NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5596
+  (1.0ms) CREATE INDEX "index_snf_core_delivery_orders_on_order_id" ON "snf_core_delivery_orders" ("order_id") /*application='Dummy'*/
5597
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_groups" CASCADE /*application='Dummy'*/
5598
+  (2.6ms) CREATE TABLE "snf_core_groups" ("id" bigserial primary key, "name" character varying NOT NULL, "business_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5599
+  (0.9ms) CREATE INDEX "index_snf_core_groups_on_business_id" ON "snf_core_groups" ("business_id") /*application='Dummy'*/
5600
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_item_requests" CASCADE /*application='Dummy'*/
5601
+  (2.8ms) CREATE TABLE "snf_core_item_requests" ("id" bigserial primary key, "user_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "requested_delivery_date" date NOT NULL, "notes" text, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5602
+  (0.8ms) CREATE INDEX "index_snf_core_item_requests_on_product_id" ON "snf_core_item_requests" ("product_id") /*application='Dummy'*/
5603
+  (0.7ms) CREATE INDEX "index_snf_core_item_requests_on_user_id" ON "snf_core_item_requests" ("user_id") /*application='Dummy'*/
5604
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_order_items" CASCADE /*application='Dummy'*/
5605
+  (3.0ms) CREATE TABLE "snf_core_order_items" ("id" bigserial primary key, "order_id" bigint NOT NULL, "store_inventory_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5606
+  (0.9ms) CREATE INDEX "index_snf_core_order_items_on_order_id" ON "snf_core_order_items" ("order_id") /*application='Dummy'*/
5607
+  (1.0ms) CREATE INDEX "index_snf_core_order_items_on_store_inventory_id" ON "snf_core_order_items" ("store_inventory_id") /*application='Dummy'*/
5608
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_orders" CASCADE /*application='Dummy'*/
5609
+  (3.5ms) CREATE TABLE "snf_core_orders" ("id" bigserial primary key, "user_id" bigint NOT NULL, "store_id" bigint NOT NULL, "status" integer DEFAULT 1 NOT NULL, "total_amount" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5610
+  (6.9ms) CREATE INDEX "index_snf_core_orders_on_store_id" ON "snf_core_orders" ("store_id") /*application='Dummy'*/
5611
+  (1.4ms) CREATE INDEX "index_snf_core_orders_on_user_id" ON "snf_core_orders" ("user_id") /*application='Dummy'*/
5612
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_products" CASCADE /*application='Dummy'*/
5613
+  (3.9ms) CREATE TABLE "snf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying, "category_id" bigint NOT NULL, "base_price" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5614
+  (1.8ms) CREATE INDEX "index_snf_core_products_on_category_id" ON "snf_core_products" ("category_id") /*application='Dummy'*/
5615
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_roles" CASCADE /*application='Dummy'*/
5616
+  (3.6ms) CREATE TABLE "snf_core_roles" ("id" bigserial primary key, "name" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5617
+  (0.9ms) DROP TABLE IF EXISTS "snf_core_store_inventories" CASCADE /*application='Dummy'*/
5618
+  (3.1ms) CREATE TABLE "snf_core_store_inventories" ("id" bigserial primary key, "store_id" bigint NOT NULL, "product_id" bigint NOT NULL, "base_price" decimal(10,2) NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "status" integer DEFAULT 0 NOT NULL) /*application='Dummy'*/
5619
+  (1.7ms) CREATE INDEX "index_snf_core_store_inventories_on_product_id" ON "snf_core_store_inventories" ("product_id") /*application='Dummy'*/
5620
+  (1.2ms) CREATE UNIQUE INDEX "index_snf_core_store_inventories_on_store_id_and_product_id" ON "snf_core_store_inventories" ("store_id", "product_id") /*application='Dummy'*/
5621
+  (1.0ms) CREATE INDEX "index_snf_core_store_inventories_on_store_id" ON "snf_core_store_inventories" ("store_id") /*application='Dummy'*/
5622
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_stores" CASCADE /*application='Dummy'*/
5623
+  (4.0ms) CREATE TABLE "snf_core_stores" ("id" bigserial primary key, "name" character varying NOT NULL, "email" character varying, "operational_status" integer DEFAULT 1 NOT NULL, "business_id" bigint NOT NULL, "address_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5624
+  (1.7ms) CREATE INDEX "index_snf_core_stores_on_address_id" ON "snf_core_stores" ("address_id") /*application='Dummy'*/
5625
+  (1.2ms) CREATE INDEX "index_snf_core_stores_on_business_id" ON "snf_core_stores" ("business_id") /*application='Dummy'*/
5626
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_user_roles" CASCADE /*application='Dummy'*/
5627
+  (3.1ms) CREATE TABLE "snf_core_user_roles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "role_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5628
+  (1.7ms) CREATE INDEX "index_snf_core_user_roles_on_role_id" ON "snf_core_user_roles" ("role_id") /*application='Dummy'*/
5629
+  (1.3ms) CREATE INDEX "index_snf_core_user_roles_on_user_id" ON "snf_core_user_roles" ("user_id") /*application='Dummy'*/
5630
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_users" CASCADE /*application='Dummy'*/
5631
+  (5.3ms) CREATE TABLE "snf_core_users" ("id" bigserial primary key, "first_name" character varying NOT NULL, "middle_name" character varying NOT NULL, "last_name" character varying NOT NULL, "email" character varying, "phone_number" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "password_digest" character varying NOT NULL, "password_changed" boolean DEFAULT FALSE, "reset_password_token" character varying, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying, "source_of_funds" character varying, "kyc_status" integer, "gender" integer, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint) /*application='Dummy'*/
5632
+  (0.6ms) DROP TABLE IF EXISTS "snf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
5633
+  (4.7ms) CREATE TABLE "snf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint, "to_account_id" bigint, "amount" decimal NOT NULL, "transaction_type" integer NOT NULL, "status" integer DEFAULT 0 NOT NULL, "reference_number" character varying NOT NULL, "description" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5634
+  (3.0ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_created_at" ON "snf_core_virtual_account_transactions" ("created_at") /*application='Dummy'*/
5635
+  (2.6ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_from_account_id" ON "snf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
5636
+  (2.5ms) CREATE UNIQUE INDEX "idx_on_reference_number_bd9be00f20" ON "snf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
5637
+  (1.9ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_to_account_id" ON "snf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
5638
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_virtual_accounts" CASCADE /*application='Dummy'*/
5639
+  (7.1ms) CREATE TABLE "snf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying(11) NOT NULL, "cbs_account_number" character varying NOT NULL, "balance" decimal DEFAULT 0.0 NOT NULL, "interest_rate" decimal DEFAULT 0.0 NOT NULL, "interest_type" integer DEFAULT 0 NOT NULL, "active" boolean DEFAULT TRUE NOT NULL, "branch_code" character varying(3) NOT NULL, "product_scheme" character varying(1) NOT NULL, "voucher_type" character varying(1) NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5640
+  (1.8ms) CREATE UNIQUE INDEX "index_snf_core_virtual_accounts_on_account_number" ON "snf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
5641
+  (1.7ms) CREATE INDEX "idx_on_branch_code_product_scheme_voucher_type_b7038b3d5f" ON "snf_core_virtual_accounts" ("branch_code", "product_scheme", "voucher_type") /*application='Dummy'*/
5642
+  (1.4ms) CREATE UNIQUE INDEX "index_snf_core_virtual_accounts_on_cbs_account_number" ON "snf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
5643
+  (1.3ms) CREATE INDEX "index_snf_core_virtual_accounts_on_user_id" ON "snf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
5644
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_wallets" CASCADE /*application='Dummy'*/
5645
+  (8.3ms) CREATE TABLE "snf_core_wallets" ("id" bigserial primary key, "user_id" bigint NOT NULL, "wallet_number" character varying NOT NULL, "balance" decimal NOT NULL, "is_active" boolean DEFAULT TRUE NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5646
+  (1.8ms) CREATE INDEX "index_snf_core_wallets_on_user_id" ON "snf_core_wallets" ("user_id") /*application='Dummy'*/
5647
+  (1.7ms) CREATE UNIQUE INDEX "index_snf_core_wallets_on_wallet_number" ON "snf_core_wallets" ("wallet_number") /*application='Dummy'*/
5648
+  (4.0ms) ALTER TABLE "active_storage_attachments" ADD CONSTRAINT "fk_rails_c3b3935057"
5649
+ FOREIGN KEY ("blob_id")
5650
+ REFERENCES "active_storage_blobs" ("id")
5651
+ /*application='Dummy'*/
5652
+  (2.3ms) ALTER TABLE "active_storage_variant_records" ADD CONSTRAINT "fk_rails_993965df05"
5653
+ FOREIGN KEY ("blob_id")
5654
+ REFERENCES "active_storage_blobs" ("id")
5655
+ /*application='Dummy'*/
5656
+  (2.7ms) ALTER TABLE "snf_core_account_transfers" ADD CONSTRAINT "fk_rails_0d109a55ef"
5657
+ FOREIGN KEY ("user_id")
5658
+ REFERENCES "snf_core_users" ("id")
5659
+ /*application='Dummy'*/
5660
+  (2.2ms) ALTER TABLE "snf_core_business_documents" ADD CONSTRAINT "fk_rails_1efd7338ed"
5661
+ FOREIGN KEY ("business_id")
5662
+ REFERENCES "snf_core_businesses" ("id")
5663
+ /*application='Dummy'*/
5664
+  (1.8ms) ALTER TABLE "snf_core_business_documents" ADD CONSTRAINT "fk_rails_a6157021cc"
5665
+ FOREIGN KEY ("verified_by_id")
5666
+ REFERENCES "snf_core_users" ("id")
5667
+ /*application='Dummy'*/
5668
+  (2.0ms) ALTER TABLE "snf_core_businesses" ADD CONSTRAINT "fk_rails_a61edcbd4b"
5669
+ FOREIGN KEY ("user_id")
5670
+ REFERENCES "snf_core_users" ("id")
5671
+ /*application='Dummy'*/
5672
+  (1.9ms) ALTER TABLE "snf_core_categories" ADD CONSTRAINT "fk_rails_26a925b05d"
5673
+ FOREIGN KEY ("parent_id")
5674
+ REFERENCES "snf_core_categories" ("id")
5675
+ /*application='Dummy'*/
5676
+  (2.3ms) ALTER TABLE "snf_core_customer_groups" ADD CONSTRAINT "fk_rails_9c45f4015a"
5677
+ FOREIGN KEY ("group_id")
5678
+ REFERENCES "snf_core_groups" ("id")
5679
+ /*application='Dummy'*/
5680
+  (1.8ms) ALTER TABLE "snf_core_customer_groups" ADD CONSTRAINT "fk_rails_792eb3404d"
5681
+ FOREIGN KEY ("customer_id")
5682
+ REFERENCES "snf_core_users" ("id")
5683
+ /*application='Dummy'*/
5684
+  (2.4ms) ALTER TABLE "snf_core_delivery_orders" ADD CONSTRAINT "fk_rails_450d17b1b2"
5685
+ FOREIGN KEY ("order_id")
5686
+ REFERENCES "snf_core_orders" ("id")
5687
+ /*application='Dummy'*/
5688
+  (1.5ms) ALTER TABLE "snf_core_groups" ADD CONSTRAINT "fk_rails_c52b27ad67"
5689
+ FOREIGN KEY ("business_id")
5690
+ REFERENCES "snf_core_businesses" ("id")
5691
+ /*application='Dummy'*/
5692
+  (2.8ms) ALTER TABLE "snf_core_item_requests" ADD CONSTRAINT "fk_rails_a718316b94"
5693
+ FOREIGN KEY ("product_id")
5694
+ REFERENCES "snf_core_products" ("id")
5695
+ /*application='Dummy'*/
5696
+  (2.8ms) ALTER TABLE "snf_core_item_requests" ADD CONSTRAINT "fk_rails_0aa2ea2057"
5697
+ FOREIGN KEY ("user_id")
5698
+ REFERENCES "snf_core_users" ("id")
5699
+ /*application='Dummy'*/
5700
+  (2.0ms) ALTER TABLE "snf_core_order_items" ADD CONSTRAINT "fk_rails_1f4046ba92"
5701
+ FOREIGN KEY ("order_id")
5702
+ REFERENCES "snf_core_orders" ("id")
5703
+ /*application='Dummy'*/
5704
+  (2.2ms) ALTER TABLE "snf_core_order_items" ADD CONSTRAINT "fk_rails_50419437e9"
5705
+ FOREIGN KEY ("store_inventory_id")
5706
+ REFERENCES "snf_core_store_inventories" ("id")
5707
+ /*application='Dummy'*/
5708
+  (2.0ms) ALTER TABLE "snf_core_orders" ADD CONSTRAINT "fk_rails_400cf2029c"
5709
+ FOREIGN KEY ("store_id")
5710
+ REFERENCES "snf_core_stores" ("id")
5711
+ /*application='Dummy'*/
5712
+  (3.2ms) ALTER TABLE "snf_core_orders" ADD CONSTRAINT "fk_rails_45b78fb6f9"
5713
+ FOREIGN KEY ("user_id")
5714
+ REFERENCES "snf_core_users" ("id")
5715
+ /*application='Dummy'*/
5716
+  (2.1ms) ALTER TABLE "snf_core_products" ADD CONSTRAINT "fk_rails_a0ba3fa883"
5717
+ FOREIGN KEY ("category_id")
5718
+ REFERENCES "snf_core_categories" ("id")
5719
+ /*application='Dummy'*/
5720
+  (1.7ms) ALTER TABLE "snf_core_store_inventories" ADD CONSTRAINT "fk_rails_15fb263e75"
5721
+ FOREIGN KEY ("product_id")
5722
+ REFERENCES "snf_core_products" ("id")
5723
+ /*application='Dummy'*/
5724
+  (1.6ms) ALTER TABLE "snf_core_store_inventories" ADD CONSTRAINT "fk_rails_2ca88d30e2"
5725
+ FOREIGN KEY ("store_id")
5726
+ REFERENCES "snf_core_stores" ("id")
5727
+ /*application='Dummy'*/
5728
+  (1.2ms) ALTER TABLE "snf_core_stores" ADD CONSTRAINT "fk_rails_421441da8e"
5729
+ FOREIGN KEY ("address_id")
5730
+ REFERENCES "snf_core_addresses" ("id")
5731
+ /*application='Dummy'*/
5732
+  (1.3ms) ALTER TABLE "snf_core_stores" ADD CONSTRAINT "fk_rails_e100fc7454"
5733
+ FOREIGN KEY ("business_id")
5734
+ REFERENCES "snf_core_businesses" ("id")
5735
+ /*application='Dummy'*/
5736
+  (2.2ms) ALTER TABLE "snf_core_user_roles" ADD CONSTRAINT "fk_rails_0e70d7ce00"
5737
+ FOREIGN KEY ("role_id")
5738
+ REFERENCES "snf_core_roles" ("id")
5739
+ /*application='Dummy'*/
5740
+  (1.3ms) ALTER TABLE "snf_core_user_roles" ADD CONSTRAINT "fk_rails_9ad2e78133"
5741
+ FOREIGN KEY ("user_id")
5742
+ REFERENCES "snf_core_users" ("id")
5743
+ /*application='Dummy'*/
5744
+  (1.6ms) ALTER TABLE "snf_core_users" ADD CONSTRAINT "fk_rails_aaf9dcb5a5"
5745
+ FOREIGN KEY ("address_id")
5746
+ REFERENCES "snf_core_addresses" ("id")
5747
+ /*application='Dummy'*/
5748
+  (1.1ms) ALTER TABLE "snf_core_users" ADD CONSTRAINT "fk_rails_e672dea3f8"
5749
+ FOREIGN KEY ("verified_by_id")
5750
+ REFERENCES "snf_core_users" ("id")
5751
+ ON DELETE SET NULL /*application='Dummy'*/
5752
+  (2.0ms) ALTER TABLE "snf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_746fa19f46"
5753
+ FOREIGN KEY ("from_account_id")
5754
+ REFERENCES "snf_core_virtual_accounts" ("id")
5755
+ /*application='Dummy'*/
5756
+  (1.5ms) ALTER TABLE "snf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_87430c1b60"
5757
+ FOREIGN KEY ("to_account_id")
5758
+ REFERENCES "snf_core_virtual_accounts" ("id")
5759
+ /*application='Dummy'*/
5760
+  (1.4ms) ALTER TABLE "snf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_5b22a265fb"
5761
+ FOREIGN KEY ("user_id")
5762
+ REFERENCES "snf_core_users" ("id")
5763
+ /*application='Dummy'*/
5764
+  (1.7ms) ALTER TABLE "snf_core_wallets" ADD CONSTRAINT "fk_rails_77c94979ce"
5765
+ FOREIGN KEY ("user_id")
5766
+ REFERENCES "snf_core_users" ("id")
5767
+ /*application='Dummy'*/
5768
+  (4.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
5769
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5770
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES (20250311000000) /*application='Dummy'*/
5771
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES
5772
+ (20250310143604),
5773
+ (20250310133249),
5774
+ (20250310123127),
5775
+ (20250310122954),
5776
+ (20250306074713),
5777
+ (20250305232530),
5778
+ (20250305232529),
5779
+ (20250305201008),
5780
+ (20250305170248),
5781
+ (20250305165926),
5782
+ (20250227102833),
5783
+ (20250227075048),
5784
+ (20250226193938),
5785
+ (20250226192104),
5786
+ (20250226190000),
5787
+ (20250226181007),
5788
+ (20250226123213),
5789
+ (20250226115215),
5790
+ (20250226110217),
5791
+ (20250226102931),
5792
+ (20250226080323),
5793
+ (20250226064444),
5794
+ (20250226042622); /*application='Dummy'*/
5795
+  (4.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5796
+ ActiveRecord::InternalMetadata Load (1.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5797
+ ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-12 02:53:22.246467', '2025-03-12 02:53:22.246470') RETURNING "key" /*application='Dummy'*/
5798
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5799
+ ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-12 02:53:22.250154' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
5800
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5801
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '8f9fff732890dd4b4ce6db66c5ce832562876d08', '2025-03-12 02:53:22.252927', '2025-03-12 02:53:22.252929') RETURNING "key" /*application='Dummy'*/
5802
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 06:04:54 +0300
5803
+ ActiveRecord::SchemaMigration Load (3.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5804
+ Processing by SnfCore::AuthController#signup as */*
5805
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Doe", "last_name" => "Smith", "phone_number" => "1234567890", "password" => "[FILTERED]", "business_name" => "Test Business", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "address_id" => 1, "nationality" => "Ethiopia", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Doe", "last_name" => "Smith", "phone_number" => "1234567890", "password" => "[FILTERED]", "business_name" => "Test Business", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "address_id" => 1, "nationality" => "Ethiopia", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}}}
5806
+ TRANSACTION (3.1ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
5807
+ SnfCore::Address Load (1.3ms) SELECT "snf_core_addresses".* FROM "snf_core_addresses" WHERE "snf_core_addresses"."id" = 1 LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
5808
+ SnfCore::User Exists? (2.3ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '1234567890' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
5809
+ SnfCore::User Exists? (0.3ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
5810
+ TRANSACTION (0.4ms) COMMIT /*action='signup',application='Dummy',controller='auth'*/
5811
+ Completed 422 Unprocessable Content in 871ms (Views: 0.1ms | ActiveRecord: 53.9ms (3 queries, 0 cached) | GC: 67.4ms)
5812
+
5813
+
5814
+  (0.7ms) SELECT pg_try_advisory_lock(869468062957908540) /*application='Dummy'*/
5815
+ ActiveRecord::SchemaMigration Load (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5816
+ ActiveRecord::InternalMetadata Load (2.7ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5817
+ Migrating to CreateSnfCoreQuotations (20250312043359)
5818
+ TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
5819
+  (23.3ms) CREATE TABLE "snf_core_quotations" ("id" bigserial primary key, "item_request_id" bigint NOT NULL, "price" decimal NOT NULL, "delivery_date" date NOT NULL, "valid_until" timestamp(6) NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_3ec8abd328"
5820
+ FOREIGN KEY ("item_request_id")
5821
+ REFERENCES "snf_core_item_requests" ("id")
5822
+ ) /*application='Dummy'*/
5823
+  (2.1ms) CREATE INDEX "index_snf_core_quotations_on_item_request_id" ON "snf_core_quotations" ("item_request_id") /*application='Dummy'*/
5824
+ ActiveRecord::SchemaMigration Create (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250312043359') RETURNING "version" /*application='Dummy'*/
5825
+ TRANSACTION (0.6ms) COMMIT /*application='Dummy'*/
5826
+  (1.3ms) SELECT pg_advisory_unlock(869468062957908540) /*application='Dummy'*/
5827
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5828
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5829
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5830
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5831
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5832
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
5833
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
5834
+ SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
5835
+  (105.4ms) DROP DATABASE IF EXISTS "snf_test" /*application='Dummy'*/
5836
+  (131.3ms) CREATE DATABASE "snf_test" ENCODING = 'unicode' /*application='Dummy'*/
5837
+ SQL (22.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
5838
+  (0.1ms) DROP TABLE IF EXISTS "active_storage_attachments" CASCADE /*application='Dummy'*/
5839
+  (4.8ms) CREATE TABLE "active_storage_attachments" ("id" bigserial primary key, "name" character varying NOT NULL, "record_type" character varying NOT NULL, "record_id" bigint NOT NULL, "blob_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5840
+  (0.6ms) CREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id") /*application='Dummy'*/
5841
+  (0.6ms) CREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id") /*application='Dummy'*/
5842
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_blobs" CASCADE /*application='Dummy'*/
5843
+  (1.6ms) CREATE TABLE "active_storage_blobs" ("id" bigserial primary key, "key" character varying NOT NULL, "filename" character varying NOT NULL, "content_type" character varying, "metadata" text, "service_name" character varying NOT NULL, "byte_size" bigint NOT NULL, "checksum" character varying, "created_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5844
+  (1.3ms) CREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key") /*application='Dummy'*/
5845
+  (0.2ms) DROP TABLE IF EXISTS "active_storage_variant_records" CASCADE /*application='Dummy'*/
5846
+  (1.7ms) CREATE TABLE "active_storage_variant_records" ("id" bigserial primary key, "blob_id" bigint NOT NULL, "variation_digest" character varying NOT NULL) /*application='Dummy'*/
5847
+  (0.9ms) CREATE UNIQUE INDEX "index_active_storage_variant_records_uniqueness" ON "active_storage_variant_records" ("blob_id", "variation_digest") /*application='Dummy'*/
5848
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_account_transfers" CASCADE /*application='Dummy'*/
5849
+  (2.0ms) CREATE TABLE "snf_core_account_transfers" ("id" bigserial primary key, "source_account_type" character varying NOT NULL, "source_account_id" bigint NOT NULL, "destination_account_type" character varying NOT NULL, "destination_account_id" bigint NOT NULL, "user_id" bigint NOT NULL, "amount" decimal(15,2) NOT NULL, "reference_number" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "transfer_type" integer NOT NULL, "description" text, "failure_reason" text, "completed_at" timestamp(6), "reversal_transfer_id" bigint, "cbs_response_data" jsonb, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5850
+  (0.7ms) CREATE INDEX "index_snf_core_account_transfers_on_destination_account" ON "snf_core_account_transfers" ("destination_account_type", "destination_account_id") /*application='Dummy'*/
5851
+  (0.6ms) CREATE UNIQUE INDEX "index_snf_core_account_transfers_on_reference_number" ON "snf_core_account_transfers" ("reference_number") /*application='Dummy'*/
5852
+  (0.7ms) CREATE INDEX "index_snf_core_account_transfers_on_reversal_transfer_id" ON "snf_core_account_transfers" ("reversal_transfer_id") /*application='Dummy'*/
5853
+  (0.8ms) CREATE INDEX "index_snf_core_account_transfers_on_source_account" ON "snf_core_account_transfers" ("source_account_type", "source_account_id") /*application='Dummy'*/
5854
+  (1.2ms) CREATE INDEX "index_snf_core_account_transfers_on_user_id" ON "snf_core_account_transfers" ("user_id") /*application='Dummy'*/
5855
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_addresses" CASCADE /*application='Dummy'*/
5856
+  (2.0ms) CREATE TABLE "snf_core_addresses" ("id" bigserial primary key, "address_type" character varying NOT NULL, "city" character varying NOT NULL, "sub_city" character varying NOT NULL, "woreda" character varying, "latitude" decimal NOT NULL, "longitude" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "house_number" character varying) /*application='Dummy'*/
5857
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_business_documents" CASCADE /*application='Dummy'*/
5858
+  (1.7ms) CREATE TABLE "snf_core_business_documents" ("id" bigserial primary key, "business_id" bigint NOT NULL, "document_type" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "uploaded_at" timestamp(6), "is_verified" boolean DEFAULT FALSE NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5859
+  (0.6ms) CREATE INDEX "index_snf_core_business_documents_on_business_id" ON "snf_core_business_documents" ("business_id") /*application='Dummy'*/
5860
+  (0.6ms) CREATE INDEX "index_snf_core_business_documents_on_verified_by_id" ON "snf_core_business_documents" ("verified_by_id") /*application='Dummy'*/
5861
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_businesses" CASCADE /*application='Dummy'*/
5862
+  (2.1ms) CREATE TABLE "snf_core_businesses" ("id" bigserial primary key, "user_id" bigint NOT NULL, "business_name" character varying NOT NULL, "tin_number" character varying NOT NULL, "business_type" integer NOT NULL, "verified_at" timestamp(6), "verification_status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5863
+  (1.4ms) CREATE INDEX "index_snf_core_businesses_on_user_id" ON "snf_core_businesses" ("user_id") /*application='Dummy'*/
5864
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_categories" CASCADE /*application='Dummy'*/
5865
+  (2.1ms) CREATE TABLE "snf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5866
+  (0.7ms) CREATE INDEX "index_snf_core_categories_on_parent_id" ON "snf_core_categories" ("parent_id") /*application='Dummy'*/
5867
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_customer_groups" CASCADE /*application='Dummy'*/
5868
+  (1.9ms) CREATE TABLE "snf_core_customer_groups" ("id" bigserial primary key, "discount_code" character varying, "expire_date" timestamp(6), "is_used" boolean, "group_id" bigint NOT NULL, "customer_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5869
+  (1.7ms) CREATE INDEX "index_snf_core_customer_groups_on_customer_id" ON "snf_core_customer_groups" ("customer_id") /*application='Dummy'*/
5870
+  (0.8ms) CREATE INDEX "index_snf_core_customer_groups_on_group_id" ON "snf_core_customer_groups" ("group_id") /*application='Dummy'*/
5871
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_delivery_orders" CASCADE /*application='Dummy'*/
5872
+  (1.6ms) CREATE TABLE "snf_core_delivery_orders" ("id" bigserial primary key, "order_id" bigint NOT NULL, "delivery_address" character varying NOT NULL, "contact_phone" character varying NOT NULL, "delivery_notes" text NOT NULL, "estimated_delivery_time" timestamp(6) NOT NULL, "actual_delivery_time" timestamp(6), "status" integer NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5873
+  (0.7ms) CREATE INDEX "index_snf_core_delivery_orders_on_order_id" ON "snf_core_delivery_orders" ("order_id") /*application='Dummy'*/
5874
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_groups" CASCADE /*application='Dummy'*/
5875
+  (3.2ms) CREATE TABLE "snf_core_groups" ("id" bigserial primary key, "name" character varying NOT NULL, "business_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5876
+  (0.7ms) CREATE INDEX "index_snf_core_groups_on_business_id" ON "snf_core_groups" ("business_id") /*application='Dummy'*/
5877
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_item_requests" CASCADE /*application='Dummy'*/
5878
+  (3.7ms) CREATE TABLE "snf_core_item_requests" ("id" bigserial primary key, "user_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "requested_delivery_date" date NOT NULL, "notes" text, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5879
+  (0.7ms) CREATE INDEX "index_snf_core_item_requests_on_product_id" ON "snf_core_item_requests" ("product_id") /*application='Dummy'*/
5880
+  (0.7ms) CREATE INDEX "index_snf_core_item_requests_on_user_id" ON "snf_core_item_requests" ("user_id") /*application='Dummy'*/
5881
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_order_items" CASCADE /*application='Dummy'*/
5882
+  (1.8ms) CREATE TABLE "snf_core_order_items" ("id" bigserial primary key, "order_id" bigint NOT NULL, "store_inventory_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5883
+  (0.6ms) CREATE INDEX "index_snf_core_order_items_on_order_id" ON "snf_core_order_items" ("order_id") /*application='Dummy'*/
5884
+  (0.6ms) CREATE INDEX "index_snf_core_order_items_on_store_inventory_id" ON "snf_core_order_items" ("store_inventory_id") /*application='Dummy'*/
5885
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_orders" CASCADE /*application='Dummy'*/
5886
+  (2.6ms) CREATE TABLE "snf_core_orders" ("id" bigserial primary key, "user_id" bigint NOT NULL, "store_id" bigint NOT NULL, "status" integer DEFAULT 1 NOT NULL, "total_amount" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5887
+  (0.6ms) CREATE INDEX "index_snf_core_orders_on_store_id" ON "snf_core_orders" ("store_id") /*application='Dummy'*/
5888
+  (0.5ms) CREATE INDEX "index_snf_core_orders_on_user_id" ON "snf_core_orders" ("user_id") /*application='Dummy'*/
5889
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_products" CASCADE /*application='Dummy'*/
5890
+  (2.2ms) CREATE TABLE "snf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying, "category_id" bigint NOT NULL, "base_price" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5891
+  (0.7ms) CREATE INDEX "index_snf_core_products_on_category_id" ON "snf_core_products" ("category_id") /*application='Dummy'*/
5892
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_quotations" CASCADE /*application='Dummy'*/
5893
+  (2.4ms) CREATE TABLE "snf_core_quotations" ("id" bigserial primary key, "item_request_id" bigint NOT NULL, "price" decimal NOT NULL, "delivery_date" date NOT NULL, "valid_until" timestamp(6) NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5894
+  (0.8ms) CREATE INDEX "index_snf_core_quotations_on_item_request_id" ON "snf_core_quotations" ("item_request_id") /*application='Dummy'*/
5895
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_roles" CASCADE /*application='Dummy'*/
5896
+  (2.2ms) CREATE TABLE "snf_core_roles" ("id" bigserial primary key, "name" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5897
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_store_inventories" CASCADE /*application='Dummy'*/
5898
+  (1.9ms) CREATE TABLE "snf_core_store_inventories" ("id" bigserial primary key, "store_id" bigint NOT NULL, "product_id" bigint NOT NULL, "base_price" decimal(10,2) NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "status" integer DEFAULT 0 NOT NULL) /*application='Dummy'*/
5899
+  (1.2ms) CREATE INDEX "index_snf_core_store_inventories_on_product_id" ON "snf_core_store_inventories" ("product_id") /*application='Dummy'*/
5900
+  (0.7ms) CREATE UNIQUE INDEX "index_snf_core_store_inventories_on_store_id_and_product_id" ON "snf_core_store_inventories" ("store_id", "product_id") /*application='Dummy'*/
5901
+  (0.7ms) CREATE INDEX "index_snf_core_store_inventories_on_store_id" ON "snf_core_store_inventories" ("store_id") /*application='Dummy'*/
5902
+  (0.1ms) DROP TABLE IF EXISTS "snf_core_stores" CASCADE /*application='Dummy'*/
5903
+  (2.8ms) CREATE TABLE "snf_core_stores" ("id" bigserial primary key, "name" character varying NOT NULL, "email" character varying, "operational_status" integer DEFAULT 1 NOT NULL, "business_id" bigint NOT NULL, "address_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5904
+  (0.8ms) CREATE INDEX "index_snf_core_stores_on_address_id" ON "snf_core_stores" ("address_id") /*application='Dummy'*/
5905
+  (0.7ms) CREATE INDEX "index_snf_core_stores_on_business_id" ON "snf_core_stores" ("business_id") /*application='Dummy'*/
5906
+  (0.5ms) DROP TABLE IF EXISTS "snf_core_user_roles" CASCADE /*application='Dummy'*/
5907
+  (2.9ms) CREATE TABLE "snf_core_user_roles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "role_id" bigint NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5908
+  (1.6ms) CREATE INDEX "index_snf_core_user_roles_on_role_id" ON "snf_core_user_roles" ("role_id") /*application='Dummy'*/
5909
+  (1.3ms) CREATE INDEX "index_snf_core_user_roles_on_user_id" ON "snf_core_user_roles" ("user_id") /*application='Dummy'*/
5910
+  (0.2ms) DROP TABLE IF EXISTS "snf_core_users" CASCADE /*application='Dummy'*/
5911
+  (4.6ms) CREATE TABLE "snf_core_users" ("id" bigserial primary key, "first_name" character varying NOT NULL, "middle_name" character varying NOT NULL, "last_name" character varying NOT NULL, "email" character varying, "phone_number" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "password_digest" character varying NOT NULL, "password_changed" boolean DEFAULT FALSE, "reset_password_token" character varying, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying, "source_of_funds" character varying, "kyc_status" integer, "gender" integer, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint) /*application='Dummy'*/
5912
+  (0.6ms) DROP TABLE IF EXISTS "snf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
5913
+  (4.8ms) CREATE TABLE "snf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint, "to_account_id" bigint, "amount" decimal NOT NULL, "transaction_type" integer NOT NULL, "status" integer DEFAULT 0 NOT NULL, "reference_number" character varying NOT NULL, "description" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5914
+  (1.6ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_created_at" ON "snf_core_virtual_account_transactions" ("created_at") /*application='Dummy'*/
5915
+  (1.4ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_from_account_id" ON "snf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
5916
+  (1.2ms) CREATE UNIQUE INDEX "idx_on_reference_number_bd9be00f20" ON "snf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
5917
+  (1.3ms) CREATE INDEX "index_snf_core_virtual_account_transactions_on_to_account_id" ON "snf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
5918
+  (0.3ms) DROP TABLE IF EXISTS "snf_core_virtual_accounts" CASCADE /*application='Dummy'*/
5919
+  (5.1ms) CREATE TABLE "snf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying(11) NOT NULL, "cbs_account_number" character varying NOT NULL, "balance" decimal DEFAULT 0.0 NOT NULL, "interest_rate" decimal DEFAULT 0.0 NOT NULL, "interest_type" integer DEFAULT 0 NOT NULL, "active" boolean DEFAULT TRUE NOT NULL, "branch_code" character varying(3) NOT NULL, "product_scheme" character varying(1) NOT NULL, "voucher_type" character varying(1) NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5920
+  (1.4ms) CREATE UNIQUE INDEX "index_snf_core_virtual_accounts_on_account_number" ON "snf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
5921
+  (1.5ms) CREATE INDEX "idx_on_branch_code_product_scheme_voucher_type_b7038b3d5f" ON "snf_core_virtual_accounts" ("branch_code", "product_scheme", "voucher_type") /*application='Dummy'*/
5922
+  (1.8ms) CREATE UNIQUE INDEX "index_snf_core_virtual_accounts_on_cbs_account_number" ON "snf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
5923
+  (1.7ms) CREATE INDEX "index_snf_core_virtual_accounts_on_user_id" ON "snf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
5924
+  (0.5ms) DROP TABLE IF EXISTS "snf_core_wallets" CASCADE /*application='Dummy'*/
5925
+  (4.2ms) CREATE TABLE "snf_core_wallets" ("id" bigserial primary key, "user_id" bigint NOT NULL, "wallet_number" character varying NOT NULL, "balance" decimal NOT NULL, "is_active" boolean DEFAULT TRUE NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
5926
+  (1.4ms) CREATE INDEX "index_snf_core_wallets_on_user_id" ON "snf_core_wallets" ("user_id") /*application='Dummy'*/
5927
+  (1.3ms) CREATE UNIQUE INDEX "index_snf_core_wallets_on_wallet_number" ON "snf_core_wallets" ("wallet_number") /*application='Dummy'*/
5928
+  (3.4ms) ALTER TABLE "active_storage_attachments" ADD CONSTRAINT "fk_rails_c3b3935057"
5929
+ FOREIGN KEY ("blob_id")
5930
+ REFERENCES "active_storage_blobs" ("id")
5931
+ /*application='Dummy'*/
5932
+  (1.9ms) ALTER TABLE "active_storage_variant_records" ADD CONSTRAINT "fk_rails_993965df05"
5933
+ FOREIGN KEY ("blob_id")
5934
+ REFERENCES "active_storage_blobs" ("id")
5935
+ /*application='Dummy'*/
5936
+  (2.0ms) ALTER TABLE "snf_core_account_transfers" ADD CONSTRAINT "fk_rails_0d109a55ef"
5937
+ FOREIGN KEY ("user_id")
5938
+ REFERENCES "snf_core_users" ("id")
5939
+ /*application='Dummy'*/
5940
+  (2.0ms) ALTER TABLE "snf_core_business_documents" ADD CONSTRAINT "fk_rails_1efd7338ed"
5941
+ FOREIGN KEY ("business_id")
5942
+ REFERENCES "snf_core_businesses" ("id")
5943
+ /*application='Dummy'*/
5944
+  (1.5ms) ALTER TABLE "snf_core_business_documents" ADD CONSTRAINT "fk_rails_a6157021cc"
5945
+ FOREIGN KEY ("verified_by_id")
5946
+ REFERENCES "snf_core_users" ("id")
5947
+ /*application='Dummy'*/
5948
+  (1.2ms) ALTER TABLE "snf_core_businesses" ADD CONSTRAINT "fk_rails_a61edcbd4b"
5949
+ FOREIGN KEY ("user_id")
5950
+ REFERENCES "snf_core_users" ("id")
5951
+ /*application='Dummy'*/
5952
+  (1.4ms) ALTER TABLE "snf_core_categories" ADD CONSTRAINT "fk_rails_26a925b05d"
5953
+ FOREIGN KEY ("parent_id")
5954
+ REFERENCES "snf_core_categories" ("id")
5955
+ /*application='Dummy'*/
5956
+  (2.6ms) ALTER TABLE "snf_core_customer_groups" ADD CONSTRAINT "fk_rails_9c45f4015a"
5957
+ FOREIGN KEY ("group_id")
5958
+ REFERENCES "snf_core_groups" ("id")
5959
+ /*application='Dummy'*/
5960
+  (1.4ms) ALTER TABLE "snf_core_customer_groups" ADD CONSTRAINT "fk_rails_792eb3404d"
5961
+ FOREIGN KEY ("customer_id")
5962
+ REFERENCES "snf_core_users" ("id")
5963
+ /*application='Dummy'*/
5964
+  (1.8ms) ALTER TABLE "snf_core_delivery_orders" ADD CONSTRAINT "fk_rails_450d17b1b2"
5965
+ FOREIGN KEY ("order_id")
5966
+ REFERENCES "snf_core_orders" ("id")
5967
+ /*application='Dummy'*/
5968
+  (1.3ms) ALTER TABLE "snf_core_groups" ADD CONSTRAINT "fk_rails_c52b27ad67"
5969
+ FOREIGN KEY ("business_id")
5970
+ REFERENCES "snf_core_businesses" ("id")
5971
+ /*application='Dummy'*/
5972
+  (2.2ms) ALTER TABLE "snf_core_item_requests" ADD CONSTRAINT "fk_rails_a718316b94"
5973
+ FOREIGN KEY ("product_id")
5974
+ REFERENCES "snf_core_products" ("id")
5975
+ /*application='Dummy'*/
5976
+  (3.5ms) ALTER TABLE "snf_core_item_requests" ADD CONSTRAINT "fk_rails_0aa2ea2057"
5977
+ FOREIGN KEY ("user_id")
5978
+ REFERENCES "snf_core_users" ("id")
5979
+ /*application='Dummy'*/
5980
+  (1.9ms) ALTER TABLE "snf_core_order_items" ADD CONSTRAINT "fk_rails_1f4046ba92"
5981
+ FOREIGN KEY ("order_id")
5982
+ REFERENCES "snf_core_orders" ("id")
5983
+ /*application='Dummy'*/
5984
+  (1.8ms) ALTER TABLE "snf_core_order_items" ADD CONSTRAINT "fk_rails_50419437e9"
5985
+ FOREIGN KEY ("store_inventory_id")
5986
+ REFERENCES "snf_core_store_inventories" ("id")
5987
+ /*application='Dummy'*/
5988
+  (2.4ms) ALTER TABLE "snf_core_orders" ADD CONSTRAINT "fk_rails_400cf2029c"
5989
+ FOREIGN KEY ("store_id")
5990
+ REFERENCES "snf_core_stores" ("id")
5991
+ /*application='Dummy'*/
5992
+  (1.7ms) ALTER TABLE "snf_core_orders" ADD CONSTRAINT "fk_rails_45b78fb6f9"
5993
+ FOREIGN KEY ("user_id")
5994
+ REFERENCES "snf_core_users" ("id")
5995
+ /*application='Dummy'*/
5996
+  (1.7ms) ALTER TABLE "snf_core_products" ADD CONSTRAINT "fk_rails_a0ba3fa883"
5997
+ FOREIGN KEY ("category_id")
5998
+ REFERENCES "snf_core_categories" ("id")
5999
+ /*application='Dummy'*/
6000
+  (1.9ms) ALTER TABLE "snf_core_quotations" ADD CONSTRAINT "fk_rails_3ec8abd328"
6001
+ FOREIGN KEY ("item_request_id")
6002
+ REFERENCES "snf_core_item_requests" ("id")
6003
+ /*application='Dummy'*/
6004
+  (1.7ms) ALTER TABLE "snf_core_store_inventories" ADD CONSTRAINT "fk_rails_15fb263e75"
6005
+ FOREIGN KEY ("product_id")
6006
+ REFERENCES "snf_core_products" ("id")
6007
+ /*application='Dummy'*/
6008
+  (2.1ms) ALTER TABLE "snf_core_store_inventories" ADD CONSTRAINT "fk_rails_2ca88d30e2"
6009
+ FOREIGN KEY ("store_id")
6010
+ REFERENCES "snf_core_stores" ("id")
6011
+ /*application='Dummy'*/
6012
+  (1.9ms) ALTER TABLE "snf_core_stores" ADD CONSTRAINT "fk_rails_421441da8e"
6013
+ FOREIGN KEY ("address_id")
6014
+ REFERENCES "snf_core_addresses" ("id")
6015
+ /*application='Dummy'*/
6016
+  (2.0ms) ALTER TABLE "snf_core_stores" ADD CONSTRAINT "fk_rails_e100fc7454"
6017
+ FOREIGN KEY ("business_id")
6018
+ REFERENCES "snf_core_businesses" ("id")
6019
+ /*application='Dummy'*/
6020
+  (2.2ms) ALTER TABLE "snf_core_user_roles" ADD CONSTRAINT "fk_rails_0e70d7ce00"
6021
+ FOREIGN KEY ("role_id")
6022
+ REFERENCES "snf_core_roles" ("id")
6023
+ /*application='Dummy'*/
6024
+  (1.9ms) ALTER TABLE "snf_core_user_roles" ADD CONSTRAINT "fk_rails_9ad2e78133"
6025
+ FOREIGN KEY ("user_id")
6026
+ REFERENCES "snf_core_users" ("id")
6027
+ /*application='Dummy'*/
6028
+  (1.9ms) ALTER TABLE "snf_core_users" ADD CONSTRAINT "fk_rails_aaf9dcb5a5"
6029
+ FOREIGN KEY ("address_id")
6030
+ REFERENCES "snf_core_addresses" ("id")
6031
+ /*application='Dummy'*/
6032
+  (2.8ms) ALTER TABLE "snf_core_users" ADD CONSTRAINT "fk_rails_e672dea3f8"
6033
+ FOREIGN KEY ("verified_by_id")
6034
+ REFERENCES "snf_core_users" ("id")
6035
+ ON DELETE SET NULL /*application='Dummy'*/
6036
+  (3.2ms) ALTER TABLE "snf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_746fa19f46"
6037
+ FOREIGN KEY ("from_account_id")
6038
+ REFERENCES "snf_core_virtual_accounts" ("id")
6039
+ /*application='Dummy'*/
6040
+  (3.6ms) ALTER TABLE "snf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_87430c1b60"
6041
+ FOREIGN KEY ("to_account_id")
6042
+ REFERENCES "snf_core_virtual_accounts" ("id")
6043
+ /*application='Dummy'*/
6044
+  (2.3ms) ALTER TABLE "snf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_5b22a265fb"
6045
+ FOREIGN KEY ("user_id")
6046
+ REFERENCES "snf_core_users" ("id")
6047
+ /*application='Dummy'*/
6048
+  (2.8ms) ALTER TABLE "snf_core_wallets" ADD CONSTRAINT "fk_rails_77c94979ce"
6049
+ FOREIGN KEY ("user_id")
6050
+ REFERENCES "snf_core_users" ("id")
6051
+ /*application='Dummy'*/
6052
+  (4.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
6053
+ ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
6054
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES (20250312043359) /*application='Dummy'*/
6055
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES
6056
+ (20250311000000),
6057
+ (20250310143604),
6058
+ (20250310133249),
6059
+ (20250310123127),
6060
+ (20250310122954),
6061
+ (20250306074713),
6062
+ (20250305232530),
6063
+ (20250305232529),
6064
+ (20250305201008),
6065
+ (20250305170248),
6066
+ (20250305165926),
6067
+ (20250227102833),
6068
+ (20250227075048),
6069
+ (20250226193938),
6070
+ (20250226192104),
6071
+ (20250226190000),
6072
+ (20250226181007),
6073
+ (20250226123213),
6074
+ (20250226115215),
6075
+ (20250226110217),
6076
+ (20250226102931),
6077
+ (20250226080323),
6078
+ (20250226064444),
6079
+ (20250226042622); /*application='Dummy'*/
6080
+  (6.7ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
6081
+ ActiveRecord::InternalMetadata Load (1.7ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
6082
+ ActiveRecord::InternalMetadata Create (1.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-12 05:35:29.014647', '2025-03-12 05:35:29.014654') RETURNING "key" /*application='Dummy'*/
6083
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
6084
+ ActiveRecord::InternalMetadata Update (0.8ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-12 05:35:29.022797' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
6085
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
6086
+ ActiveRecord::InternalMetadata Create (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', 'ce684782ac0a2f19cbccaf01724c2ba2ab15f8bc', '2025-03-12 05:35:29.027135', '2025-03-12 05:35:29.027140') RETURNING "key" /*application='Dummy'*/