stateful_models 0.0.3 → 0.0.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -2
- data/README.md +75 -1
- data/lib/generators/has_states/install/install_generator.rb +6 -6
- data/lib/has_states/base.rb +31 -2
- data/lib/has_states/configuration/state_type_configuration.rb +3 -1
- data/lib/has_states/configuration.rb +75 -16
- data/lib/has_states/version.rb +1 -1
- data/lib/has_states.rb +1 -1
- data/spec/dummy/Gemfile.lock +123 -101
- data/spec/dummy/config/initializers/has_states.rb +3 -3
- data/spec/dummy/db/migrate/20241223212128_create_has_states_states.rb +2 -2
- data/spec/dummy/db/migrate/20250114175939_create_indexes_on_has_states_states.rb +3 -3
- data/spec/dummy/db/schema.rb +26 -26
- data/spec/dummy/log/development.log +7 -0
- data/spec/dummy/log/test.log +28108 -0
- data/spec/generators/has_states/install_generator_spec.rb +1 -1
- data/spec/has_states/configuration_spec.rb +57 -0
- data/spec/has_states/state_limit_spec.rb +107 -0
- data/spec/has_states/state_metadata_schema_spec.rb +75 -0
- data/spec/has_states/state_spec.rb +4 -3
- data/spec/has_states/stateable_spec.rb +9 -10
- metadata +23 -7
- /data/spec/generators/{tmp → templates}/config/initializers/has_states.rb +0 -0
- /data/spec/generators/{tmp/db/migrate/20250114180401_create_has_states_states.rb → templates/db/migrate/20250414184759_create_has_states_states.rb} +0 -0
- /data/spec/generators/{tmp/db/migrate/20250114180401_create_indexes_on_has_states_states.rb → templates/db/migrate/20250414184759_create_indexes_on_has_states_states.rb} +0 -0
data/spec/dummy/Gemfile.lock
CHANGED
@@ -1,34 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../..
|
3
3
|
specs:
|
4
|
-
stateful_models (0.0.
|
4
|
+
stateful_models (0.0.4)
|
5
|
+
json-schema
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
8
9
|
specs:
|
9
|
-
actioncable (8.0.
|
10
|
-
actionpack (= 8.0.
|
11
|
-
activesupport (= 8.0.
|
10
|
+
actioncable (8.0.2)
|
11
|
+
actionpack (= 8.0.2)
|
12
|
+
activesupport (= 8.0.2)
|
12
13
|
nio4r (~> 2.0)
|
13
14
|
websocket-driver (>= 0.6.1)
|
14
15
|
zeitwerk (~> 2.6)
|
15
|
-
actionmailbox (8.0.
|
16
|
-
actionpack (= 8.0.
|
17
|
-
activejob (= 8.0.
|
18
|
-
activerecord (= 8.0.
|
19
|
-
activestorage (= 8.0.
|
20
|
-
activesupport (= 8.0.
|
16
|
+
actionmailbox (8.0.2)
|
17
|
+
actionpack (= 8.0.2)
|
18
|
+
activejob (= 8.0.2)
|
19
|
+
activerecord (= 8.0.2)
|
20
|
+
activestorage (= 8.0.2)
|
21
|
+
activesupport (= 8.0.2)
|
21
22
|
mail (>= 2.8.0)
|
22
|
-
actionmailer (8.0.
|
23
|
-
actionpack (= 8.0.
|
24
|
-
actionview (= 8.0.
|
25
|
-
activejob (= 8.0.
|
26
|
-
activesupport (= 8.0.
|
23
|
+
actionmailer (8.0.2)
|
24
|
+
actionpack (= 8.0.2)
|
25
|
+
actionview (= 8.0.2)
|
26
|
+
activejob (= 8.0.2)
|
27
|
+
activesupport (= 8.0.2)
|
27
28
|
mail (>= 2.8.0)
|
28
29
|
rails-dom-testing (~> 2.2)
|
29
|
-
actionpack (8.0.
|
30
|
-
actionview (= 8.0.
|
31
|
-
activesupport (= 8.0.
|
30
|
+
actionpack (8.0.2)
|
31
|
+
actionview (= 8.0.2)
|
32
|
+
activesupport (= 8.0.2)
|
32
33
|
nokogiri (>= 1.8.5)
|
33
34
|
rack (>= 2.2.4)
|
34
35
|
rack-session (>= 1.0.1)
|
@@ -36,35 +37,35 @@ GEM
|
|
36
37
|
rails-dom-testing (~> 2.2)
|
37
38
|
rails-html-sanitizer (~> 1.6)
|
38
39
|
useragent (~> 0.16)
|
39
|
-
actiontext (8.0.
|
40
|
-
actionpack (= 8.0.
|
41
|
-
activerecord (= 8.0.
|
42
|
-
activestorage (= 8.0.
|
43
|
-
activesupport (= 8.0.
|
40
|
+
actiontext (8.0.2)
|
41
|
+
actionpack (= 8.0.2)
|
42
|
+
activerecord (= 8.0.2)
|
43
|
+
activestorage (= 8.0.2)
|
44
|
+
activesupport (= 8.0.2)
|
44
45
|
globalid (>= 0.6.0)
|
45
46
|
nokogiri (>= 1.8.5)
|
46
|
-
actionview (8.0.
|
47
|
-
activesupport (= 8.0.
|
47
|
+
actionview (8.0.2)
|
48
|
+
activesupport (= 8.0.2)
|
48
49
|
builder (~> 3.1)
|
49
50
|
erubi (~> 1.11)
|
50
51
|
rails-dom-testing (~> 2.2)
|
51
52
|
rails-html-sanitizer (~> 1.6)
|
52
|
-
activejob (8.0.
|
53
|
-
activesupport (= 8.0.
|
53
|
+
activejob (8.0.2)
|
54
|
+
activesupport (= 8.0.2)
|
54
55
|
globalid (>= 0.3.6)
|
55
|
-
activemodel (8.0.
|
56
|
-
activesupport (= 8.0.
|
57
|
-
activerecord (8.0.
|
58
|
-
activemodel (= 8.0.
|
59
|
-
activesupport (= 8.0.
|
56
|
+
activemodel (8.0.2)
|
57
|
+
activesupport (= 8.0.2)
|
58
|
+
activerecord (8.0.2)
|
59
|
+
activemodel (= 8.0.2)
|
60
|
+
activesupport (= 8.0.2)
|
60
61
|
timeout (>= 0.4.0)
|
61
|
-
activestorage (8.0.
|
62
|
-
actionpack (= 8.0.
|
63
|
-
activejob (= 8.0.
|
64
|
-
activerecord (= 8.0.
|
65
|
-
activesupport (= 8.0.
|
62
|
+
activestorage (8.0.2)
|
63
|
+
actionpack (= 8.0.2)
|
64
|
+
activejob (= 8.0.2)
|
65
|
+
activerecord (= 8.0.2)
|
66
|
+
activesupport (= 8.0.2)
|
66
67
|
marcel (~> 1.0)
|
67
|
-
activesupport (8.0.
|
68
|
+
activesupport (8.0.2)
|
68
69
|
base64
|
69
70
|
benchmark (>= 0.3)
|
70
71
|
bigdecimal
|
@@ -77,17 +78,19 @@ GEM
|
|
77
78
|
securerandom (>= 0.3)
|
78
79
|
tzinfo (~> 2.0, >= 2.0.5)
|
79
80
|
uri (>= 0.13.1)
|
81
|
+
addressable (2.8.7)
|
82
|
+
public_suffix (>= 2.0.2, < 7.0)
|
80
83
|
base64 (0.2.0)
|
81
84
|
bcrypt_pbkdf (1.1.1)
|
82
85
|
bcrypt_pbkdf (1.1.1-arm64-darwin)
|
83
86
|
bcrypt_pbkdf (1.1.1-x86_64-darwin)
|
84
87
|
benchmark (0.4.0)
|
85
|
-
bigdecimal (3.1.
|
86
|
-
brakeman (
|
88
|
+
bigdecimal (3.1.9)
|
89
|
+
brakeman (7.0.0)
|
87
90
|
racc
|
88
91
|
builder (3.3.0)
|
89
|
-
concurrent-ruby (1.3.
|
90
|
-
connection_pool (2.
|
92
|
+
concurrent-ruby (1.3.5)
|
93
|
+
connection_pool (2.5.0)
|
91
94
|
crass (1.0.6)
|
92
95
|
date (3.4.1)
|
93
96
|
debug (1.10.0)
|
@@ -104,13 +107,17 @@ GEM
|
|
104
107
|
raabro (~> 1.4)
|
105
108
|
globalid (1.2.1)
|
106
109
|
activesupport (>= 6.1)
|
107
|
-
i18n (1.14.
|
110
|
+
i18n (1.14.7)
|
108
111
|
concurrent-ruby (~> 1.0)
|
109
112
|
io-console (0.8.0)
|
110
|
-
irb (1.
|
113
|
+
irb (1.15.1)
|
114
|
+
pp (>= 0.6.0)
|
111
115
|
rdoc (>= 4.0.0)
|
112
116
|
reline (>= 0.4.2)
|
113
|
-
|
117
|
+
json-schema (5.1.1)
|
118
|
+
addressable (~> 2.8)
|
119
|
+
bigdecimal (~> 3.1)
|
120
|
+
kamal (2.5.3)
|
114
121
|
activesupport (>= 7.0)
|
115
122
|
base64 (~> 0.2)
|
116
123
|
bcrypt_pbkdf (~> 1.0)
|
@@ -121,8 +128,8 @@ GEM
|
|
121
128
|
sshkit (>= 1.23.0, < 2.0)
|
122
129
|
thor (~> 1.3)
|
123
130
|
zeitwerk (>= 2.6.18, < 3.0)
|
124
|
-
logger (1.6.
|
125
|
-
loofah (2.
|
131
|
+
logger (1.6.6)
|
132
|
+
loofah (2.24.0)
|
126
133
|
crass (~> 1.0.2)
|
127
134
|
nokogiri (>= 1.12.0)
|
128
135
|
mail (2.8.1)
|
@@ -132,63 +139,76 @@ GEM
|
|
132
139
|
net-smtp
|
133
140
|
marcel (1.0.4)
|
134
141
|
mini_mime (1.1.5)
|
135
|
-
|
136
|
-
|
142
|
+
mini_portile2 (2.8.8)
|
143
|
+
minitest (5.25.5)
|
144
|
+
net-imap (0.5.6)
|
137
145
|
date
|
138
146
|
net-protocol
|
139
147
|
net-pop (0.1.2)
|
140
148
|
net-protocol
|
141
149
|
net-protocol (0.2.2)
|
142
150
|
timeout
|
143
|
-
net-scp (4.
|
151
|
+
net-scp (4.1.0)
|
144
152
|
net-ssh (>= 2.6.5, < 8.0.0)
|
145
153
|
net-sftp (4.0.0)
|
146
154
|
net-ssh (>= 5.0.0, < 8.0.0)
|
147
|
-
net-smtp (0.5.
|
155
|
+
net-smtp (0.5.1)
|
148
156
|
net-protocol
|
149
157
|
net-ssh (7.3.0)
|
150
158
|
nio4r (2.7.4)
|
151
|
-
nokogiri (1.
|
159
|
+
nokogiri (1.18.5)
|
160
|
+
mini_portile2 (~> 2.8.2)
|
152
161
|
racc (~> 1.4)
|
153
|
-
nokogiri (1.
|
162
|
+
nokogiri (1.18.5-aarch64-linux-gnu)
|
154
163
|
racc (~> 1.4)
|
155
|
-
nokogiri (1.
|
164
|
+
nokogiri (1.18.5-aarch64-linux-musl)
|
156
165
|
racc (~> 1.4)
|
157
|
-
nokogiri (1.
|
166
|
+
nokogiri (1.18.5-arm-linux-gnu)
|
158
167
|
racc (~> 1.4)
|
159
|
-
nokogiri (1.
|
168
|
+
nokogiri (1.18.5-arm-linux-musl)
|
160
169
|
racc (~> 1.4)
|
161
|
-
nokogiri (1.
|
170
|
+
nokogiri (1.18.5-arm64-darwin)
|
171
|
+
racc (~> 1.4)
|
172
|
+
nokogiri (1.18.5-x86_64-darwin)
|
173
|
+
racc (~> 1.4)
|
174
|
+
nokogiri (1.18.5-x86_64-linux-gnu)
|
175
|
+
racc (~> 1.4)
|
176
|
+
nokogiri (1.18.5-x86_64-linux-musl)
|
162
177
|
racc (~> 1.4)
|
163
178
|
ostruct (0.6.1)
|
164
|
-
|
179
|
+
pp (0.6.2)
|
180
|
+
prettyprint
|
181
|
+
prettyprint (0.2.0)
|
182
|
+
psych (5.2.3)
|
165
183
|
date
|
166
184
|
stringio
|
167
|
-
|
185
|
+
public_suffix (6.0.1)
|
186
|
+
puma (6.6.0)
|
168
187
|
nio4r (~> 2.0)
|
169
188
|
raabro (1.4.0)
|
170
189
|
racc (1.8.1)
|
171
|
-
rack (3.1.
|
172
|
-
rack-session (2.
|
190
|
+
rack (3.1.12)
|
191
|
+
rack-session (2.1.0)
|
192
|
+
base64 (>= 0.1.0)
|
173
193
|
rack (>= 3.0.0)
|
174
|
-
rack-test (2.
|
194
|
+
rack-test (2.2.0)
|
175
195
|
rack (>= 1.3)
|
176
196
|
rackup (2.2.1)
|
177
197
|
rack (>= 3)
|
178
|
-
rails (8.0.
|
179
|
-
actioncable (= 8.0.
|
180
|
-
actionmailbox (= 8.0.
|
181
|
-
actionmailer (= 8.0.
|
182
|
-
actionpack (= 8.0.
|
183
|
-
actiontext (= 8.0.
|
184
|
-
actionview (= 8.0.
|
185
|
-
activejob (= 8.0.
|
186
|
-
activemodel (= 8.0.
|
187
|
-
activerecord (= 8.0.
|
188
|
-
activestorage (= 8.0.
|
189
|
-
activesupport (= 8.0.
|
198
|
+
rails (8.0.2)
|
199
|
+
actioncable (= 8.0.2)
|
200
|
+
actionmailbox (= 8.0.2)
|
201
|
+
actionmailer (= 8.0.2)
|
202
|
+
actionpack (= 8.0.2)
|
203
|
+
actiontext (= 8.0.2)
|
204
|
+
actionview (= 8.0.2)
|
205
|
+
activejob (= 8.0.2)
|
206
|
+
activemodel (= 8.0.2)
|
207
|
+
activerecord (= 8.0.2)
|
208
|
+
activestorage (= 8.0.2)
|
209
|
+
activesupport (= 8.0.2)
|
190
210
|
bundler (>= 1.15.0)
|
191
|
-
railties (= 8.0.
|
211
|
+
railties (= 8.0.2)
|
192
212
|
rails-dom-testing (2.2.0)
|
193
213
|
activesupport (>= 5.0.0)
|
194
214
|
minitest
|
@@ -196,63 +216,65 @@ GEM
|
|
196
216
|
rails-html-sanitizer (1.6.2)
|
197
217
|
loofah (~> 2.21)
|
198
218
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
199
|
-
railties (8.0.
|
200
|
-
actionpack (= 8.0.
|
201
|
-
activesupport (= 8.0.
|
219
|
+
railties (8.0.2)
|
220
|
+
actionpack (= 8.0.2)
|
221
|
+
activesupport (= 8.0.2)
|
202
222
|
irb (~> 1.13)
|
203
223
|
rackup (>= 1.0.0)
|
204
224
|
rake (>= 12.2)
|
205
225
|
thor (~> 1.0, >= 1.2.2)
|
206
226
|
zeitwerk (~> 2.6)
|
207
227
|
rake (13.2.1)
|
208
|
-
rdoc (6.
|
228
|
+
rdoc (6.12.0)
|
209
229
|
psych (>= 4.0.0)
|
210
230
|
reline (0.6.0)
|
211
231
|
io-console (~> 0.5)
|
212
232
|
securerandom (0.4.1)
|
213
|
-
solid_cache (1.0.
|
233
|
+
solid_cache (1.0.7)
|
214
234
|
activejob (>= 7.2)
|
215
235
|
activerecord (>= 7.2)
|
216
236
|
railties (>= 7.2)
|
217
|
-
solid_queue (1.1.
|
237
|
+
solid_queue (1.1.4)
|
218
238
|
activejob (>= 7.1)
|
219
239
|
activerecord (>= 7.1)
|
220
240
|
concurrent-ruby (>= 1.3.1)
|
221
241
|
fugit (~> 1.11.0)
|
222
242
|
railties (>= 7.1)
|
223
243
|
thor (~> 1.3.1)
|
224
|
-
sqlite3 (2.
|
225
|
-
sqlite3 (2.
|
226
|
-
sqlite3 (2.
|
227
|
-
sqlite3 (2.
|
228
|
-
sqlite3 (2.
|
229
|
-
sqlite3 (2.
|
230
|
-
sqlite3 (2.
|
231
|
-
sqlite3 (2.
|
232
|
-
sqlite3 (2.
|
233
|
-
sqlite3 (2.
|
234
|
-
sshkit (1.
|
244
|
+
sqlite3 (2.6.0-aarch64-linux-gnu)
|
245
|
+
sqlite3 (2.6.0-aarch64-linux-musl)
|
246
|
+
sqlite3 (2.6.0-arm-linux-gnu)
|
247
|
+
sqlite3 (2.6.0-arm-linux-musl)
|
248
|
+
sqlite3 (2.6.0-arm64-darwin)
|
249
|
+
sqlite3 (2.6.0-x86-linux-gnu)
|
250
|
+
sqlite3 (2.6.0-x86-linux-musl)
|
251
|
+
sqlite3 (2.6.0-x86_64-darwin)
|
252
|
+
sqlite3 (2.6.0-x86_64-linux-gnu)
|
253
|
+
sqlite3 (2.6.0-x86_64-linux-musl)
|
254
|
+
sshkit (1.24.0)
|
235
255
|
base64
|
256
|
+
logger
|
236
257
|
net-scp (>= 1.1.2)
|
237
258
|
net-sftp (>= 2.1.2)
|
238
259
|
net-ssh (>= 2.8.0)
|
239
260
|
ostruct
|
240
|
-
stringio (3.1.
|
261
|
+
stringio (3.1.5)
|
241
262
|
thor (1.3.2)
|
242
|
-
thruster (0.1.
|
243
|
-
thruster (0.1.
|
244
|
-
thruster (0.1.
|
245
|
-
thruster (0.1.
|
246
|
-
thruster (0.1.
|
263
|
+
thruster (0.1.12)
|
264
|
+
thruster (0.1.12-aarch64-linux)
|
265
|
+
thruster (0.1.12-arm64-darwin)
|
266
|
+
thruster (0.1.12-x86_64-darwin)
|
267
|
+
thruster (0.1.12-x86_64-linux)
|
247
268
|
timeout (0.4.3)
|
248
269
|
tzinfo (2.0.6)
|
249
270
|
concurrent-ruby (~> 1.0)
|
250
|
-
uri (1.0.
|
271
|
+
uri (1.0.3)
|
251
272
|
useragent (0.16.11)
|
252
|
-
websocket-driver (0.7.
|
273
|
+
websocket-driver (0.7.7)
|
274
|
+
base64
|
253
275
|
websocket-extensions (>= 0.1.0)
|
254
276
|
websocket-extensions (0.1.5)
|
255
|
-
zeitwerk (2.7.
|
277
|
+
zeitwerk (2.7.2)
|
256
278
|
|
257
279
|
PLATFORMS
|
258
280
|
aarch64-linux
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Configure after the application is initialized
|
4
4
|
Rails.application.config.after_initialize do
|
@@ -18,7 +18,7 @@ Rails.application.config.after_initialize do
|
|
18
18
|
'rejected' # KYC process failed
|
19
19
|
]
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
# Onboarding state type with different statuses
|
23
23
|
model.state_type :onboarding do |type|
|
24
24
|
type.statuses = [
|
@@ -42,4 +42,4 @@ Rails.application.config.after_initialize do
|
|
42
42
|
# end
|
43
43
|
# end
|
44
44
|
end
|
45
|
-
end
|
45
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
class CreateHasStatesStates < ActiveRecord::Migration[8.0]
|
2
2
|
def change
|
3
3
|
create_table :has_states_states do |t|
|
4
4
|
t.string :type, null: false
|
@@ -15,4 +15,4 @@
|
|
15
15
|
t.index %i[stateable_type stateable_id]
|
16
16
|
end
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|
@@ -3,8 +3,8 @@ class CreateIndexesOnHasStatesStates < ActiveRecord::Migration[8.0]
|
|
3
3
|
change_table :has_states_states do |t|
|
4
4
|
t.index %i[stateable_id state_type]
|
5
5
|
t.index %i[stateable_id state_type status]
|
6
|
-
t.index %i[stateable_id state_type created_at]
|
7
|
-
t.index %i[stateable_id state_type status created_at]
|
6
|
+
t.index %i[stateable_id state_type created_at]
|
7
|
+
t.index %i[stateable_id state_type status created_at]
|
8
8
|
end
|
9
9
|
end
|
10
|
-
end
|
10
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,35 +10,35 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema[8.0].define(version:
|
14
|
-
create_table
|
15
|
-
t.string
|
16
|
-
t.datetime
|
17
|
-
t.datetime
|
13
|
+
ActiveRecord::Schema[8.0].define(version: 20_250_114_175_939) do
|
14
|
+
create_table 'companies', force: :cascade do |t|
|
15
|
+
t.string 'name'
|
16
|
+
t.datetime 'created_at', null: false
|
17
|
+
t.datetime 'updated_at', null: false
|
18
18
|
end
|
19
19
|
|
20
|
-
create_table
|
21
|
-
t.string
|
22
|
-
t.string
|
23
|
-
t.string
|
24
|
-
t.json
|
25
|
-
t.string
|
26
|
-
t.integer
|
27
|
-
t.datetime
|
28
|
-
t.datetime
|
29
|
-
t.datetime
|
30
|
-
t.index [
|
31
|
-
t.index [
|
32
|
-
t.index [
|
33
|
-
t.index [
|
34
|
-
t.index [
|
35
|
-
t.index [
|
36
|
-
t.index [
|
20
|
+
create_table 'has_states_states', force: :cascade do |t|
|
21
|
+
t.string 'type', null: false
|
22
|
+
t.string 'state_type'
|
23
|
+
t.string 'status', null: false
|
24
|
+
t.json 'metadata', default: {}, null: false
|
25
|
+
t.string 'stateable_type', null: false
|
26
|
+
t.integer 'stateable_id', null: false
|
27
|
+
t.datetime 'completed_at'
|
28
|
+
t.datetime 'created_at', null: false
|
29
|
+
t.datetime 'updated_at', null: false
|
30
|
+
t.index %w[stateable_id state_type created_at], name: 'idx_on_stateable_id_state_type_created_at_b5d09fb6ee'
|
31
|
+
t.index %w[stateable_id state_type status created_at], name: 'idx_on_stateable_id_state_type_status_created_at_19e1cf37c2'
|
32
|
+
t.index %w[stateable_id state_type status], name: 'idx_on_stateable_id_state_type_status_6d3d026e4d'
|
33
|
+
t.index %w[stateable_id state_type], name: 'index_has_states_states_on_stateable_id_and_state_type'
|
34
|
+
t.index %w[stateable_type stateable_id], name: 'index_has_states_states_on_stateable'
|
35
|
+
t.index %w[stateable_type stateable_id], name: 'index_has_states_states_on_stateable_type_and_stateable_id'
|
36
|
+
t.index %w[type stateable_id], name: 'index_has_states_states_on_type_and_stateable_id'
|
37
37
|
end
|
38
38
|
|
39
|
-
create_table
|
40
|
-
t.string
|
41
|
-
t.datetime
|
42
|
-
t.datetime
|
39
|
+
create_table 'users', force: :cascade do |t|
|
40
|
+
t.string 'name'
|
41
|
+
t.datetime 'created_at', null: false
|
42
|
+
t.datetime 'updated_at', null: false
|
43
43
|
end
|
44
44
|
end
|
@@ -343,3 +343,10 @@ Migrating to CreateIndexesOnHasStatesStates (20250114175939)
|
|
343
343
|
[1m[36mActiveRecord::SchemaMigration Create (0.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ('20250114175939') RETURNING "version" /*application='Dummy'*/[0m
|
344
344
|
[1m[36mTRANSACTION (14.2ms)[0m [1m[35mCOMMIT TRANSACTION /*application='Dummy'*/[0m
|
345
345
|
[1m[36mActiveRecord::SchemaMigration Load (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/[0m
|
346
|
+
[1m[36mHasStates::State Load (0.3ms)[0m [1m[34mSELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."type" = 'HasStates::State' ORDER BY "has_states_states"."id" DESC LIMIT 1 /*application='Dummy'*/[0m
|
347
|
+
[1m[36mHasStates::State Load (0.4ms)[0m [1m[34mSELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."type" = 'HasStates::State' ORDER BY "has_states_states"."id" DESC LIMIT 1 /*application='Dummy'*/[0m
|
348
|
+
[1m[36mUser Load (0.4ms)[0m [1m[34mSELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 /*application='Dummy'*/[0m
|
349
|
+
[1m[36mHasStates::Base Load (0.3ms)[0m [1m[34mSELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/[0m
|
350
|
+
[1m[36mHasStates::Base Load (0.6ms)[0m [1m[34mSELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' /* loading for pp */ ORDER BY "has_states_states"."created_at" DESC LIMIT 11 /*application='Dummy'*/[0m
|
351
|
+
[1m[36mHasStates::Base Load (0.4ms)[0m [1m[34mSELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'kyc' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/[0m
|
352
|
+
[1m[36mHasStates::Base Load (0.3ms)[0m [1m[34mSELECT "has_states_states".* FROM "has_states_states" WHERE "has_states_states"."stateable_id" = 1 AND "has_states_states"."stateable_type" = 'User' AND "has_states_states"."state_type" = 'onboarding' ORDER BY "has_states_states"."created_at" DESC LIMIT 1 /*application='Dummy'*/[0m
|