bscf-core 0.2.0 → 0.2.1

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bscf/core/version.rb +1 -1
  3. metadata +2 -55
  4. data/spec/dummy/Rakefile +0 -6
  5. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  6. data/spec/dummy/app/controllers/application_controller.rb +0 -2
  7. data/spec/dummy/app/jobs/application_job.rb +0 -7
  8. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  9. data/spec/dummy/app/models/application_record.rb +0 -3
  10. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  11. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  12. data/spec/dummy/bin/dev +0 -2
  13. data/spec/dummy/bin/rails +0 -4
  14. data/spec/dummy/bin/rake +0 -4
  15. data/spec/dummy/bin/setup +0 -34
  16. data/spec/dummy/config/application.rb +0 -43
  17. data/spec/dummy/config/boot.rb +0 -5
  18. data/spec/dummy/config/cable.yml +0 -10
  19. data/spec/dummy/config/database.yml +0 -17
  20. data/spec/dummy/config/environment.rb +0 -5
  21. data/spec/dummy/config/environments/development.rb +0 -67
  22. data/spec/dummy/config/environments/production.rb +0 -86
  23. data/spec/dummy/config/environments/test.rb +0 -53
  24. data/spec/dummy/config/initializers/cors.rb +0 -16
  25. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -8
  26. data/spec/dummy/config/initializers/inflections.rb +0 -16
  27. data/spec/dummy/config/locales/en.yml +0 -31
  28. data/spec/dummy/config/puma.rb +0 -38
  29. data/spec/dummy/config/routes.rb +0 -3
  30. data/spec/dummy/config/storage.yml +0 -34
  31. data/spec/dummy/config.ru +0 -6
  32. data/spec/dummy/db/schema.rb +0 -246
  33. data/spec/dummy/log/development.log +0 -2077
  34. data/spec/dummy/log/test.log +0 -69259
  35. data/spec/dummy/tmp/local_secret.txt +0 -1
  36. data/spec/examples.txt +0 -167
  37. data/spec/models/bscf/core/address_spec.rb +0 -12
  38. data/spec/models/bscf/core/business_spec.rb +0 -64
  39. data/spec/models/bscf/core/category_spec.rb +0 -43
  40. data/spec/models/bscf/core/order_item_spec.rb +0 -26
  41. data/spec/models/bscf/core/order_spec.rb +0 -16
  42. data/spec/models/bscf/core/product_spec.rb +0 -47
  43. data/spec/models/bscf/core/quotation_item_spec.rb +0 -44
  44. data/spec/models/bscf/core/quotation_spec.rb +0 -41
  45. data/spec/models/bscf/core/request_for_quotation_spec.rb +0 -13
  46. data/spec/models/bscf/core/rfq_item_spec.rb +0 -14
  47. data/spec/models/bscf/core/role_spec.rb +0 -14
  48. data/spec/models/bscf/core/user_profile_spec.rb +0 -20
  49. data/spec/models/bscf/core/user_role_spec.rb +0 -13
  50. data/spec/models/bscf/core/user_spec.rb +0 -22
  51. data/spec/models/bscf/core/virtual_account_spec.rb +0 -111
  52. data/spec/models/bscf/core/virtual_account_transaction_spec.rb +0 -133
  53. data/spec/rails_helper.rb +0 -46
  54. data/spec/spec_helper.rb +0 -37
  55. data/spec/support/models/shared_examples.rb +0 -49
  56. data/spec/support/requests/shared_requests.rb +0 -126
@@ -1,2077 +0,0 @@
1
- SQL (10.8ms) SET search_path TO public /*application='Dummy'*/
2
-  (722.5ms) CREATE DATABASE "bscf_dev" ENCODING = 'unicode' /*application='Dummy'*/
3
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
4
-  (105.0ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
5
-  (26.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
6
-  (4.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'*/
7
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
8
- ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
9
- ActiveRecord::InternalMetadata Load (3.4ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
10
- ActiveRecord::InternalMetadata Create (1.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-24 13:19:53.793527', '2025-03-24 13:19:53.793529') RETURNING "key" /*application='Dummy'*/
11
- Migrating to CreateBscfCorePeople (20250324131935)
12
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
13
-  (9.7ms) CREATE TABLE "bscf_core_people" ("id" bigserial primary key, "name" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
14
- ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250324131935') RETURNING "version" /*application='Dummy'*/
15
- TRANSACTION (1.4ms) COMMIT /*application='Dummy'*/
16
-  (0.6ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
17
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
18
- SQL (0.4ms) SET search_path TO public /*application='Dummy'*/
19
-  (403.6ms) CREATE DATABASE "bscf_dev" ENCODING = 'unicode' /*application='Dummy'*/
20
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
21
-  (21.1ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
22
-  (1.7ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
23
- ActiveRecord::SchemaMigration Load (3.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
24
- ActiveRecord::InternalMetadata Load (3.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
25
- Migrating to CreateBscfCoreUsers (20250326065606)
26
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
27
-  (31.3ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
28
-  (1.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
29
-  (1.1ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
30
- ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326065606') RETURNING "version" /*application='Dummy'*/
31
- TRANSACTION (0.7ms) COMMIT /*application='Dummy'*/
32
-  (0.7ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
33
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
34
- ActiveRecord::SchemaMigration Load (2.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
35
- ActiveRecord::InternalMetadata Load (1.8ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
36
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
37
- 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'*/
38
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
39
- 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'*/
40
- SQL (0.2ms) SET search_path TO public /*application='Dummy'*/
41
-  (98.6ms) DROP DATABASE IF EXISTS "bscf_dev" /*application='Dummy'*/
42
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
43
-  (66.7ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
44
- SQL (0.2ms) SET search_path TO public /*application='Dummy'*/
45
-  (160.8ms) CREATE DATABASE "bscf_dev" ENCODING = 'unicode' /*application='Dummy'*/
46
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
47
-  (75.9ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
48
- SQL (1.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
49
-  (4.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
50
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
51
-  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES (0) /*application='Dummy'*/
52
-  (1.2ms) 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'*/
53
- 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'*/
54
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 07:22:41.527957', '2025-03-26 07:22:41.527961') RETURNING "key" /*application='Dummy'*/
55
- 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'*/
56
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
57
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '9c6777daaa6ce85cc74b26c38000144a7834a947', '2025-03-26 07:22:41.532591', '2025-03-26 07:22:41.532593') RETURNING "key" /*application='Dummy'*/
58
-  (0.1ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
59
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
60
- 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'*/
61
- Migrating to CreateBscfCoreUsers (20250326065606)
62
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
63
-  (3.1ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
64
-  (0.5ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
65
-  (0.4ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
66
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326065606') RETURNING "version" /*application='Dummy'*/
67
- TRANSACTION (2.2ms) COMMIT /*application='Dummy'*/
68
-  (0.2ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
69
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
70
-  (0.6ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
71
- ActiveRecord::SchemaMigration Load (2.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
72
- ActiveRecord::InternalMetadata Load (1.9ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
73
- Migrating to CreateBscfCoreRoles (20250326075111)
74
- TRANSACTION (0.2ms) BEGIN /*application='Dummy'*/
75
-  (15.7ms) CREATE TABLE "bscf_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'*/
76
- ActiveRecord::SchemaMigration Create (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326075111') RETURNING "version" /*application='Dummy'*/
77
- TRANSACTION (0.6ms) COMMIT /*application='Dummy'*/
78
-  (1.0ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
79
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
80
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
81
- ActiveRecord::InternalMetadata Load (1.0ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
82
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
83
- 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'*/
84
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
85
- 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'*/
86
- SQL (0.2ms) SET search_path TO public /*application='Dummy'*/
87
-  (60.5ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
88
-  (133.7ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
89
- SQL (14.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
90
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
91
-  (4.0ms) CREATE TABLE "bscf_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'*/
92
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
93
-  (1.5ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
94
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
95
-  (0.4ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
96
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
97
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
98
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES (20250326075111) /*application='Dummy'*/
99
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES
100
- (20250326065606); /*application='Dummy'*/
101
-  (1.6ms) 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'*/
102
- ActiveRecord::InternalMetadata Load (0.5ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
103
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 08:00:51.535081', '2025-03-26 08:00:51.535085') RETURNING "key" /*application='Dummy'*/
104
- 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'*/
105
- ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 08:00:51.538963' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
106
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
107
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '89eded1314fdd47d2f7cf7a5aa1ab63d7cfedc0b', '2025-03-26 08:00:51.542484', '2025-03-26 08:00:51.542486') RETURNING "key" /*application='Dummy'*/
108
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
109
- ActiveRecord::SchemaMigration Load (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
110
- 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'*/
111
- Migrating to CreateBscfCoreUserProfiles (20250326080646)
112
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
113
-  (19.4ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_76d657f1fb"
114
- FOREIGN KEY ("user_id")
115
- REFERENCES "bscf_core_users" ("id")
116
- , CONSTRAINT "fk_rails_96d9a7609e"
117
- FOREIGN KEY ("verified_by_id")
118
- REFERENCES "bscf_core_users" ("id")
119
- , CONSTRAINT "fk_rails_c5a3f5b460"
120
- FOREIGN KEY ("address_id")
121
- REFERENCES "bscf_core_addresses" ("id")
122
- ) /*application='Dummy'*/
123
- TRANSACTION (0.1ms) ROLLBACK /*application='Dummy'*/
124
-  (0.2ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
125
- ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
126
- ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
127
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
128
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
129
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
130
- 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'*/
131
- Migrating to CreateBscfCoreUserProfiles (20250326080646)
132
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
133
-  (9.4ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_76d657f1fb"
134
- FOREIGN KEY ("user_id")
135
- REFERENCES "bscf_core_users" ("id")
136
- , CONSTRAINT "fk_rails_96d9a7609e"
137
- FOREIGN KEY ("verified_by_id")
138
- REFERENCES "bscf_core_users" ("id")
139
- , CONSTRAINT "fk_rails_c5a3f5b460"
140
- FOREIGN KEY ("address_id")
141
- REFERENCES "bscf_core_addresses" ("id")
142
- ) /*application='Dummy'*/
143
- TRANSACTION (0.1ms) ROLLBACK /*application='Dummy'*/
144
-  (0.2ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
145
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
146
- ActiveRecord::SchemaMigration Load (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
147
- 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'*/
148
- Migrating to CreateBscfCoreAddresses (20250326081052)
149
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
150
-  (7.3ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
151
- ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326081052') RETURNING "version" /*application='Dummy'*/
152
- TRANSACTION (0.5ms) COMMIT /*application='Dummy'*/
153
-  (0.3ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
154
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
155
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
156
- ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
157
- 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'*/
158
- Migrating to CreateBscfCoreUserProfiles (20250326080646)
159
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
160
-  (10.1ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_76d657f1fb"
161
- FOREIGN KEY ("user_id")
162
- REFERENCES "bscf_core_users" ("id")
163
- , CONSTRAINT "fk_rails_96d9a7609e"
164
- FOREIGN KEY ("verified_by_id")
165
- REFERENCES "bscf_core_users" ("id")
166
- , CONSTRAINT "fk_rails_c5a3f5b460"
167
- FOREIGN KEY ("address_id")
168
- REFERENCES "bscf_core_addresses" ("id")
169
- ) /*application='Dummy'*/
170
-  (3.0ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
171
-  (0.9ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
172
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
173
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326080646') RETURNING "version" /*application='Dummy'*/
174
- TRANSACTION (0.5ms) COMMIT /*application='Dummy'*/
175
-  (0.3ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
176
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
177
- ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
178
- ActiveRecord::InternalMetadata Load (1.5ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
179
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
180
- 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'*/
181
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
182
- 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'*/
183
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
184
-  (63.1ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
185
-  (127.6ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
186
- SQL (19.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
187
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
188
-  (3.7ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
189
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
190
-  (1.7ms) CREATE TABLE "bscf_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'*/
191
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
192
-  (2.1ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
193
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
194
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
195
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
196
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
197
-  (1.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
198
-  (0.9ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
199
-  (0.5ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
200
-  (1.5ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
201
- FOREIGN KEY ("address_id")
202
- REFERENCES "bscf_core_addresses" ("id")
203
- /*application='Dummy'*/
204
-  (0.8ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
205
- FOREIGN KEY ("user_id")
206
- REFERENCES "bscf_core_users" ("id")
207
- /*application='Dummy'*/
208
-  (0.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
209
- FOREIGN KEY ("verified_by_id")
210
- REFERENCES "bscf_core_users" ("id")
211
- /*application='Dummy'*/
212
-  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
213
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
214
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250326081052) /*application='Dummy'*/
215
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES
216
- (20250326080646),
217
- (20250326075111),
218
- (20250326065606); /*application='Dummy'*/
219
-  (1.3ms) 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'*/
220
- ActiveRecord::InternalMetadata Load (0.5ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
221
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 08:17:41.838602', '2025-03-26 08:17:41.838605') RETURNING "key" /*application='Dummy'*/
222
- 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'*/
223
- ActiveRecord::InternalMetadata Update (0.2ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 08:17:41.841174' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
224
- 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'*/
225
- ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '3f33d3312b7b1e0e5c8e4b2f65e816073fd4a17a', '2025-03-26 08:17:41.843104', '2025-03-26 08:17:41.843106') RETURNING "key" /*application='Dummy'*/
226
-  (0.4ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
227
- ActiveRecord::SchemaMigration Load (23.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
228
- ActiveRecord::InternalMetadata Load (27.9ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
229
-  (23.6ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
230
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
231
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
232
- 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'*/
233
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
234
- 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'*/
235
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
236
- ActiveRecord::InternalMetadata Load (18.9ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
237
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
238
-  (91.4ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
239
-  (147.4ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
240
- SQL (21.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
241
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
242
-  (7.4ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
243
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
244
-  (2.8ms) CREATE TABLE "bscf_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'*/
245
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
246
-  (2.6ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
247
-  (1.0ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
248
-  (0.8ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
249
-  (0.8ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
250
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
251
-  (3.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
252
-  (1.2ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
253
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
254
-  (4.5ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
255
- FOREIGN KEY ("address_id")
256
- REFERENCES "bscf_core_addresses" ("id")
257
- /*application='Dummy'*/
258
-  (2.0ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
259
- FOREIGN KEY ("user_id")
260
- REFERENCES "bscf_core_users" ("id")
261
- /*application='Dummy'*/
262
-  (1.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
263
- FOREIGN KEY ("verified_by_id")
264
- REFERENCES "bscf_core_users" ("id")
265
- /*application='Dummy'*/
266
-  (4.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
267
- ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
268
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (20250326081052) /*application='Dummy'*/
269
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
270
- (20250326080646),
271
- (20250326075111),
272
- (20250326065606); /*application='Dummy'*/
273
-  (3.6ms) 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'*/
274
- ActiveRecord::InternalMetadata Load (1.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
275
- ActiveRecord::InternalMetadata Create (1.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 08:40:29.144124', '2025-03-26 08:40:29.144125') RETURNING "key" /*application='Dummy'*/
276
- 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'*/
277
- ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 08:40:29.147953' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
278
- 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'*/
279
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '3f33d3312b7b1e0e5c8e4b2f65e816073fd4a17a', '2025-03-26 08:40:29.149461', '2025-03-26 08:40:29.149462') RETURNING "key" /*application='Dummy'*/
280
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
281
- ActiveRecord::SchemaMigration Load (2.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
282
- ActiveRecord::InternalMetadata Load (1.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
283
- Migrating to CreateBscfCoreUserRoles (20250326084233)
284
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
285
-  (8.7ms) CREATE TABLE "bscf_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, CONSTRAINT "fk_rails_71c0ff189b"
286
- FOREIGN KEY ("user_id")
287
- REFERENCES "bscf_core_users" ("id")
288
- , CONSTRAINT "fk_rails_d64b2985c7"
289
- FOREIGN KEY ("role_id")
290
- REFERENCES "bscf_core_roles" ("id")
291
- ) /*application='Dummy'*/
292
-  (1.2ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
293
-  (1.1ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
294
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326084233') RETURNING "version" /*application='Dummy'*/
295
- TRANSACTION (0.4ms) COMMIT /*application='Dummy'*/
296
-  (0.4ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
297
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
298
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
299
- 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'*/
300
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
301
- 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'*/
302
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
303
- 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'*/
304
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
305
-  (75.6ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
306
-  (198.8ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
307
- SQL (27.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
308
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
309
-  (9.8ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
310
-  (0.6ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
311
-  (3.7ms) CREATE TABLE "bscf_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'*/
312
-  (0.5ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
313
-  (3.7ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
314
-  (1.4ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
315
-  (1.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
316
-  (1.4ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
317
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
318
-  (3.2ms) CREATE TABLE "bscf_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'*/
319
-  (2.9ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
320
-  (1.2ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
321
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
322
-  (3.8ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
323
-  (2.1ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
324
-  (1.3ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
325
-  (3.1ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
326
- FOREIGN KEY ("address_id")
327
- REFERENCES "bscf_core_addresses" ("id")
328
- /*application='Dummy'*/
329
-  (2.1ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
330
- FOREIGN KEY ("user_id")
331
- REFERENCES "bscf_core_users" ("id")
332
- /*application='Dummy'*/
333
-  (2.0ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
334
- FOREIGN KEY ("verified_by_id")
335
- REFERENCES "bscf_core_users" ("id")
336
- /*application='Dummy'*/
337
-  (1.8ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
338
- FOREIGN KEY ("role_id")
339
- REFERENCES "bscf_core_roles" ("id")
340
- /*application='Dummy'*/
341
-  (1.2ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
342
- FOREIGN KEY ("user_id")
343
- REFERENCES "bscf_core_users" ("id")
344
- /*application='Dummy'*/
345
-  (3.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
346
- ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
347
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (20250326084233) /*application='Dummy'*/
348
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES
349
- (20250326081052),
350
- (20250326080646),
351
- (20250326075111),
352
- (20250326065606); /*application='Dummy'*/
353
-  (4.8ms) 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'*/
354
- ActiveRecord::InternalMetadata Load (1.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
355
- ActiveRecord::InternalMetadata Create (1.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 08:45:46.623766', '2025-03-26 08:45:46.623774') RETURNING "key" /*application='Dummy'*/
356
- ActiveRecord::InternalMetadata Load (0.8ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
357
- ActiveRecord::InternalMetadata Update (1.1ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 08:45:46.632289' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
358
- 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'*/
359
- ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '6b263e39641246976375d64708005c3540d06b05', '2025-03-26 08:45:46.638710', '2025-03-26 08:45:46.638714') RETURNING "key" /*application='Dummy'*/
360
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
361
- ActiveRecord::SchemaMigration Load (3.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
362
- ActiveRecord::InternalMetadata Load (3.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
363
- Migrating to CreateBscfCoreVirtualAccounts (20250326085741)
364
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
365
-  (25.0ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_062e0240bd"
366
- FOREIGN KEY ("user_id")
367
- REFERENCES "bscf_core_users" ("id")
368
- ) /*application='Dummy'*/
369
-  (1.4ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
370
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
371
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
372
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
373
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
374
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326085741') RETURNING "version" /*application='Dummy'*/
375
- TRANSACTION (0.8ms) COMMIT /*application='Dummy'*/
376
- Migrating to CreateBscfCoreCategories (20250326103305)
377
- TRANSACTION (0.4ms) BEGIN /*application='Dummy'*/
378
-  (5.3ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
379
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326103305') RETURNING "version" /*application='Dummy'*/
380
- TRANSACTION (0.2ms) COMMIT /*application='Dummy'*/
381
-  (0.5ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
382
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
383
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
384
- 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'*/
385
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
386
- 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'*/
387
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
388
- 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'*/
389
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
390
-  (101.9ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
391
-  (130.0ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
392
- SQL (20.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
393
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
394
-  (4.2ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
395
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
396
-  (2.2ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
397
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
398
-  (1.7ms) CREATE TABLE "bscf_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'*/
399
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
400
-  (2.0ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
401
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
402
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
403
-  (0.8ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
404
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
405
-  (1.5ms) CREATE TABLE "bscf_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'*/
406
-  (0.6ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
407
-  (0.6ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
408
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
409
-  (2.1ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
410
-  (1.1ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
411
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
412
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
413
-  (2.6ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
414
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
415
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
416
-  (0.9ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
417
-  (0.9ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
418
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
419
-  (1.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
420
- FOREIGN KEY ("address_id")
421
- REFERENCES "bscf_core_addresses" ("id")
422
- /*application='Dummy'*/
423
-  (0.9ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
424
- FOREIGN KEY ("user_id")
425
- REFERENCES "bscf_core_users" ("id")
426
- /*application='Dummy'*/
427
-  (0.8ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
428
- FOREIGN KEY ("verified_by_id")
429
- REFERENCES "bscf_core_users" ("id")
430
- /*application='Dummy'*/
431
-  (0.8ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
432
- FOREIGN KEY ("role_id")
433
- REFERENCES "bscf_core_roles" ("id")
434
- /*application='Dummy'*/
435
-  (0.6ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
436
- FOREIGN KEY ("user_id")
437
- REFERENCES "bscf_core_users" ("id")
438
- /*application='Dummy'*/
439
-  (0.9ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
440
- FOREIGN KEY ("user_id")
441
- REFERENCES "bscf_core_users" ("id")
442
- /*application='Dummy'*/
443
-  (2.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
444
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
445
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250326103305) /*application='Dummy'*/
446
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
447
- (20250326085741),
448
- (20250326084233),
449
- (20250326081052),
450
- (20250326080646),
451
- (20250326075111),
452
- (20250326065606); /*application='Dummy'*/
453
-  (2.2ms) 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'*/
454
- ActiveRecord::InternalMetadata Load (0.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
455
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 11:02:52.832573', '2025-03-26 11:02:52.832577') RETURNING "key" /*application='Dummy'*/
456
- 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'*/
457
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 11:02:52.835981' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
458
- 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'*/
459
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '1aedad140a5afe906e3808eef29b2d8c071b1e2d', '2025-03-26 11:02:52.838611', '2025-03-26 11:02:52.838613') RETURNING "key" /*application='Dummy'*/
460
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
461
- ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
462
- 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'*/
463
- Migrating to CreateBscfCoreProducts (20250326105652)
464
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
465
-  (16.7ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_9b9f33fd91"
466
- FOREIGN KEY ("category_id")
467
- REFERENCES "bscf_core_categories" ("id")
468
- ) /*application='Dummy'*/
469
-  (1.0ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
470
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
471
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326105652') RETURNING "version" /*application='Dummy'*/
472
- TRANSACTION (2.1ms) COMMIT /*application='Dummy'*/
473
-  (0.3ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
474
- ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
475
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
476
- 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'*/
477
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
478
- 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'*/
479
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
480
- 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'*/
481
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
482
-  (76.8ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
483
-  (151.4ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
484
- SQL (17.8ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
485
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
486
-  (3.4ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
487
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
488
-  (1.6ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
489
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
490
-  (1.5ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
491
-  (0.7ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
492
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
493
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
494
-  (1.6ms) CREATE TABLE "bscf_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'*/
495
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
496
-  (1.8ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
497
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
498
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
499
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
500
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
501
-  (1.2ms) CREATE TABLE "bscf_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'*/
502
-  (0.7ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
503
-  (0.5ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
504
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
505
-  (1.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
506
-  (0.9ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
507
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
508
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
509
-  (1.9ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
510
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
511
-  (0.8ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
512
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
513
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
514
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
515
-  (1.6ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
516
- FOREIGN KEY ("category_id")
517
- REFERENCES "bscf_core_categories" ("id")
518
- /*application='Dummy'*/
519
-  (1.1ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
520
- FOREIGN KEY ("address_id")
521
- REFERENCES "bscf_core_addresses" ("id")
522
- /*application='Dummy'*/
523
-  (0.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
524
- FOREIGN KEY ("user_id")
525
- REFERENCES "bscf_core_users" ("id")
526
- /*application='Dummy'*/
527
-  (0.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
528
- FOREIGN KEY ("verified_by_id")
529
- REFERENCES "bscf_core_users" ("id")
530
- /*application='Dummy'*/
531
-  (1.2ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
532
- FOREIGN KEY ("role_id")
533
- REFERENCES "bscf_core_roles" ("id")
534
- /*application='Dummy'*/
535
-  (0.6ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
536
- FOREIGN KEY ("user_id")
537
- REFERENCES "bscf_core_users" ("id")
538
- /*application='Dummy'*/
539
-  (1.0ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
540
- FOREIGN KEY ("user_id")
541
- REFERENCES "bscf_core_users" ("id")
542
- /*application='Dummy'*/
543
-  (1.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
544
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
545
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250326105652) /*application='Dummy'*/
546
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
547
- (20250326103305),
548
- (20250326085741),
549
- (20250326084233),
550
- (20250326081052),
551
- (20250326080646),
552
- (20250326075111),
553
- (20250326065606); /*application='Dummy'*/
554
-  (1.6ms) 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'*/
555
- ActiveRecord::InternalMetadata Load (0.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
556
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 11:25:01.537569', '2025-03-26 11:25:01.537572') RETURNING "key" /*application='Dummy'*/
557
- 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'*/
558
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 11:25:01.540924' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
559
- 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'*/
560
- ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', 'd18c1d9ac5326e5d5415340ebd68dd0f9ff61f16', '2025-03-26 11:25:01.543255', '2025-03-26 11:25:01.543256') RETURNING "key" /*application='Dummy'*/
561
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
562
- ActiveRecord::SchemaMigration Load (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
563
- 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'*/
564
- Migrating to CreateBscfCoreBusinesses (20250326112449)
565
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
566
-  (9.3ms) CREATE TABLE "bscf_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 DEFAULT 0 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, CONSTRAINT "fk_rails_8d7490b82a"
567
- FOREIGN KEY ("user_id")
568
- REFERENCES "bscf_core_users" ("id")
569
- ) /*application='Dummy'*/
570
-  (1.2ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
571
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326112449') RETURNING "version" /*application='Dummy'*/
572
- TRANSACTION (0.5ms) COMMIT /*application='Dummy'*/
573
-  (0.4ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
574
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
575
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
576
- 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'*/
577
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
578
- 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'*/
579
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
580
- 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'*/
581
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
582
-  (55.9ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
583
-  (57.2ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
584
- SQL (13.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
585
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
586
-  (2.5ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
587
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
588
-  (1.3ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
589
-  (0.4ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
590
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
591
-  (1.3ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
592
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
593
-  (1.4ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
594
-  (0.4ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
595
-  (0.4ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
596
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
597
-  (1.1ms) CREATE TABLE "bscf_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'*/
598
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
599
-  (1.2ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
600
-  (0.4ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
601
-  (0.4ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
602
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
603
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
604
-  (0.8ms) CREATE TABLE "bscf_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'*/
605
-  (0.4ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
606
-  (0.3ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
607
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
608
-  (1.1ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
609
-  (0.4ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
610
-  (0.3ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
611
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
612
-  (1.3ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
613
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
614
-  (0.3ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
615
-  (0.4ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
616
-  (0.5ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
617
-  (0.3ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
618
-  (1.1ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
619
- FOREIGN KEY ("user_id")
620
- REFERENCES "bscf_core_users" ("id")
621
- /*application='Dummy'*/
622
-  (0.5ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
623
- FOREIGN KEY ("category_id")
624
- REFERENCES "bscf_core_categories" ("id")
625
- /*application='Dummy'*/
626
-  (0.5ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
627
- FOREIGN KEY ("address_id")
628
- REFERENCES "bscf_core_addresses" ("id")
629
- /*application='Dummy'*/
630
-  (0.4ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
631
- FOREIGN KEY ("user_id")
632
- REFERENCES "bscf_core_users" ("id")
633
- /*application='Dummy'*/
634
-  (0.3ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
635
- FOREIGN KEY ("verified_by_id")
636
- REFERENCES "bscf_core_users" ("id")
637
- /*application='Dummy'*/
638
-  (0.6ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
639
- FOREIGN KEY ("role_id")
640
- REFERENCES "bscf_core_roles" ("id")
641
- /*application='Dummy'*/
642
-  (0.3ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
643
- FOREIGN KEY ("user_id")
644
- REFERENCES "bscf_core_users" ("id")
645
- /*application='Dummy'*/
646
-  (0.5ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
647
- FOREIGN KEY ("user_id")
648
- REFERENCES "bscf_core_users" ("id")
649
- /*application='Dummy'*/
650
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
651
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
652
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES (20250326112449) /*application='Dummy'*/
653
-  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES
654
- (20250326105652),
655
- (20250326103305),
656
- (20250326085741),
657
- (20250326084233),
658
- (20250326081052),
659
- (20250326080646),
660
- (20250326075111),
661
- (20250326065606); /*application='Dummy'*/
662
-  (0.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'*/
663
- 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'*/
664
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 11:45:06.794820', '2025-03-26 11:45:06.794821') RETURNING "key" /*application='Dummy'*/
665
- 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'*/
666
- ActiveRecord::InternalMetadata Update (0.2ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 11:45:06.796426' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
667
- 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'*/
668
- ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', 'cb61332a8f83b592503da0d63ab3585af252e3bd', '2025-03-26 11:45:06.797528', '2025-03-26 11:45:06.797529') RETURNING "key" /*application='Dummy'*/
669
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
670
- ActiveRecord::SchemaMigration Load (6.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
671
- 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'*/
672
- Migrating to CreateBscfCoreRequestForQuotations (20250326115203)
673
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
674
-  (16.3ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint 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_8ed521a71d"
675
- FOREIGN KEY ("user_id")
676
- REFERENCES "bscf_core_users" ("id")
677
- ) /*application='Dummy'*/
678
-  (1.3ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
679
- ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326115203') RETURNING "version" /*application='Dummy'*/
680
- TRANSACTION (0.6ms) COMMIT /*application='Dummy'*/
681
-  (0.5ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
682
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
683
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
684
- 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'*/
685
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
686
- 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'*/
687
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
688
- 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'*/
689
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
690
-  (94.9ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
691
-  (143.1ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
692
- SQL (19.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
693
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
694
-  (3.0ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
695
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
696
-  (2.0ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
697
-  (0.8ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
698
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
699
-  (1.4ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
700
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
701
-  (2.0ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
702
-  (0.6ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
703
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
704
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
705
-  (1.6ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
706
-  (0.6ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
707
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
708
-  (1.6ms) CREATE TABLE "bscf_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'*/
709
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
710
-  (1.5ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
711
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
712
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
713
-  (1.2ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
714
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
715
-  (1.3ms) CREATE TABLE "bscf_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'*/
716
-  (0.7ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
717
-  (0.6ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
718
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
719
-  (2.3ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
720
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
721
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
722
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
723
-  (2.4ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
724
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
725
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
726
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
727
-  (1.9ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
728
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
729
-  (1.9ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
730
- FOREIGN KEY ("user_id")
731
- REFERENCES "bscf_core_users" ("id")
732
- /*application='Dummy'*/
733
-  (0.9ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
734
- FOREIGN KEY ("category_id")
735
- REFERENCES "bscf_core_categories" ("id")
736
- /*application='Dummy'*/
737
-  (0.7ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
738
- FOREIGN KEY ("user_id")
739
- REFERENCES "bscf_core_users" ("id")
740
- /*application='Dummy'*/
741
-  (1.0ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
742
- FOREIGN KEY ("address_id")
743
- REFERENCES "bscf_core_addresses" ("id")
744
- /*application='Dummy'*/
745
-  (0.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
746
- FOREIGN KEY ("user_id")
747
- REFERENCES "bscf_core_users" ("id")
748
- /*application='Dummy'*/
749
-  (0.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
750
- FOREIGN KEY ("verified_by_id")
751
- REFERENCES "bscf_core_users" ("id")
752
- /*application='Dummy'*/
753
-  (0.8ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
754
- FOREIGN KEY ("role_id")
755
- REFERENCES "bscf_core_roles" ("id")
756
- /*application='Dummy'*/
757
-  (1.2ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
758
- FOREIGN KEY ("user_id")
759
- REFERENCES "bscf_core_users" ("id")
760
- /*application='Dummy'*/
761
-  (1.0ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
762
- FOREIGN KEY ("user_id")
763
- REFERENCES "bscf_core_users" ("id")
764
- /*application='Dummy'*/
765
-  (1.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
766
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
767
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250326115203) /*application='Dummy'*/
768
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
769
- (20250326112449),
770
- (20250326105652),
771
- (20250326103305),
772
- (20250326085741),
773
- (20250326084233),
774
- (20250326081052),
775
- (20250326080646),
776
- (20250326075111),
777
- (20250326065606); /*application='Dummy'*/
778
-  (1.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'*/
779
- ActiveRecord::InternalMetadata Load (0.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
780
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 11:57:49.867481', '2025-03-26 11:57:49.867485') RETURNING "key" /*application='Dummy'*/
781
- 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'*/
782
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 11:57:49.871029' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
783
- 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'*/
784
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '726770b09c52816c4fe6ed5f072e97a0be203b3d', '2025-03-26 11:57:49.873995', '2025-03-26 11:57:49.873997') RETURNING "key" /*application='Dummy'*/
785
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
786
- ActiveRecord::SchemaMigration Load (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
787
- ActiveRecord::InternalMetadata Load (1.5ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
788
- Migrating to CreateBscfCoreRfqItems (20250326120613)
789
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
790
-  (18.6ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_1b773f00c6"
791
- FOREIGN KEY ("request_for_quotation_id")
792
- REFERENCES "bscf_core_request_for_quotations" ("id")
793
- , CONSTRAINT "fk_rails_1b2464a246"
794
- FOREIGN KEY ("product_id")
795
- REFERENCES "bscf_core_products" ("id")
796
- ) /*application='Dummy'*/
797
-  (1.9ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
798
-  (1.3ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
799
- ActiveRecord::SchemaMigration Create (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326120613') RETURNING "version" /*application='Dummy'*/
800
- TRANSACTION (0.5ms) COMMIT /*application='Dummy'*/
801
-  (0.6ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
802
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
803
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
804
- 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'*/
805
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
806
- 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'*/
807
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
808
- 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'*/
809
- SQL (0.2ms) SET search_path TO public /*application='Dummy'*/
810
-  (157.5ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
811
-  (146.0ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
812
- SQL (17.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
813
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
814
-  (3.7ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
815
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
816
-  (1.7ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
817
-  (0.6ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
818
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
819
-  (1.7ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
820
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
821
-  (1.8ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
822
-  (0.8ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
823
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
824
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
825
-  (1.5ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
826
-  (0.6ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
827
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
828
-  (1.6ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
829
-  (0.9ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
830
-  (0.6ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
831
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
832
-  (1.8ms) CREATE TABLE "bscf_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'*/
833
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
834
-  (1.9ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
835
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
836
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
837
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
838
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
839
-  (1.1ms) CREATE TABLE "bscf_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'*/
840
-  (0.8ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
841
-  (0.8ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
842
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
843
-  (1.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
844
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
845
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
846
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
847
-  (2.3ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
848
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
849
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
850
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
851
-  (0.8ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
852
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
853
-  (2.0ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
854
- FOREIGN KEY ("user_id")
855
- REFERENCES "bscf_core_users" ("id")
856
- /*application='Dummy'*/
857
-  (1.1ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
858
- FOREIGN KEY ("category_id")
859
- REFERENCES "bscf_core_categories" ("id")
860
- /*application='Dummy'*/
861
-  (0.7ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
862
- FOREIGN KEY ("user_id")
863
- REFERENCES "bscf_core_users" ("id")
864
- /*application='Dummy'*/
865
-  (0.8ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
866
- FOREIGN KEY ("product_id")
867
- REFERENCES "bscf_core_products" ("id")
868
- /*application='Dummy'*/
869
-  (0.8ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
870
- FOREIGN KEY ("request_for_quotation_id")
871
- REFERENCES "bscf_core_request_for_quotations" ("id")
872
- /*application='Dummy'*/
873
-  (0.9ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
874
- FOREIGN KEY ("address_id")
875
- REFERENCES "bscf_core_addresses" ("id")
876
- /*application='Dummy'*/
877
-  (0.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
878
- FOREIGN KEY ("user_id")
879
- REFERENCES "bscf_core_users" ("id")
880
- /*application='Dummy'*/
881
-  (0.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
882
- FOREIGN KEY ("verified_by_id")
883
- REFERENCES "bscf_core_users" ("id")
884
- /*application='Dummy'*/
885
-  (1.1ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
886
- FOREIGN KEY ("role_id")
887
- REFERENCES "bscf_core_roles" ("id")
888
- /*application='Dummy'*/
889
-  (0.6ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
890
- FOREIGN KEY ("user_id")
891
- REFERENCES "bscf_core_users" ("id")
892
- /*application='Dummy'*/
893
-  (0.9ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
894
- FOREIGN KEY ("user_id")
895
- REFERENCES "bscf_core_users" ("id")
896
- /*application='Dummy'*/
897
-  (2.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
898
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
899
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250326120613) /*application='Dummy'*/
900
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
901
- (20250326115203),
902
- (20250326112449),
903
- (20250326105652),
904
- (20250326103305),
905
- (20250326085741),
906
- (20250326084233),
907
- (20250326081052),
908
- (20250326080646),
909
- (20250326075111),
910
- (20250326065606); /*application='Dummy'*/
911
-  (1.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'*/
912
- ActiveRecord::InternalMetadata Load (0.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
913
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 12:10:55.278630', '2025-03-26 12:10:55.278634') RETURNING "key" /*application='Dummy'*/
914
- 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'*/
915
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 12:10:55.282356' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
916
- 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'*/
917
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '8a45fe0bd68bf3463c49abe73e6f37e8f5634eb3', '2025-03-26 12:10:55.285073', '2025-03-26 12:10:55.285075') RETURNING "key" /*application='Dummy'*/
918
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
919
- ActiveRecord::SchemaMigration Load (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
920
- 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'*/
921
-  (0.6ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
922
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
923
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
924
- 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'*/
925
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
926
- 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'*/
927
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
928
- 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'*/
929
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
930
-  (110.8ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
931
-  (295.1ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
932
- SQL (22.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
933
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
934
-  (5.9ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
935
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
936
-  (3.6ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
937
-  (1.0ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
938
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
939
-  (2.9ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
940
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
941
-  (3.6ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
942
-  (0.8ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
943
-  (1.2ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
944
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
945
-  (3.6ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
946
-  (1.2ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
947
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
948
-  (3.8ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
949
-  (1.6ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
950
-  (1.1ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
951
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
952
-  (3.8ms) CREATE TABLE "bscf_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'*/
953
-  (0.5ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
954
-  (3.9ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
955
-  (1.1ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
956
-  (1.2ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
957
-  (1.1ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
958
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
959
-  (2.9ms) CREATE TABLE "bscf_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'*/
960
-  (1.5ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
961
-  (1.4ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
962
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
963
-  (6.1ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
964
-  (1.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
965
-  (1.3ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
966
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
967
-  (7.1ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
968
-  (1.3ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
969
-  (1.1ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
970
-  (1.5ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
971
-  (1.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
972
-  (2.1ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
973
-  (5.0ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
974
- FOREIGN KEY ("user_id")
975
- REFERENCES "bscf_core_users" ("id")
976
- /*application='Dummy'*/
977
-  (2.4ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
978
- FOREIGN KEY ("category_id")
979
- REFERENCES "bscf_core_categories" ("id")
980
- /*application='Dummy'*/
981
-  (1.8ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
982
- FOREIGN KEY ("user_id")
983
- REFERENCES "bscf_core_users" ("id")
984
- /*application='Dummy'*/
985
-  (2.0ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
986
- FOREIGN KEY ("product_id")
987
- REFERENCES "bscf_core_products" ("id")
988
- /*application='Dummy'*/
989
-  (1.7ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
990
- FOREIGN KEY ("request_for_quotation_id")
991
- REFERENCES "bscf_core_request_for_quotations" ("id")
992
- /*application='Dummy'*/
993
-  (2.2ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
994
- FOREIGN KEY ("address_id")
995
- REFERENCES "bscf_core_addresses" ("id")
996
- /*application='Dummy'*/
997
-  (1.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
998
- FOREIGN KEY ("user_id")
999
- REFERENCES "bscf_core_users" ("id")
1000
- /*application='Dummy'*/
1001
-  (1.5ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
1002
- FOREIGN KEY ("verified_by_id")
1003
- REFERENCES "bscf_core_users" ("id")
1004
- /*application='Dummy'*/
1005
-  (2.1ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
1006
- FOREIGN KEY ("role_id")
1007
- REFERENCES "bscf_core_roles" ("id")
1008
- /*application='Dummy'*/
1009
-  (1.4ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
1010
- FOREIGN KEY ("user_id")
1011
- REFERENCES "bscf_core_users" ("id")
1012
- /*application='Dummy'*/
1013
-  (2.3ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
1014
- FOREIGN KEY ("user_id")
1015
- REFERENCES "bscf_core_users" ("id")
1016
- /*application='Dummy'*/
1017
-  (5.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
1018
- ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1019
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (20250326120613) /*application='Dummy'*/
1020
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES
1021
- (20250326115203),
1022
- (20250326112449),
1023
- (20250326105652),
1024
- (20250326103305),
1025
- (20250326085741),
1026
- (20250326084233),
1027
- (20250326081052),
1028
- (20250326080646),
1029
- (20250326075111),
1030
- (20250326065606); /*application='Dummy'*/
1031
-  (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'*/
1032
- ActiveRecord::InternalMetadata Load (1.0ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1033
- ActiveRecord::InternalMetadata Create (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-26 13:26:42.324200', '2025-03-26 13:26:42.324207') RETURNING "key" /*application='Dummy'*/
1034
- 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'*/
1035
- ActiveRecord::InternalMetadata Update (0.6ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-26 13:26:42.329163' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
1036
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1037
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '8a45fe0bd68bf3463c49abe73e6f37e8f5634eb3', '2025-03-26 13:26:42.332705', '2025-03-26 13:26:42.332708') RETURNING "key" /*application='Dummy'*/
1038
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
1039
- ActiveRecord::SchemaMigration Load (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1040
- ActiveRecord::InternalMetadata Load (2.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1041
- Migrating to CreateBscfCoreBscfCoreVirtualAccountTransactions (20250326121246)
1042
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
1043
-  (14.3ms) CREATE TABLE "bscf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint NOT NULL, "to_account_id" bigint NOT NULL, "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, CONSTRAINT "fk_rails_7dc2e329f8"
1044
- FOREIGN KEY ("from_account_id")
1045
- REFERENCES "bscf_core_virtual_accounts" ("id")
1046
- , CONSTRAINT "fk_rails_fc01221ed7"
1047
- FOREIGN KEY ("to_account_id")
1048
- REFERENCES "bscf_core_virtual_accounts" ("id")
1049
- ) /*application='Dummy'*/
1050
-  (1.8ms) CREATE INDEX "idx_on_from_account_id_643ea7341d" ON "bscf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
1051
-  (1.9ms) CREATE INDEX "index_bscf_core_virtual_account_transactions_on_to_account_id" ON "bscf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
1052
-  (1.1ms) CREATE UNIQUE INDEX "idx_on_reference_number_9aa4ea6333" ON "bscf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
1053
-  (0.8ms) CREATE INDEX "idx_on_from_account_id_reference_number_ecc8e65d8f" ON "bscf_core_virtual_account_transactions" ("from_account_id", "reference_number") /*application='Dummy'*/
1054
-  (0.7ms) CREATE INDEX "idx_on_to_account_id_reference_number_6f4048491d" ON "bscf_core_virtual_account_transactions" ("to_account_id", "reference_number") /*application='Dummy'*/
1055
- ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250326121246') RETURNING "version" /*application='Dummy'*/
1056
- TRANSACTION (0.4ms) COMMIT /*application='Dummy'*/
1057
- Migrating to CreateBscfCoreQuotations (20250327041651)
1058
- TRANSACTION (0.3ms) BEGIN /*application='Dummy'*/
1059
-  (7.6ms) CREATE TABLE "bscf_core_quotations" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "business_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_118cd93fd7"
1060
- FOREIGN KEY ("request_for_quotation_id")
1061
- REFERENCES "bscf_core_request_for_quotations" ("id")
1062
- , CONSTRAINT "fk_rails_5099683ac1"
1063
- FOREIGN KEY ("business_id")
1064
- REFERENCES "bscf_core_businesses" ("id")
1065
- ) /*application='Dummy'*/
1066
-  (2.1ms) CREATE INDEX "index_bscf_core_quotations_on_request_for_quotation_id" ON "bscf_core_quotations" ("request_for_quotation_id") /*application='Dummy'*/
1067
-  (1.4ms) CREATE INDEX "index_bscf_core_quotations_on_business_id" ON "bscf_core_quotations" ("business_id") /*application='Dummy'*/
1068
- ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250327041651') RETURNING "version" /*application='Dummy'*/
1069
- TRANSACTION (0.2ms) COMMIT /*application='Dummy'*/
1070
- Migrating to CreateBscfCoreQuotationItems (20250327044020)
1071
- TRANSACTION (0.4ms) BEGIN /*application='Dummy'*/
1072
-  (13.1ms) CREATE TABLE "bscf_core_quotation_items" ("id" bigserial primary key, "quotation_id" bigint NOT NULL, "rfq_item_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "unit" integer NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_0f1ff137cd"
1073
- FOREIGN KEY ("quotation_id")
1074
- REFERENCES "bscf_core_quotations" ("id")
1075
- , CONSTRAINT "fk_rails_54b38baf27"
1076
- FOREIGN KEY ("rfq_item_id")
1077
- REFERENCES "bscf_core_rfq_items" ("id")
1078
- , CONSTRAINT "fk_rails_b58f3b1bfb"
1079
- FOREIGN KEY ("product_id")
1080
- REFERENCES "bscf_core_products" ("id")
1081
- ) /*application='Dummy'*/
1082
-  (1.4ms) CREATE INDEX "index_bscf_core_quotation_items_on_quotation_id" ON "bscf_core_quotation_items" ("quotation_id") /*application='Dummy'*/
1083
-  (1.0ms) CREATE INDEX "index_bscf_core_quotation_items_on_rfq_item_id" ON "bscf_core_quotation_items" ("rfq_item_id") /*application='Dummy'*/
1084
-  (1.0ms) CREATE INDEX "index_bscf_core_quotation_items_on_product_id" ON "bscf_core_quotation_items" ("product_id") /*application='Dummy'*/
1085
- ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250327044020') RETURNING "version" /*application='Dummy'*/
1086
- TRANSACTION (0.5ms) COMMIT /*application='Dummy'*/
1087
-  (0.6ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
1088
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1089
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1090
- 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'*/
1091
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1092
- 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'*/
1093
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1094
- 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'*/
1095
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
1096
-  (75.5ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
1097
-  (66.5ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
1098
- SQL (16.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
1099
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
1100
-  (3.1ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1101
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
1102
-  (1.9ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
1103
-  (0.5ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
1104
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
1105
-  (1.5ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1106
-  (0.4ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
1107
-  (1.3ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1108
-  (0.6ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
1109
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
1110
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotation_items" CASCADE /*application='Dummy'*/
1111
-  (1.7ms) CREATE TABLE "bscf_core_quotation_items" ("id" bigserial primary key, "quotation_id" bigint NOT NULL, "rfq_item_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "unit" integer NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1112
-  (0.7ms) CREATE INDEX "index_bscf_core_quotation_items_on_product_id" ON "bscf_core_quotation_items" ("product_id") /*application='Dummy'*/
1113
-  (0.5ms) CREATE INDEX "index_bscf_core_quotation_items_on_quotation_id" ON "bscf_core_quotation_items" ("quotation_id") /*application='Dummy'*/
1114
-  (0.5ms) CREATE INDEX "index_bscf_core_quotation_items_on_rfq_item_id" ON "bscf_core_quotation_items" ("rfq_item_id") /*application='Dummy'*/
1115
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotations" CASCADE /*application='Dummy'*/
1116
-  (1.8ms) CREATE TABLE "bscf_core_quotations" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "business_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'*/
1117
-  (0.6ms) CREATE INDEX "index_bscf_core_quotations_on_business_id" ON "bscf_core_quotations" ("business_id") /*application='Dummy'*/
1118
-  (0.5ms) CREATE INDEX "index_bscf_core_quotations_on_request_for_quotation_id" ON "bscf_core_quotations" ("request_for_quotation_id") /*application='Dummy'*/
1119
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
1120
-  (1.6ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1121
-  (0.6ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
1122
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
1123
-  (1.5ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1124
-  (1.3ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
1125
-  (0.7ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
1126
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
1127
-  (1.5ms) CREATE TABLE "bscf_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'*/
1128
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
1129
-  (1.6ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1130
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
1131
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
1132
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
1133
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
1134
-  (1.2ms) CREATE TABLE "bscf_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'*/
1135
-  (0.6ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
1136
-  (0.7ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
1137
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
1138
-  (2.1ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1139
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
1140
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
1141
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
1142
-  (1.6ms) CREATE TABLE "bscf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint NOT NULL, "to_account_id" bigint NOT NULL, "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'*/
1143
-  (0.7ms) CREATE INDEX "idx_on_from_account_id_reference_number_ecc8e65d8f" ON "bscf_core_virtual_account_transactions" ("from_account_id", "reference_number") /*application='Dummy'*/
1144
-  (0.6ms) CREATE INDEX "idx_on_from_account_id_643ea7341d" ON "bscf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
1145
-  (0.9ms) CREATE UNIQUE INDEX "idx_on_reference_number_9aa4ea6333" ON "bscf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
1146
-  (0.7ms) CREATE INDEX "idx_on_to_account_id_reference_number_6f4048491d" ON "bscf_core_virtual_account_transactions" ("to_account_id", "reference_number") /*application='Dummy'*/
1147
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_account_transactions_on_to_account_id" ON "bscf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
1148
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
1149
-  (2.0ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1150
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
1151
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
1152
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
1153
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
1154
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
1155
-  (1.6ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
1156
- FOREIGN KEY ("user_id")
1157
- REFERENCES "bscf_core_users" ("id")
1158
- /*application='Dummy'*/
1159
-  (0.9ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
1160
- FOREIGN KEY ("category_id")
1161
- REFERENCES "bscf_core_categories" ("id")
1162
- /*application='Dummy'*/
1163
-  (0.9ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_b58f3b1bfb"
1164
- FOREIGN KEY ("product_id")
1165
- REFERENCES "bscf_core_products" ("id")
1166
- /*application='Dummy'*/
1167
-  (1.6ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_0f1ff137cd"
1168
- FOREIGN KEY ("quotation_id")
1169
- REFERENCES "bscf_core_quotations" ("id")
1170
- /*application='Dummy'*/
1171
-  (0.9ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_54b38baf27"
1172
- FOREIGN KEY ("rfq_item_id")
1173
- REFERENCES "bscf_core_rfq_items" ("id")
1174
- /*application='Dummy'*/
1175
-  (0.6ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_5099683ac1"
1176
- FOREIGN KEY ("business_id")
1177
- REFERENCES "bscf_core_businesses" ("id")
1178
- /*application='Dummy'*/
1179
-  (0.7ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_118cd93fd7"
1180
- FOREIGN KEY ("request_for_quotation_id")
1181
- REFERENCES "bscf_core_request_for_quotations" ("id")
1182
- /*application='Dummy'*/
1183
-  (0.8ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
1184
- FOREIGN KEY ("user_id")
1185
- REFERENCES "bscf_core_users" ("id")
1186
- /*application='Dummy'*/
1187
-  (0.6ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
1188
- FOREIGN KEY ("product_id")
1189
- REFERENCES "bscf_core_products" ("id")
1190
- /*application='Dummy'*/
1191
-  (0.6ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
1192
- FOREIGN KEY ("request_for_quotation_id")
1193
- REFERENCES "bscf_core_request_for_quotations" ("id")
1194
- /*application='Dummy'*/
1195
-  (0.9ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
1196
- FOREIGN KEY ("address_id")
1197
- REFERENCES "bscf_core_addresses" ("id")
1198
- /*application='Dummy'*/
1199
-  (0.9ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
1200
- FOREIGN KEY ("user_id")
1201
- REFERENCES "bscf_core_users" ("id")
1202
- /*application='Dummy'*/
1203
-  (0.9ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
1204
- FOREIGN KEY ("verified_by_id")
1205
- REFERENCES "bscf_core_users" ("id")
1206
- /*application='Dummy'*/
1207
-  (0.8ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
1208
- FOREIGN KEY ("role_id")
1209
- REFERENCES "bscf_core_roles" ("id")
1210
- /*application='Dummy'*/
1211
-  (0.7ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
1212
- FOREIGN KEY ("user_id")
1213
- REFERENCES "bscf_core_users" ("id")
1214
- /*application='Dummy'*/
1215
-  (1.5ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_7dc2e329f8"
1216
- FOREIGN KEY ("from_account_id")
1217
- REFERENCES "bscf_core_virtual_accounts" ("id")
1218
- /*application='Dummy'*/
1219
-  (0.7ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_fc01221ed7"
1220
- FOREIGN KEY ("to_account_id")
1221
- REFERENCES "bscf_core_virtual_accounts" ("id")
1222
- /*application='Dummy'*/
1223
-  (0.6ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
1224
- FOREIGN KEY ("user_id")
1225
- REFERENCES "bscf_core_users" ("id")
1226
- /*application='Dummy'*/
1227
-  (1.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
1228
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1229
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250327044020) /*application='Dummy'*/
1230
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES
1231
- (20250327041651),
1232
- (20250326121246),
1233
- (20250326120613),
1234
- (20250326115203),
1235
- (20250326112449),
1236
- (20250326105652),
1237
- (20250326103305),
1238
- (20250326085741),
1239
- (20250326084233),
1240
- (20250326081052),
1241
- (20250326080646),
1242
- (20250326075111),
1243
- (20250326065606); /*application='Dummy'*/
1244
-  (1.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'*/
1245
- ActiveRecord::InternalMetadata Load (0.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1246
- ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-27 10:13:08.637619', '2025-03-27 10:13:08.637622') RETURNING "key" /*application='Dummy'*/
1247
- 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'*/
1248
- ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-27 10:13:08.641774' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
1249
- 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'*/
1250
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '16e63d222df3fc79f0d950f309086459d274dfd1', '2025-03-27 10:13:08.644576', '2025-03-27 10:13:08.644578') RETURNING "key" /*application='Dummy'*/
1251
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
1252
- ActiveRecord::SchemaMigration Load (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1253
- ActiveRecord::InternalMetadata Load (1.5ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1254
- Migrating to CreateBscfCoreOrders (20250327102217)
1255
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
1256
-  (16.1ms) CREATE TABLE "bscf_core_orders" ("id" bigserial primary key, "ordered_by_id" bigint, "ordered_to_id" bigint, "quotation_id" bigint, "order_type" integer DEFAULT 0 NOT NULL, "status" integer DEFAULT 0 NOT NULL, "total_amount" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_a2aea18f9c"
1257
- FOREIGN KEY ("ordered_by_id")
1258
- REFERENCES "bscf_core_users" ("id")
1259
- , CONSTRAINT "fk_rails_6134cde349"
1260
- FOREIGN KEY ("ordered_to_id")
1261
- REFERENCES "bscf_core_users" ("id")
1262
- , CONSTRAINT "fk_rails_f175f710a9"
1263
- FOREIGN KEY ("quotation_id")
1264
- REFERENCES "quotations" ("id")
1265
- ) /*application='Dummy'*/
1266
- TRANSACTION (0.1ms) ROLLBACK /*application='Dummy'*/
1267
-  (0.2ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
1268
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
1269
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1270
- ActiveRecord::InternalMetadata Load (1.0ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1271
- Migrating to CreateBscfCoreOrders (20250327102217)
1272
- TRANSACTION (0.1ms) BEGIN /*application='Dummy'*/
1273
-  (9.1ms) CREATE TABLE "bscf_core_orders" ("id" bigserial primary key, "ordered_by_id" bigint, "ordered_to_id" bigint, "quotation_id" bigint, "order_type" integer DEFAULT 0 NOT NULL, "status" integer DEFAULT 0 NOT NULL, "total_amount" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_a2aea18f9c"
1274
- FOREIGN KEY ("ordered_by_id")
1275
- REFERENCES "bscf_core_users" ("id")
1276
- , CONSTRAINT "fk_rails_6134cde349"
1277
- FOREIGN KEY ("ordered_to_id")
1278
- REFERENCES "bscf_core_users" ("id")
1279
- , CONSTRAINT "fk_rails_f175f710a9"
1280
- FOREIGN KEY ("quotation_id")
1281
- REFERENCES "bscf_core_quotations" ("id")
1282
- ) /*application='Dummy'*/
1283
-  (1.5ms) CREATE INDEX "index_bscf_core_orders_on_ordered_by_id" ON "bscf_core_orders" ("ordered_by_id") /*application='Dummy'*/
1284
-  (1.6ms) CREATE INDEX "index_bscf_core_orders_on_ordered_to_id" ON "bscf_core_orders" ("ordered_to_id") /*application='Dummy'*/
1285
-  (1.5ms) CREATE INDEX "index_bscf_core_orders_on_quotation_id" ON "bscf_core_orders" ("quotation_id") /*application='Dummy'*/
1286
- ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250327102217') RETURNING "version" /*application='Dummy'*/
1287
- TRANSACTION (0.4ms) COMMIT /*application='Dummy'*/
1288
-  (0.7ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
1289
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1290
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1291
- 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'*/
1292
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1293
- 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'*/
1294
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1295
- 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'*/
1296
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
1297
-  (71.2ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
1298
-  (119.7ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
1299
- SQL (17.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
1300
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
1301
-  (2.9ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1302
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
1303
-  (1.9ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
1304
-  (0.6ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
1305
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
1306
-  (1.2ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1307
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_orders" CASCADE /*application='Dummy'*/
1308
-  (1.0ms) CREATE TABLE "bscf_core_orders" ("id" bigserial primary key, "ordered_by_id" bigint, "ordered_to_id" bigint, "quotation_id" bigint, "order_type" integer DEFAULT 0 NOT NULL, "status" integer DEFAULT 0 NOT NULL, "total_amount" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1309
-  (1.1ms) CREATE INDEX "index_bscf_core_orders_on_ordered_by_id" ON "bscf_core_orders" ("ordered_by_id") /*application='Dummy'*/
1310
-  (0.6ms) CREATE INDEX "index_bscf_core_orders_on_ordered_to_id" ON "bscf_core_orders" ("ordered_to_id") /*application='Dummy'*/
1311
-  (0.7ms) CREATE INDEX "index_bscf_core_orders_on_quotation_id" ON "bscf_core_orders" ("quotation_id") /*application='Dummy'*/
1312
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
1313
-  (1.4ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1314
-  (0.6ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
1315
-  (1.0ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
1316
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_quotation_items" CASCADE /*application='Dummy'*/
1317
-  (1.8ms) CREATE TABLE "bscf_core_quotation_items" ("id" bigserial primary key, "quotation_id" bigint NOT NULL, "rfq_item_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "unit" integer NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1318
-  (1.0ms) CREATE INDEX "index_bscf_core_quotation_items_on_product_id" ON "bscf_core_quotation_items" ("product_id") /*application='Dummy'*/
1319
-  (0.5ms) CREATE INDEX "index_bscf_core_quotation_items_on_quotation_id" ON "bscf_core_quotation_items" ("quotation_id") /*application='Dummy'*/
1320
-  (0.5ms) CREATE INDEX "index_bscf_core_quotation_items_on_rfq_item_id" ON "bscf_core_quotation_items" ("rfq_item_id") /*application='Dummy'*/
1321
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotations" CASCADE /*application='Dummy'*/
1322
-  (2.1ms) CREATE TABLE "bscf_core_quotations" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "business_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'*/
1323
-  (0.7ms) CREATE INDEX "index_bscf_core_quotations_on_business_id" ON "bscf_core_quotations" ("business_id") /*application='Dummy'*/
1324
-  (0.7ms) CREATE INDEX "index_bscf_core_quotations_on_request_for_quotation_id" ON "bscf_core_quotations" ("request_for_quotation_id") /*application='Dummy'*/
1325
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
1326
-  (1.6ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1327
-  (0.6ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
1328
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
1329
-  (1.4ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1330
-  (0.6ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
1331
-  (0.5ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
1332
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
1333
-  (1.8ms) CREATE TABLE "bscf_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'*/
1334
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
1335
-  (2.0ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1336
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
1337
-  (0.5ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
1338
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
1339
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
1340
-  (1.4ms) CREATE TABLE "bscf_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'*/
1341
-  (0.7ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
1342
-  (0.6ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
1343
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
1344
-  (1.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1345
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
1346
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
1347
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
1348
-  (1.8ms) CREATE TABLE "bscf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint NOT NULL, "to_account_id" bigint NOT NULL, "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'*/
1349
-  (0.7ms) CREATE INDEX "idx_on_from_account_id_reference_number_ecc8e65d8f" ON "bscf_core_virtual_account_transactions" ("from_account_id", "reference_number") /*application='Dummy'*/
1350
-  (0.8ms) CREATE INDEX "idx_on_from_account_id_643ea7341d" ON "bscf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
1351
-  (0.7ms) CREATE UNIQUE INDEX "idx_on_reference_number_9aa4ea6333" ON "bscf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
1352
-  (0.6ms) CREATE INDEX "idx_on_to_account_id_reference_number_6f4048491d" ON "bscf_core_virtual_account_transactions" ("to_account_id", "reference_number") /*application='Dummy'*/
1353
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_account_transactions_on_to_account_id" ON "bscf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
1354
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
1355
-  (2.0ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1356
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
1357
-  (0.8ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
1358
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
1359
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
1360
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
1361
-  (1.8ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
1362
- FOREIGN KEY ("user_id")
1363
- REFERENCES "bscf_core_users" ("id")
1364
- /*application='Dummy'*/
1365
-  (1.2ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_f175f710a9"
1366
- FOREIGN KEY ("quotation_id")
1367
- REFERENCES "bscf_core_quotations" ("id")
1368
- /*application='Dummy'*/
1369
-  (0.6ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_a2aea18f9c"
1370
- FOREIGN KEY ("ordered_by_id")
1371
- REFERENCES "bscf_core_users" ("id")
1372
- /*application='Dummy'*/
1373
-  (0.7ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_6134cde349"
1374
- FOREIGN KEY ("ordered_to_id")
1375
- REFERENCES "bscf_core_users" ("id")
1376
- /*application='Dummy'*/
1377
-  (0.8ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
1378
- FOREIGN KEY ("category_id")
1379
- REFERENCES "bscf_core_categories" ("id")
1380
- /*application='Dummy'*/
1381
-  (0.7ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_b58f3b1bfb"
1382
- FOREIGN KEY ("product_id")
1383
- REFERENCES "bscf_core_products" ("id")
1384
- /*application='Dummy'*/
1385
-  (0.5ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_0f1ff137cd"
1386
- FOREIGN KEY ("quotation_id")
1387
- REFERENCES "bscf_core_quotations" ("id")
1388
- /*application='Dummy'*/
1389
-  (1.0ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_54b38baf27"
1390
- FOREIGN KEY ("rfq_item_id")
1391
- REFERENCES "bscf_core_rfq_items" ("id")
1392
- /*application='Dummy'*/
1393
-  (0.6ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_5099683ac1"
1394
- FOREIGN KEY ("business_id")
1395
- REFERENCES "bscf_core_businesses" ("id")
1396
- /*application='Dummy'*/
1397
-  (0.7ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_118cd93fd7"
1398
- FOREIGN KEY ("request_for_quotation_id")
1399
- REFERENCES "bscf_core_request_for_quotations" ("id")
1400
- /*application='Dummy'*/
1401
-  (0.7ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
1402
- FOREIGN KEY ("user_id")
1403
- REFERENCES "bscf_core_users" ("id")
1404
- /*application='Dummy'*/
1405
-  (0.8ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
1406
- FOREIGN KEY ("product_id")
1407
- REFERENCES "bscf_core_products" ("id")
1408
- /*application='Dummy'*/
1409
-  (0.8ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
1410
- FOREIGN KEY ("request_for_quotation_id")
1411
- REFERENCES "bscf_core_request_for_quotations" ("id")
1412
- /*application='Dummy'*/
1413
-  (0.9ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
1414
- FOREIGN KEY ("address_id")
1415
- REFERENCES "bscf_core_addresses" ("id")
1416
- /*application='Dummy'*/
1417
-  (0.8ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
1418
- FOREIGN KEY ("user_id")
1419
- REFERENCES "bscf_core_users" ("id")
1420
- /*application='Dummy'*/
1421
-  (0.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
1422
- FOREIGN KEY ("verified_by_id")
1423
- REFERENCES "bscf_core_users" ("id")
1424
- /*application='Dummy'*/
1425
-  (0.8ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
1426
- FOREIGN KEY ("role_id")
1427
- REFERENCES "bscf_core_roles" ("id")
1428
- /*application='Dummy'*/
1429
-  (0.6ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
1430
- FOREIGN KEY ("user_id")
1431
- REFERENCES "bscf_core_users" ("id")
1432
- /*application='Dummy'*/
1433
-  (1.4ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_7dc2e329f8"
1434
- FOREIGN KEY ("from_account_id")
1435
- REFERENCES "bscf_core_virtual_accounts" ("id")
1436
- /*application='Dummy'*/
1437
-  (0.6ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_fc01221ed7"
1438
- FOREIGN KEY ("to_account_id")
1439
- REFERENCES "bscf_core_virtual_accounts" ("id")
1440
- /*application='Dummy'*/
1441
-  (0.6ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
1442
- FOREIGN KEY ("user_id")
1443
- REFERENCES "bscf_core_users" ("id")
1444
- /*application='Dummy'*/
1445
-  (1.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
1446
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1447
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES (20250327102217) /*application='Dummy'*/
1448
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES
1449
- (20250327044020),
1450
- (20250327041651),
1451
- (20250326121246),
1452
- (20250326120613),
1453
- (20250326115203),
1454
- (20250326112449),
1455
- (20250326105652),
1456
- (20250326103305),
1457
- (20250326085741),
1458
- (20250326084233),
1459
- (20250326081052),
1460
- (20250326080646),
1461
- (20250326075111),
1462
- (20250326065606); /*application='Dummy'*/
1463
-  (2.2ms) 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'*/
1464
- ActiveRecord::InternalMetadata Load (0.7ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1465
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-27 10:58:10.644963', '2025-03-27 10:58:10.644970') RETURNING "key" /*application='Dummy'*/
1466
- 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'*/
1467
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-27 10:58:10.648854' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
1468
- 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'*/
1469
- ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '58ffc44e4fb07f7574e2107f7f7563f0b0e112c9', '2025-03-27 10:58:10.651733', '2025-03-27 10:58:10.651735') RETURNING "key" /*application='Dummy'*/
1470
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
1471
- ActiveRecord::SchemaMigration Load (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1472
- 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'*/
1473
-  (0.7ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
1474
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1475
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1476
- 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'*/
1477
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1478
- 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'*/
1479
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1480
- 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'*/
1481
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
1482
-  (44.5ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
1483
-  (131.2ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
1484
- SQL (21.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
1485
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
1486
-  (4.9ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1487
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
1488
-  (2.2ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
1489
-  (0.8ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
1490
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
1491
-  (2.5ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1492
-  (0.4ms) DROP TABLE IF EXISTS "bscf_core_orders" CASCADE /*application='Dummy'*/
1493
-  (1.9ms) CREATE TABLE "bscf_core_orders" ("id" bigserial primary key, "ordered_by_id" bigint, "ordered_to_id" bigint, "quotation_id" bigint, "order_type" integer DEFAULT 0 NOT NULL, "status" integer DEFAULT 0 NOT NULL, "total_amount" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1494
-  (0.9ms) CREATE INDEX "index_bscf_core_orders_on_ordered_by_id" ON "bscf_core_orders" ("ordered_by_id") /*application='Dummy'*/
1495
-  (0.8ms) CREATE INDEX "index_bscf_core_orders_on_ordered_to_id" ON "bscf_core_orders" ("ordered_to_id") /*application='Dummy'*/
1496
-  (0.8ms) CREATE INDEX "index_bscf_core_orders_on_quotation_id" ON "bscf_core_orders" ("quotation_id") /*application='Dummy'*/
1497
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
1498
-  (2.7ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1499
-  (1.0ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
1500
-  (0.9ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
1501
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotation_items" CASCADE /*application='Dummy'*/
1502
-  (2.3ms) CREATE TABLE "bscf_core_quotation_items" ("id" bigserial primary key, "quotation_id" bigint NOT NULL, "rfq_item_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "unit" integer NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1503
-  (0.9ms) CREATE INDEX "index_bscf_core_quotation_items_on_product_id" ON "bscf_core_quotation_items" ("product_id") /*application='Dummy'*/
1504
-  (1.3ms) CREATE INDEX "index_bscf_core_quotation_items_on_quotation_id" ON "bscf_core_quotation_items" ("quotation_id") /*application='Dummy'*/
1505
-  (0.7ms) CREATE INDEX "index_bscf_core_quotation_items_on_rfq_item_id" ON "bscf_core_quotation_items" ("rfq_item_id") /*application='Dummy'*/
1506
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotations" CASCADE /*application='Dummy'*/
1507
-  (2.4ms) CREATE TABLE "bscf_core_quotations" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "business_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'*/
1508
-  (1.2ms) CREATE INDEX "index_bscf_core_quotations_on_business_id" ON "bscf_core_quotations" ("business_id") /*application='Dummy'*/
1509
-  (0.8ms) CREATE INDEX "index_bscf_core_quotations_on_request_for_quotation_id" ON "bscf_core_quotations" ("request_for_quotation_id") /*application='Dummy'*/
1510
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
1511
-  (3.9ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1512
-  (1.5ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
1513
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
1514
-  (3.5ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1515
-  (1.4ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
1516
-  (1.2ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
1517
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
1518
-  (3.7ms) CREATE TABLE "bscf_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'*/
1519
-  (0.5ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
1520
-  (4.9ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1521
-  (1.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
1522
-  (1.3ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
1523
-  (1.3ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
1524
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
1525
-  (4.0ms) CREATE TABLE "bscf_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'*/
1526
-  (1.5ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
1527
-  (1.4ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
1528
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
1529
-  (4.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1530
-  (1.7ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
1531
-  (2.2ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
1532
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
1533
-  (6.1ms) CREATE TABLE "bscf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint NOT NULL, "to_account_id" bigint NOT NULL, "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'*/
1534
-  (2.4ms) CREATE INDEX "idx_on_from_account_id_reference_number_ecc8e65d8f" ON "bscf_core_virtual_account_transactions" ("from_account_id", "reference_number") /*application='Dummy'*/
1535
-  (1.8ms) CREATE INDEX "idx_on_from_account_id_643ea7341d" ON "bscf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
1536
-  (2.2ms) CREATE UNIQUE INDEX "idx_on_reference_number_9aa4ea6333" ON "bscf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
1537
-  (2.6ms) CREATE INDEX "idx_on_to_account_id_reference_number_6f4048491d" ON "bscf_core_virtual_account_transactions" ("to_account_id", "reference_number") /*application='Dummy'*/
1538
-  (1.6ms) CREATE INDEX "index_bscf_core_virtual_account_transactions_on_to_account_id" ON "bscf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
1539
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
1540
-  (6.0ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1541
-  (1.9ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
1542
-  (1.9ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
1543
-  (1.3ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
1544
-  (1.4ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
1545
-  (1.4ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
1546
-  (4.0ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
1547
- FOREIGN KEY ("user_id")
1548
- REFERENCES "bscf_core_users" ("id")
1549
- /*application='Dummy'*/
1550
-  (2.4ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_f175f710a9"
1551
- FOREIGN KEY ("quotation_id")
1552
- REFERENCES "bscf_core_quotations" ("id")
1553
- /*application='Dummy'*/
1554
-  (1.8ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_a2aea18f9c"
1555
- FOREIGN KEY ("ordered_by_id")
1556
- REFERENCES "bscf_core_users" ("id")
1557
- /*application='Dummy'*/
1558
-  (1.7ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_6134cde349"
1559
- FOREIGN KEY ("ordered_to_id")
1560
- REFERENCES "bscf_core_users" ("id")
1561
- /*application='Dummy'*/
1562
-  (2.9ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
1563
- FOREIGN KEY ("category_id")
1564
- REFERENCES "bscf_core_categories" ("id")
1565
- /*application='Dummy'*/
1566
-  (1.9ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_b58f3b1bfb"
1567
- FOREIGN KEY ("product_id")
1568
- REFERENCES "bscf_core_products" ("id")
1569
- /*application='Dummy'*/
1570
-  (1.7ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_0f1ff137cd"
1571
- FOREIGN KEY ("quotation_id")
1572
- REFERENCES "bscf_core_quotations" ("id")
1573
- /*application='Dummy'*/
1574
-  (2.3ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_54b38baf27"
1575
- FOREIGN KEY ("rfq_item_id")
1576
- REFERENCES "bscf_core_rfq_items" ("id")
1577
- /*application='Dummy'*/
1578
-  (3.0ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_5099683ac1"
1579
- FOREIGN KEY ("business_id")
1580
- REFERENCES "bscf_core_businesses" ("id")
1581
- /*application='Dummy'*/
1582
-  (2.3ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_118cd93fd7"
1583
- FOREIGN KEY ("request_for_quotation_id")
1584
- REFERENCES "bscf_core_request_for_quotations" ("id")
1585
- /*application='Dummy'*/
1586
-  (1.8ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
1587
- FOREIGN KEY ("user_id")
1588
- REFERENCES "bscf_core_users" ("id")
1589
- /*application='Dummy'*/
1590
-  (1.6ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
1591
- FOREIGN KEY ("product_id")
1592
- REFERENCES "bscf_core_products" ("id")
1593
- /*application='Dummy'*/
1594
-  (2.0ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
1595
- FOREIGN KEY ("request_for_quotation_id")
1596
- REFERENCES "bscf_core_request_for_quotations" ("id")
1597
- /*application='Dummy'*/
1598
-  (2.3ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
1599
- FOREIGN KEY ("address_id")
1600
- REFERENCES "bscf_core_addresses" ("id")
1601
- /*application='Dummy'*/
1602
-  (1.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
1603
- FOREIGN KEY ("user_id")
1604
- REFERENCES "bscf_core_users" ("id")
1605
- /*application='Dummy'*/
1606
-  (1.6ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
1607
- FOREIGN KEY ("verified_by_id")
1608
- REFERENCES "bscf_core_users" ("id")
1609
- /*application='Dummy'*/
1610
-  (2.0ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
1611
- FOREIGN KEY ("role_id")
1612
- REFERENCES "bscf_core_roles" ("id")
1613
- /*application='Dummy'*/
1614
-  (1.4ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
1615
- FOREIGN KEY ("user_id")
1616
- REFERENCES "bscf_core_users" ("id")
1617
- /*application='Dummy'*/
1618
-  (3.4ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_7dc2e329f8"
1619
- FOREIGN KEY ("from_account_id")
1620
- REFERENCES "bscf_core_virtual_accounts" ("id")
1621
- /*application='Dummy'*/
1622
-  (1.8ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_fc01221ed7"
1623
- FOREIGN KEY ("to_account_id")
1624
- REFERENCES "bscf_core_virtual_accounts" ("id")
1625
- /*application='Dummy'*/
1626
-  (1.4ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
1627
- FOREIGN KEY ("user_id")
1628
- REFERENCES "bscf_core_users" ("id")
1629
- /*application='Dummy'*/
1630
-  (4.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
1631
- ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1632
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES (20250327102217) /*application='Dummy'*/
1633
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES
1634
- (20250327044020),
1635
- (20250327041651),
1636
- (20250326121246),
1637
- (20250326120613),
1638
- (20250326115203),
1639
- (20250326112449),
1640
- (20250326105652),
1641
- (20250326103305),
1642
- (20250326085741),
1643
- (20250326084233),
1644
- (20250326081052),
1645
- (20250326080646),
1646
- (20250326075111),
1647
- (20250326065606); /*application='Dummy'*/
1648
-  (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'*/
1649
- ActiveRecord::InternalMetadata Load (1.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1650
- ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-27 11:21:08.085047', '2025-03-27 11:21:08.085055') RETURNING "key" /*application='Dummy'*/
1651
- 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'*/
1652
- ActiveRecord::InternalMetadata Update (0.6ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-27 11:21:08.090091' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
1653
- 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'*/
1654
- ActiveRecord::InternalMetadata Create (1.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '58ffc44e4fb07f7574e2107f7f7563f0b0e112c9', '2025-03-27 11:21:08.094558', '2025-03-27 11:21:08.094562') RETURNING "key" /*application='Dummy'*/
1655
-  (0.3ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
1656
- ActiveRecord::SchemaMigration Load (2.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1657
- 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'*/
1658
- Migrating to CreateBscfCoreOrderItems (20250327112412)
1659
- TRANSACTION (0.2ms) BEGIN /*application='Dummy'*/
1660
-  (16.2ms) CREATE TABLE "bscf_core_order_items" ("id" bigserial primary key, "order_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quotation_item_id" bigint, "quantity" float NOT NULL, "unit_price" float NOT NULL, "subtotal" float NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT "fk_rails_594dbae950"
1661
- FOREIGN KEY ("order_id")
1662
- REFERENCES "bscf_core_orders" ("id")
1663
- , CONSTRAINT "fk_rails_17adb37720"
1664
- FOREIGN KEY ("product_id")
1665
- REFERENCES "bscf_core_products" ("id")
1666
- , CONSTRAINT "fk_rails_dfc96f9a7f"
1667
- FOREIGN KEY ("quotation_item_id")
1668
- REFERENCES "bscf_core_quotation_items" ("id")
1669
- ) /*application='Dummy'*/
1670
-  (1.1ms) CREATE INDEX "index_bscf_core_order_items_on_order_id" ON "bscf_core_order_items" ("order_id") /*application='Dummy'*/
1671
-  (0.9ms) CREATE INDEX "index_bscf_core_order_items_on_product_id" ON "bscf_core_order_items" ("product_id") /*application='Dummy'*/
1672
-  (1.0ms) CREATE INDEX "index_bscf_core_order_items_on_quotation_item_id" ON "bscf_core_order_items" ("quotation_item_id") /*application='Dummy'*/
1673
- ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20250327112412') RETURNING "version" /*application='Dummy'*/
1674
- TRANSACTION (0.4ms) COMMIT /*application='Dummy'*/
1675
-  (0.4ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
1676
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1677
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1678
- 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'*/
1679
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1680
- 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'*/
1681
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1682
- 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'*/
1683
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
1684
-  (103.9ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
1685
-  (143.1ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
1686
- SQL (16.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
1687
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
1688
-  (3.3ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1689
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
1690
-  (1.4ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
1691
-  (0.9ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
1692
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
1693
-  (1.5ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1694
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_order_items" CASCADE /*application='Dummy'*/
1695
-  (1.7ms) CREATE TABLE "bscf_core_order_items" ("id" bigserial primary key, "order_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quotation_item_id" bigint, "quantity" float NOT NULL, "unit_price" float NOT NULL, "subtotal" float NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1696
-  (0.7ms) CREATE INDEX "index_bscf_core_order_items_on_order_id" ON "bscf_core_order_items" ("order_id") /*application='Dummy'*/
1697
-  (0.5ms) CREATE INDEX "index_bscf_core_order_items_on_product_id" ON "bscf_core_order_items" ("product_id") /*application='Dummy'*/
1698
-  (0.5ms) CREATE INDEX "index_bscf_core_order_items_on_quotation_item_id" ON "bscf_core_order_items" ("quotation_item_id") /*application='Dummy'*/
1699
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_orders" CASCADE /*application='Dummy'*/
1700
-  (1.3ms) CREATE TABLE "bscf_core_orders" ("id" bigserial primary key, "ordered_by_id" bigint, "ordered_to_id" bigint, "quotation_id" bigint, "order_type" integer DEFAULT 0 NOT NULL, "status" integer DEFAULT 0 NOT NULL, "total_amount" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1701
-  (0.6ms) CREATE INDEX "index_bscf_core_orders_on_ordered_by_id" ON "bscf_core_orders" ("ordered_by_id") /*application='Dummy'*/
1702
-  (1.2ms) CREATE INDEX "index_bscf_core_orders_on_ordered_to_id" ON "bscf_core_orders" ("ordered_to_id") /*application='Dummy'*/
1703
-  (0.7ms) CREATE INDEX "index_bscf_core_orders_on_quotation_id" ON "bscf_core_orders" ("quotation_id") /*application='Dummy'*/
1704
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
1705
-  (1.8ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1706
-  (0.7ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
1707
-  (0.7ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
1708
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotation_items" CASCADE /*application='Dummy'*/
1709
-  (1.6ms) CREATE TABLE "bscf_core_quotation_items" ("id" bigserial primary key, "quotation_id" bigint NOT NULL, "rfq_item_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "unit" integer NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1710
-  (0.9ms) CREATE INDEX "index_bscf_core_quotation_items_on_product_id" ON "bscf_core_quotation_items" ("product_id") /*application='Dummy'*/
1711
-  (0.6ms) CREATE INDEX "index_bscf_core_quotation_items_on_quotation_id" ON "bscf_core_quotation_items" ("quotation_id") /*application='Dummy'*/
1712
-  (0.6ms) CREATE INDEX "index_bscf_core_quotation_items_on_rfq_item_id" ON "bscf_core_quotation_items" ("rfq_item_id") /*application='Dummy'*/
1713
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotations" CASCADE /*application='Dummy'*/
1714
-  (2.0ms) CREATE TABLE "bscf_core_quotations" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "business_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'*/
1715
-  (0.7ms) CREATE INDEX "index_bscf_core_quotations_on_business_id" ON "bscf_core_quotations" ("business_id") /*application='Dummy'*/
1716
-  (0.5ms) CREATE INDEX "index_bscf_core_quotations_on_request_for_quotation_id" ON "bscf_core_quotations" ("request_for_quotation_id") /*application='Dummy'*/
1717
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
1718
-  (1.9ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1719
-  (0.8ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
1720
-  (0.4ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
1721
-  (1.6ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1722
-  (0.8ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
1723
-  (1.2ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
1724
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
1725
-  (2.0ms) CREATE TABLE "bscf_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'*/
1726
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
1727
-  (2.3ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1728
-  (1.0ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
1729
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
1730
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
1731
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
1732
-  (1.5ms) CREATE TABLE "bscf_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'*/
1733
-  (0.8ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
1734
-  (0.7ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
1735
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
1736
-  (1.8ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1737
-  (0.9ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
1738
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
1739
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
1740
-  (2.0ms) CREATE TABLE "bscf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint NOT NULL, "to_account_id" bigint NOT NULL, "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'*/
1741
-  (0.9ms) CREATE INDEX "idx_on_from_account_id_reference_number_ecc8e65d8f" ON "bscf_core_virtual_account_transactions" ("from_account_id", "reference_number") /*application='Dummy'*/
1742
-  (0.8ms) CREATE INDEX "idx_on_from_account_id_643ea7341d" ON "bscf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
1743
-  (0.6ms) CREATE UNIQUE INDEX "idx_on_reference_number_9aa4ea6333" ON "bscf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
1744
-  (0.7ms) CREATE INDEX "idx_on_to_account_id_reference_number_6f4048491d" ON "bscf_core_virtual_account_transactions" ("to_account_id", "reference_number") /*application='Dummy'*/
1745
-  (1.0ms) CREATE INDEX "index_bscf_core_virtual_account_transactions_on_to_account_id" ON "bscf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
1746
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
1747
-  (2.4ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1748
-  (1.0ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
1749
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
1750
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
1751
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
1752
-  (0.7ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
1753
-  (1.9ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
1754
- FOREIGN KEY ("user_id")
1755
- REFERENCES "bscf_core_users" ("id")
1756
- /*application='Dummy'*/
1757
-  (1.7ms) ALTER TABLE "bscf_core_order_items" ADD CONSTRAINT "fk_rails_594dbae950"
1758
- FOREIGN KEY ("order_id")
1759
- REFERENCES "bscf_core_orders" ("id")
1760
- /*application='Dummy'*/
1761
-  (0.9ms) ALTER TABLE "bscf_core_order_items" ADD CONSTRAINT "fk_rails_17adb37720"
1762
- FOREIGN KEY ("product_id")
1763
- REFERENCES "bscf_core_products" ("id")
1764
- /*application='Dummy'*/
1765
-  (0.9ms) ALTER TABLE "bscf_core_order_items" ADD CONSTRAINT "fk_rails_dfc96f9a7f"
1766
- FOREIGN KEY ("quotation_item_id")
1767
- REFERENCES "bscf_core_quotation_items" ("id")
1768
- /*application='Dummy'*/
1769
-  (1.0ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_f175f710a9"
1770
- FOREIGN KEY ("quotation_id")
1771
- REFERENCES "bscf_core_quotations" ("id")
1772
- /*application='Dummy'*/
1773
-  (0.6ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_a2aea18f9c"
1774
- FOREIGN KEY ("ordered_by_id")
1775
- REFERENCES "bscf_core_users" ("id")
1776
- /*application='Dummy'*/
1777
-  (0.6ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_6134cde349"
1778
- FOREIGN KEY ("ordered_to_id")
1779
- REFERENCES "bscf_core_users" ("id")
1780
- /*application='Dummy'*/
1781
-  (0.7ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
1782
- FOREIGN KEY ("category_id")
1783
- REFERENCES "bscf_core_categories" ("id")
1784
- /*application='Dummy'*/
1785
-  (0.9ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_b58f3b1bfb"
1786
- FOREIGN KEY ("product_id")
1787
- REFERENCES "bscf_core_products" ("id")
1788
- /*application='Dummy'*/
1789
-  (0.7ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_0f1ff137cd"
1790
- FOREIGN KEY ("quotation_id")
1791
- REFERENCES "bscf_core_quotations" ("id")
1792
- /*application='Dummy'*/
1793
-  (1.0ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_54b38baf27"
1794
- FOREIGN KEY ("rfq_item_id")
1795
- REFERENCES "bscf_core_rfq_items" ("id")
1796
- /*application='Dummy'*/
1797
-  (0.7ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_5099683ac1"
1798
- FOREIGN KEY ("business_id")
1799
- REFERENCES "bscf_core_businesses" ("id")
1800
- /*application='Dummy'*/
1801
-  (1.3ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_118cd93fd7"
1802
- FOREIGN KEY ("request_for_quotation_id")
1803
- REFERENCES "bscf_core_request_for_quotations" ("id")
1804
- /*application='Dummy'*/
1805
-  (0.7ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
1806
- FOREIGN KEY ("user_id")
1807
- REFERENCES "bscf_core_users" ("id")
1808
- /*application='Dummy'*/
1809
-  (0.7ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
1810
- FOREIGN KEY ("product_id")
1811
- REFERENCES "bscf_core_products" ("id")
1812
- /*application='Dummy'*/
1813
-  (0.7ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
1814
- FOREIGN KEY ("request_for_quotation_id")
1815
- REFERENCES "bscf_core_request_for_quotations" ("id")
1816
- /*application='Dummy'*/
1817
-  (1.2ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
1818
- FOREIGN KEY ("address_id")
1819
- REFERENCES "bscf_core_addresses" ("id")
1820
- /*application='Dummy'*/
1821
-  (0.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
1822
- FOREIGN KEY ("user_id")
1823
- REFERENCES "bscf_core_users" ("id")
1824
- /*application='Dummy'*/
1825
-  (0.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
1826
- FOREIGN KEY ("verified_by_id")
1827
- REFERENCES "bscf_core_users" ("id")
1828
- /*application='Dummy'*/
1829
-  (1.2ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
1830
- FOREIGN KEY ("role_id")
1831
- REFERENCES "bscf_core_roles" ("id")
1832
- /*application='Dummy'*/
1833
-  (0.7ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
1834
- FOREIGN KEY ("user_id")
1835
- REFERENCES "bscf_core_users" ("id")
1836
- /*application='Dummy'*/
1837
-  (1.6ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_7dc2e329f8"
1838
- FOREIGN KEY ("from_account_id")
1839
- REFERENCES "bscf_core_virtual_accounts" ("id")
1840
- /*application='Dummy'*/
1841
-  (1.1ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_fc01221ed7"
1842
- FOREIGN KEY ("to_account_id")
1843
- REFERENCES "bscf_core_virtual_accounts" ("id")
1844
- /*application='Dummy'*/
1845
-  (0.7ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
1846
- FOREIGN KEY ("user_id")
1847
- REFERENCES "bscf_core_users" ("id")
1848
- /*application='Dummy'*/
1849
-  (2.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
1850
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1851
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES (20250327112412) /*application='Dummy'*/
1852
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES
1853
- (20250327102217),
1854
- (20250327044020),
1855
- (20250327041651),
1856
- (20250326121246),
1857
- (20250326120613),
1858
- (20250326115203),
1859
- (20250326112449),
1860
- (20250326105652),
1861
- (20250326103305),
1862
- (20250326085741),
1863
- (20250326084233),
1864
- (20250326081052),
1865
- (20250326080646),
1866
- (20250326075111),
1867
- (20250326065606); /*application='Dummy'*/
1868
-  (2.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'*/
1869
- ActiveRecord::InternalMetadata Load (1.0ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1870
- ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-27 11:33:30.752001', '2025-03-27 11:33:30.752008') RETURNING "key" /*application='Dummy'*/
1871
- 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'*/
1872
- ActiveRecord::InternalMetadata Update (1.1ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-27 11:33:30.756967' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
1873
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
1874
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '083c7a3bd0adf1f568a9f3f2caac4f356556e3b0', '2025-03-27 11:33:30.760672', '2025-03-27 11:33:30.760676') RETURNING "key" /*application='Dummy'*/
1875
-  (0.2ms) SELECT pg_try_advisory_lock(7136077842679658775) /*application='Dummy'*/
1876
- ActiveRecord::SchemaMigration Load (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1877
- 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'*/
1878
-  (0.2ms) SELECT pg_advisory_unlock(7136077842679658775) /*application='Dummy'*/
1879
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1880
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1881
- 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'*/
1882
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1883
- 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'*/
1884
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
1885
- 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'*/
1886
- SQL (0.1ms) SET search_path TO public /*application='Dummy'*/
1887
-  (81.4ms) DROP DATABASE IF EXISTS "bscf_test" /*application='Dummy'*/
1888
-  (132.0ms) CREATE DATABASE "bscf_test" ENCODING = 'unicode' /*application='Dummy'*/
1889
- SQL (16.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog /*application='Dummy'*/
1890
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_addresses" CASCADE /*application='Dummy'*/
1891
-  (4.4ms) CREATE TABLE "bscf_core_addresses" ("id" bigserial primary key, "city" character varying, "sub_city" character varying, "woreda" character varying, "latitude" character varying, "longitude" character varying, "house_number" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1892
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_businesses" CASCADE /*application='Dummy'*/
1893
-  (1.6ms) CREATE TABLE "bscf_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 DEFAULT 0 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'*/
1894
-  (0.7ms) CREATE INDEX "index_bscf_core_businesses_on_user_id" ON "bscf_core_businesses" ("user_id") /*application='Dummy'*/
1895
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_categories" CASCADE /*application='Dummy'*/
1896
-  (1.5ms) CREATE TABLE "bscf_core_categories" ("id" bigserial primary key, "name" character varying NOT NULL, "description" character varying NOT NULL, "parent_id" bigint, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1897
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_order_items" CASCADE /*application='Dummy'*/
1898
-  (1.1ms) CREATE TABLE "bscf_core_order_items" ("id" bigserial primary key, "order_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quotation_item_id" bigint, "quantity" float NOT NULL, "unit_price" float NOT NULL, "subtotal" float NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1899
-  (0.6ms) CREATE INDEX "index_bscf_core_order_items_on_order_id" ON "bscf_core_order_items" ("order_id") /*application='Dummy'*/
1900
-  (0.5ms) CREATE INDEX "index_bscf_core_order_items_on_product_id" ON "bscf_core_order_items" ("product_id") /*application='Dummy'*/
1901
-  (0.6ms) CREATE INDEX "index_bscf_core_order_items_on_quotation_item_id" ON "bscf_core_order_items" ("quotation_item_id") /*application='Dummy'*/
1902
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_orders" CASCADE /*application='Dummy'*/
1903
-  (1.1ms) CREATE TABLE "bscf_core_orders" ("id" bigserial primary key, "ordered_by_id" bigint, "ordered_to_id" bigint, "quotation_id" bigint, "order_type" integer DEFAULT 0 NOT NULL, "status" integer DEFAULT 0 NOT NULL, "total_amount" float, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1904
-  (0.6ms) CREATE INDEX "index_bscf_core_orders_on_ordered_by_id" ON "bscf_core_orders" ("ordered_by_id") /*application='Dummy'*/
1905
-  (0.6ms) CREATE INDEX "index_bscf_core_orders_on_ordered_to_id" ON "bscf_core_orders" ("ordered_to_id") /*application='Dummy'*/
1906
-  (0.5ms) CREATE INDEX "index_bscf_core_orders_on_quotation_id" ON "bscf_core_orders" ("quotation_id") /*application='Dummy'*/
1907
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_products" CASCADE /*application='Dummy'*/
1908
-  (1.4ms) CREATE TABLE "bscf_core_products" ("id" bigserial primary key, "sku" character varying NOT NULL, "name" character varying NOT NULL, "description" character varying NOT NULL, "category_id" bigint NOT NULL, "base_price" decimal DEFAULT 0.0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1909
-  (0.7ms) CREATE INDEX "index_bscf_core_products_on_category_id" ON "bscf_core_products" ("category_id") /*application='Dummy'*/
1910
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_products_on_sku" ON "bscf_core_products" ("sku") /*application='Dummy'*/
1911
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotation_items" CASCADE /*application='Dummy'*/
1912
-  (1.9ms) CREATE TABLE "bscf_core_quotation_items" ("id" bigserial primary key, "quotation_id" bigint NOT NULL, "rfq_item_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" integer NOT NULL, "unit_price" decimal NOT NULL, "unit" integer NOT NULL, "subtotal" decimal NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1913
-  (0.7ms) CREATE INDEX "index_bscf_core_quotation_items_on_product_id" ON "bscf_core_quotation_items" ("product_id") /*application='Dummy'*/
1914
-  (0.6ms) CREATE INDEX "index_bscf_core_quotation_items_on_quotation_id" ON "bscf_core_quotation_items" ("quotation_id") /*application='Dummy'*/
1915
-  (0.6ms) CREATE INDEX "index_bscf_core_quotation_items_on_rfq_item_id" ON "bscf_core_quotation_items" ("rfq_item_id") /*application='Dummy'*/
1916
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_quotations" CASCADE /*application='Dummy'*/
1917
-  (1.7ms) CREATE TABLE "bscf_core_quotations" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "business_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'*/
1918
-  (0.9ms) CREATE INDEX "index_bscf_core_quotations_on_business_id" ON "bscf_core_quotations" ("business_id") /*application='Dummy'*/
1919
-  (0.6ms) CREATE INDEX "index_bscf_core_quotations_on_request_for_quotation_id" ON "bscf_core_quotations" ("request_for_quotation_id") /*application='Dummy'*/
1920
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_request_for_quotations" CASCADE /*application='Dummy'*/
1921
-  (1.8ms) CREATE TABLE "bscf_core_request_for_quotations" ("id" bigserial primary key, "user_id" bigint NOT NULL, "status" integer DEFAULT 0 NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1922
-  (0.7ms) CREATE INDEX "index_bscf_core_request_for_quotations_on_user_id" ON "bscf_core_request_for_quotations" ("user_id") /*application='Dummy'*/
1923
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_rfq_items" CASCADE /*application='Dummy'*/
1924
-  (1.6ms) CREATE TABLE "bscf_core_rfq_items" ("id" bigserial primary key, "request_for_quotation_id" bigint NOT NULL, "product_id" bigint NOT NULL, "quantity" float NOT NULL, "notes" text, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1925
-  (1.1ms) CREATE INDEX "index_bscf_core_rfq_items_on_product_id" ON "bscf_core_rfq_items" ("product_id") /*application='Dummy'*/
1926
-  (0.6ms) CREATE INDEX "index_bscf_core_rfq_items_on_request_for_quotation_id" ON "bscf_core_rfq_items" ("request_for_quotation_id") /*application='Dummy'*/
1927
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_roles" CASCADE /*application='Dummy'*/
1928
-  (2.6ms) CREATE TABLE "bscf_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'*/
1929
-  (0.3ms) DROP TABLE IF EXISTS "bscf_core_user_profiles" CASCADE /*application='Dummy'*/
1930
-  (2.3ms) CREATE TABLE "bscf_core_user_profiles" ("id" bigserial primary key, "user_id" bigint NOT NULL, "date_of_birth" date NOT NULL, "nationality" character varying NOT NULL, "occupation" character varying NOT NULL, "source_of_funds" character varying NOT NULL, "kyc_status" integer DEFAULT 0, "gender" integer NOT NULL, "verified_at" timestamp(6), "verified_by_id" bigint, "address_id" bigint NOT NULL, "fayda_id" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1931
-  (0.7ms) CREATE INDEX "index_bscf_core_user_profiles_on_address_id" ON "bscf_core_user_profiles" ("address_id") /*application='Dummy'*/
1932
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_user_id" ON "bscf_core_user_profiles" ("user_id") /*application='Dummy'*/
1933
-  (0.6ms) CREATE INDEX "index_bscf_core_user_profiles_on_verified_by_id" ON "bscf_core_user_profiles" ("verified_by_id") /*application='Dummy'*/
1934
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_user_roles" CASCADE /*application='Dummy'*/
1935
-  (3.3ms) CREATE TABLE "bscf_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'*/
1936
-  (0.7ms) CREATE INDEX "index_bscf_core_user_roles_on_role_id" ON "bscf_core_user_roles" ("role_id") /*application='Dummy'*/
1937
-  (0.6ms) CREATE INDEX "index_bscf_core_user_roles_on_user_id" ON "bscf_core_user_roles" ("user_id") /*application='Dummy'*/
1938
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_users" CASCADE /*application='Dummy'*/
1939
-  (1.7ms) CREATE TABLE "bscf_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 NOT NULL, "phone_number" character varying NOT NULL, "password_digest" character varying NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1940
-  (0.9ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_email" ON "bscf_core_users" ("email") /*application='Dummy'*/
1941
-  (0.6ms) CREATE UNIQUE INDEX "index_bscf_core_users_on_phone_number" ON "bscf_core_users" ("phone_number") /*application='Dummy'*/
1942
-  (0.1ms) DROP TABLE IF EXISTS "bscf_core_virtual_account_transactions" CASCADE /*application='Dummy'*/
1943
-  (2.1ms) CREATE TABLE "bscf_core_virtual_account_transactions" ("id" bigserial primary key, "from_account_id" bigint NOT NULL, "to_account_id" bigint NOT NULL, "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'*/
1944
-  (0.8ms) CREATE INDEX "idx_on_from_account_id_reference_number_ecc8e65d8f" ON "bscf_core_virtual_account_transactions" ("from_account_id", "reference_number") /*application='Dummy'*/
1945
-  (0.6ms) CREATE INDEX "idx_on_from_account_id_643ea7341d" ON "bscf_core_virtual_account_transactions" ("from_account_id") /*application='Dummy'*/
1946
-  (0.6ms) CREATE UNIQUE INDEX "idx_on_reference_number_9aa4ea6333" ON "bscf_core_virtual_account_transactions" ("reference_number") /*application='Dummy'*/
1947
-  (1.0ms) CREATE INDEX "idx_on_to_account_id_reference_number_6f4048491d" ON "bscf_core_virtual_account_transactions" ("to_account_id", "reference_number") /*application='Dummy'*/
1948
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_account_transactions_on_to_account_id" ON "bscf_core_virtual_account_transactions" ("to_account_id") /*application='Dummy'*/
1949
-  (0.2ms) DROP TABLE IF EXISTS "bscf_core_virtual_accounts" CASCADE /*application='Dummy'*/
1950
-  (2.4ms) CREATE TABLE "bscf_core_virtual_accounts" ("id" bigserial primary key, "user_id" bigint NOT NULL, "account_number" character varying 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 NOT NULL, "product_scheme" character varying NOT NULL, "voucher_type" character varying NOT NULL, "status" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) /*application='Dummy'*/
1951
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_account_number" ON "bscf_core_virtual_accounts" ("account_number") /*application='Dummy'*/
1952
-  (0.9ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_branch_code" ON "bscf_core_virtual_accounts" ("branch_code") /*application='Dummy'*/
1953
-  (0.8ms) CREATE UNIQUE INDEX "index_bscf_core_virtual_accounts_on_cbs_account_number" ON "bscf_core_virtual_accounts" ("cbs_account_number") /*application='Dummy'*/
1954
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id_and_account_number" ON "bscf_core_virtual_accounts" ("user_id", "account_number") /*application='Dummy'*/
1955
-  (0.6ms) CREATE INDEX "index_bscf_core_virtual_accounts_on_user_id" ON "bscf_core_virtual_accounts" ("user_id") /*application='Dummy'*/
1956
-  (2.7ms) ALTER TABLE "bscf_core_businesses" ADD CONSTRAINT "fk_rails_8d7490b82a"
1957
- FOREIGN KEY ("user_id")
1958
- REFERENCES "bscf_core_users" ("id")
1959
- /*application='Dummy'*/
1960
-  (1.4ms) ALTER TABLE "bscf_core_order_items" ADD CONSTRAINT "fk_rails_594dbae950"
1961
- FOREIGN KEY ("order_id")
1962
- REFERENCES "bscf_core_orders" ("id")
1963
- /*application='Dummy'*/
1964
-  (0.8ms) ALTER TABLE "bscf_core_order_items" ADD CONSTRAINT "fk_rails_17adb37720"
1965
- FOREIGN KEY ("product_id")
1966
- REFERENCES "bscf_core_products" ("id")
1967
- /*application='Dummy'*/
1968
-  (0.9ms) ALTER TABLE "bscf_core_order_items" ADD CONSTRAINT "fk_rails_dfc96f9a7f"
1969
- FOREIGN KEY ("quotation_item_id")
1970
- REFERENCES "bscf_core_quotation_items" ("id")
1971
- /*application='Dummy'*/
1972
-  (1.3ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_f175f710a9"
1973
- FOREIGN KEY ("quotation_id")
1974
- REFERENCES "bscf_core_quotations" ("id")
1975
- /*application='Dummy'*/
1976
-  (0.6ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_a2aea18f9c"
1977
- FOREIGN KEY ("ordered_by_id")
1978
- REFERENCES "bscf_core_users" ("id")
1979
- /*application='Dummy'*/
1980
-  (0.6ms) ALTER TABLE "bscf_core_orders" ADD CONSTRAINT "fk_rails_6134cde349"
1981
- FOREIGN KEY ("ordered_to_id")
1982
- REFERENCES "bscf_core_users" ("id")
1983
- /*application='Dummy'*/
1984
-  (0.7ms) ALTER TABLE "bscf_core_products" ADD CONSTRAINT "fk_rails_9b9f33fd91"
1985
- FOREIGN KEY ("category_id")
1986
- REFERENCES "bscf_core_categories" ("id")
1987
- /*application='Dummy'*/
1988
-  (0.9ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_b58f3b1bfb"
1989
- FOREIGN KEY ("product_id")
1990
- REFERENCES "bscf_core_products" ("id")
1991
- /*application='Dummy'*/
1992
-  (0.6ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_0f1ff137cd"
1993
- FOREIGN KEY ("quotation_id")
1994
- REFERENCES "bscf_core_quotations" ("id")
1995
- /*application='Dummy'*/
1996
-  (0.8ms) ALTER TABLE "bscf_core_quotation_items" ADD CONSTRAINT "fk_rails_54b38baf27"
1997
- FOREIGN KEY ("rfq_item_id")
1998
- REFERENCES "bscf_core_rfq_items" ("id")
1999
- /*application='Dummy'*/
2000
-  (0.6ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_5099683ac1"
2001
- FOREIGN KEY ("business_id")
2002
- REFERENCES "bscf_core_businesses" ("id")
2003
- /*application='Dummy'*/
2004
-  (1.2ms) ALTER TABLE "bscf_core_quotations" ADD CONSTRAINT "fk_rails_118cd93fd7"
2005
- FOREIGN KEY ("request_for_quotation_id")
2006
- REFERENCES "bscf_core_request_for_quotations" ("id")
2007
- /*application='Dummy'*/
2008
-  (0.6ms) ALTER TABLE "bscf_core_request_for_quotations" ADD CONSTRAINT "fk_rails_8ed521a71d"
2009
- FOREIGN KEY ("user_id")
2010
- REFERENCES "bscf_core_users" ("id")
2011
- /*application='Dummy'*/
2012
-  (0.6ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b2464a246"
2013
- FOREIGN KEY ("product_id")
2014
- REFERENCES "bscf_core_products" ("id")
2015
- /*application='Dummy'*/
2016
-  (0.7ms) ALTER TABLE "bscf_core_rfq_items" ADD CONSTRAINT "fk_rails_1b773f00c6"
2017
- FOREIGN KEY ("request_for_quotation_id")
2018
- REFERENCES "bscf_core_request_for_quotations" ("id")
2019
- /*application='Dummy'*/
2020
-  (1.3ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_c5a3f5b460"
2021
- FOREIGN KEY ("address_id")
2022
- REFERENCES "bscf_core_addresses" ("id")
2023
- /*application='Dummy'*/
2024
-  (0.7ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_76d657f1fb"
2025
- FOREIGN KEY ("user_id")
2026
- REFERENCES "bscf_core_users" ("id")
2027
- /*application='Dummy'*/
2028
-  (0.8ms) ALTER TABLE "bscf_core_user_profiles" ADD CONSTRAINT "fk_rails_96d9a7609e"
2029
- FOREIGN KEY ("verified_by_id")
2030
- REFERENCES "bscf_core_users" ("id")
2031
- /*application='Dummy'*/
2032
-  (3.0ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_d64b2985c7"
2033
- FOREIGN KEY ("role_id")
2034
- REFERENCES "bscf_core_roles" ("id")
2035
- /*application='Dummy'*/
2036
-  (0.7ms) ALTER TABLE "bscf_core_user_roles" ADD CONSTRAINT "fk_rails_71c0ff189b"
2037
- FOREIGN KEY ("user_id")
2038
- REFERENCES "bscf_core_users" ("id")
2039
- /*application='Dummy'*/
2040
-  (1.4ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_7dc2e329f8"
2041
- FOREIGN KEY ("from_account_id")
2042
- REFERENCES "bscf_core_virtual_accounts" ("id")
2043
- /*application='Dummy'*/
2044
-  (1.0ms) ALTER TABLE "bscf_core_virtual_account_transactions" ADD CONSTRAINT "fk_rails_fc01221ed7"
2045
- FOREIGN KEY ("to_account_id")
2046
- REFERENCES "bscf_core_virtual_accounts" ("id")
2047
- /*application='Dummy'*/
2048
-  (0.7ms) ALTER TABLE "bscf_core_virtual_accounts" ADD CONSTRAINT "fk_rails_062e0240bd"
2049
- FOREIGN KEY ("user_id")
2050
- REFERENCES "bscf_core_users" ("id")
2051
- /*application='Dummy'*/
2052
-  (2.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) /*application='Dummy'*/
2053
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
2054
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES (20250327112412) /*application='Dummy'*/
2055
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES
2056
- (20250327102217),
2057
- (20250327044020),
2058
- (20250327041651),
2059
- (20250326121246),
2060
- (20250326120613),
2061
- (20250326115203),
2062
- (20250326112449),
2063
- (20250326105652),
2064
- (20250326103305),
2065
- (20250326085741),
2066
- (20250326084233),
2067
- (20250326081052),
2068
- (20250326080646),
2069
- (20250326075111),
2070
- (20250326065606); /*application='Dummy'*/
2071
-  (2.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'*/
2072
- ActiveRecord::InternalMetadata Load (1.0ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
2073
- ActiveRecord::InternalMetadata Create (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'development', '2025-03-27 11:41:12.792402', '2025-03-27 11:41:12.792407') RETURNING "key" /*application='Dummy'*/
2074
- 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'*/
2075
- ActiveRecord::InternalMetadata Update (0.7ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-27 11:41:12.797401' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
2076
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
2077
- ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '083c7a3bd0adf1f568a9f3f2caac4f356556e3b0', '2025-03-27 11:41:12.801257', '2025-03-27 11:41:12.801261') RETURNING "key" /*application='Dummy'*/