sortability 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/Rakefile +11 -7
- data/lib/sortability/active_record/base.rb +13 -13
- data/lib/sortability/active_record/connection_adapters/table_definition.rb +2 -2
- data/lib/sortability/active_record/migration.rb +4 -4
- data/lib/sortability/version.rb +1 -1
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/config/application.rb +2 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +7050 -4006
- data/spec/lib/sortability/active_record/base_spec.rb +12 -18
- data/spec/lib/sortability/active_record/connection_adapters/table_definition_spec.rb +3 -3
- data/spec/lib/sortability/active_record/migration_spec.rb +4 -4
- data/spec/rails_helper.rb +0 -1
- metadata +52 -48
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -140
@@ -7,7 +7,7 @@ module Sortability
|
|
7
7
|
let(:container_1) { Container.new }
|
8
8
|
let(:container_2) { Container.new }
|
9
9
|
|
10
|
-
it 'can return the sort peers for a record' do
|
10
|
+
it 'can return the sort peers for a record (after saved)' do
|
11
11
|
expect(container_1.sort_position_peers).to be_empty
|
12
12
|
expect(container_2.sort_position_peers).to be_empty
|
13
13
|
|
@@ -86,30 +86,24 @@ module Sortability
|
|
86
86
|
context 'scoped' do
|
87
87
|
let(:container_1) { Container.create }
|
88
88
|
let(:container_2) { Container.create }
|
89
|
-
let(:item_1)
|
90
|
-
let(:item_2)
|
91
|
-
let(:item_3)
|
89
|
+
let!(:item_1) { Item.new(container: container_1) }
|
90
|
+
let!(:item_2) { Item.new(container: container_1) }
|
91
|
+
let!(:item_3) { Item.new(container: container_2) }
|
92
92
|
|
93
|
-
it 'can return the sort peers for a record' do
|
94
|
-
expect(item_1.sort_position_peers).to
|
95
|
-
expect(item_2.sort_position_peers).to
|
96
|
-
expect(item_3.sort_position_peers).to
|
93
|
+
it 'can return the sort peers for a record (after initialized)' do
|
94
|
+
expect(item_1.sort_position_peers).to eq [ item_1, item_2 ]
|
95
|
+
expect(item_2.sort_position_peers).to eq [ item_1, item_2 ]
|
96
|
+
expect(item_3.sort_position_peers).to eq [ item_3 ]
|
97
97
|
|
98
98
|
item_1.save!
|
99
|
-
expect(item_1.sort_position_peers).to eq [ item_1 ]
|
100
|
-
expect(item_2.sort_position_peers).to eq [ item_1 ]
|
101
|
-
expect(item_3.sort_position_peers).to
|
102
|
-
|
103
|
-
container_1.reload
|
104
|
-
container_2.reload
|
99
|
+
expect(item_1.sort_position_peers).to eq [ item_1, item_2 ]
|
100
|
+
expect(item_2.sort_position_peers).to eq [ item_1, item_2 ]
|
101
|
+
expect(item_3.sort_position_peers).to eq [ item_3 ]
|
105
102
|
|
106
103
|
item_2.save!
|
107
104
|
expect(item_1.sort_position_peers).to eq [ item_1, item_2 ]
|
108
105
|
expect(item_2.sort_position_peers).to eq [ item_1, item_2 ]
|
109
|
-
expect(item_3.sort_position_peers).to
|
110
|
-
|
111
|
-
container_1.reload
|
112
|
-
container_2.reload
|
106
|
+
expect(item_3.sort_position_peers).to eq [ item_3 ]
|
113
107
|
|
114
108
|
item_3.save!
|
115
109
|
expect(item_1.sort_position_peers).to eq [ item_1, item_2 ]
|
@@ -4,7 +4,7 @@ module Sortability
|
|
4
4
|
module ActiveRecord
|
5
5
|
module ConnectionAdapters
|
6
6
|
RSpec.describe TableDefinition do
|
7
|
-
let(:table_definition) { ::ActiveRecord::ConnectionAdapters::TableDefinition.new :test }
|
7
|
+
let(:table_definition) { ::ActiveRecord::ConnectionAdapters::TableDefinition.new nil, :test }
|
8
8
|
|
9
9
|
context 'without :on and :null' do
|
10
10
|
let(:options) { { something: :else } }
|
@@ -13,7 +13,7 @@ module Sortability
|
|
13
13
|
expect(table_definition).to(
|
14
14
|
receive(:integer).with(:sort_position, options.merge(null: false))
|
15
15
|
)
|
16
|
-
table_definition.sortable
|
16
|
+
table_definition.sortable(**options)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -22,7 +22,7 @@ module Sortability
|
|
22
22
|
|
23
23
|
it '#sortable calls the #integer method with the given options' do
|
24
24
|
expect(table_definition).to receive(:integer).with(:pos, options.except(:on))
|
25
|
-
table_definition.sortable
|
25
|
+
table_definition.sortable(**options)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -14,7 +14,7 @@ module Sortability
|
|
14
14
|
:add_column, table, :sort_position, :integer, options.merge(null: false)
|
15
15
|
)
|
16
16
|
|
17
|
-
migration.add_sortable_column table, options
|
17
|
+
migration.add_sortable_column table, **options
|
18
18
|
end
|
19
19
|
|
20
20
|
it '#add_sortable_index can add a sortable index, adding defaults' do
|
@@ -22,7 +22,7 @@ module Sortability
|
|
22
22
|
:add_index, table, [ :sort_position ], options.merge(unique: true)
|
23
23
|
)
|
24
24
|
|
25
|
-
migration.add_sortable_index table, options
|
25
|
+
migration.add_sortable_index table, **options
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -36,7 +36,7 @@ module Sortability
|
|
36
36
|
:add_column, table, :pos, :integer, options.except(:on)
|
37
37
|
)
|
38
38
|
|
39
|
-
migration.add_sortable_column table, options
|
39
|
+
migration.add_sortable_column table, **options
|
40
40
|
end
|
41
41
|
|
42
42
|
it '#add_sortable_index can add a sortable index with the given options' do
|
@@ -44,7 +44,7 @@ module Sortability
|
|
44
44
|
:add_index, table, [ :container_id, :pos ], options.except(:on, :scope)
|
45
45
|
)
|
46
46
|
|
47
|
-
migration.add_sortable_index table, options
|
47
|
+
migration.add_sortable_index table, **options
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/spec/rails_helper.rb
CHANGED
@@ -3,7 +3,6 @@ ENV["RAILS_ENV"] ||= 'test'
|
|
3
3
|
require 'spec_helper'
|
4
4
|
require File.expand_path("../dummy/config/environment", __FILE__)
|
5
5
|
require 'rspec/rails'
|
6
|
-
require 'rspec/autorun'
|
7
6
|
# Add additional requires below this line. Rails is not loaded until this point!
|
8
7
|
|
9
8
|
# Requires supporting ruby files with custom matchers and macros, etc, in
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sortability
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dante Soares
|
8
8
|
- JP Slavinsky
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -17,42 +17,48 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '5'
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '7'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
28
|
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
30
|
+
version: '5'
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '7'
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: sqlite3
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
|
-
- - "
|
38
|
+
- - "<"
|
33
39
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
40
|
+
version: '2.0'
|
35
41
|
type: :development
|
36
42
|
prerelease: false
|
37
43
|
version_requirements: !ruby/object:Gem::Requirement
|
38
44
|
requirements:
|
39
|
-
- - "
|
45
|
+
- - "<"
|
40
46
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
47
|
+
version: '2.0'
|
42
48
|
- !ruby/object:Gem::Dependency
|
43
49
|
name: rspec-rails
|
44
50
|
requirement: !ruby/object:Gem::Requirement
|
45
51
|
requirements:
|
46
52
|
- - ">="
|
47
53
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
54
|
+
version: '0'
|
49
55
|
type: :development
|
50
56
|
prerelease: false
|
51
57
|
version_requirements: !ruby/object:Gem::Requirement
|
52
58
|
requirements:
|
53
59
|
- - ">="
|
54
60
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
61
|
+
version: '0'
|
56
62
|
description: Provides ActiveRecord methods that make it easy to allow users to sort
|
57
63
|
and reorder records in a list
|
58
64
|
email:
|
@@ -71,6 +77,7 @@ files:
|
|
71
77
|
- lib/sortability/version.rb
|
72
78
|
- spec/dummy/README.md
|
73
79
|
- spec/dummy/Rakefile
|
80
|
+
- spec/dummy/app/assets/config/manifest.js
|
74
81
|
- spec/dummy/app/assets/javascripts/application.js
|
75
82
|
- spec/dummy/app/assets/stylesheets/application.css
|
76
83
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -101,12 +108,10 @@ files:
|
|
101
108
|
- spec/dummy/config/locales/en.yml
|
102
109
|
- spec/dummy/config/routes.rb
|
103
110
|
- spec/dummy/config/secrets.yml
|
104
|
-
- spec/dummy/db/development.sqlite3
|
105
111
|
- spec/dummy/db/migrate/20190523235417_create_containers.rb
|
106
112
|
- spec/dummy/db/migrate/20190523235430_create_items.rb
|
107
113
|
- spec/dummy/db/schema.rb
|
108
114
|
- spec/dummy/db/test.sqlite3
|
109
|
-
- spec/dummy/log/development.log
|
110
115
|
- spec/dummy/log/test.log
|
111
116
|
- spec/dummy/public/404.html
|
112
117
|
- spec/dummy/public/422.html
|
@@ -121,7 +126,7 @@ homepage: https://github.com/openstax/sortability
|
|
121
126
|
licenses:
|
122
127
|
- MIT
|
123
128
|
metadata: {}
|
124
|
-
post_install_message:
|
129
|
+
post_install_message:
|
125
130
|
rdoc_options: []
|
126
131
|
require_paths:
|
127
132
|
- lib
|
@@ -136,56 +141,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
141
|
- !ruby/object:Gem::Version
|
137
142
|
version: '0'
|
138
143
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
140
|
-
signing_key:
|
144
|
+
rubygems_version: 3.5.21
|
145
|
+
signing_key:
|
141
146
|
specification_version: 4
|
142
147
|
summary: Rails gem that provides easy to use ordered records
|
143
148
|
test_files:
|
144
|
-
- spec/
|
145
|
-
- spec/
|
146
|
-
- spec/dummy/app/
|
147
|
-
- spec/dummy/app/models/item.rb
|
148
|
-
- spec/dummy/app/models/container.rb
|
149
|
+
- spec/dummy/README.md
|
150
|
+
- spec/dummy/Rakefile
|
151
|
+
- spec/dummy/app/assets/config/manifest.js
|
149
152
|
- spec/dummy/app/assets/javascripts/application.js
|
150
153
|
- spec/dummy/app/assets/stylesheets/application.css
|
151
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
152
154
|
- spec/dummy/app/controllers/application_controller.rb
|
153
155
|
- spec/dummy/app/helpers/application_helper.rb
|
154
|
-
- spec/dummy/
|
155
|
-
- spec/dummy/
|
156
|
-
- spec/dummy/
|
157
|
-
- spec/dummy/
|
158
|
-
- spec/dummy/
|
159
|
-
- spec/dummy/log/test.log
|
160
|
-
- spec/dummy/log/development.log
|
161
|
-
- spec/dummy/README.md
|
162
|
-
- spec/dummy/public/favicon.ico
|
163
|
-
- spec/dummy/public/422.html
|
164
|
-
- spec/dummy/public/404.html
|
165
|
-
- spec/dummy/public/500.html
|
166
|
-
- spec/dummy/config.ru
|
156
|
+
- spec/dummy/app/models/application_record.rb
|
157
|
+
- spec/dummy/app/models/container.rb
|
158
|
+
- spec/dummy/app/models/item.rb
|
159
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
160
|
+
- spec/dummy/bin/bundle
|
167
161
|
- spec/dummy/bin/rails
|
168
162
|
- spec/dummy/bin/rake
|
169
|
-
- spec/dummy/bin/bundle
|
170
163
|
- spec/dummy/config/application.rb
|
171
|
-
- spec/dummy/config/
|
164
|
+
- spec/dummy/config/boot.rb
|
165
|
+
- spec/dummy/config/database.yml
|
166
|
+
- spec/dummy/config/environment.rb
|
167
|
+
- spec/dummy/config/environments/development.rb
|
168
|
+
- spec/dummy/config/environments/production.rb
|
169
|
+
- spec/dummy/config/environments/test.rb
|
172
170
|
- spec/dummy/config/initializers/assets.rb
|
171
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
173
172
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
173
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
174
174
|
- spec/dummy/config/initializers/inflections.rb
|
175
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
176
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
177
|
-
- spec/dummy/config/initializers/session_store.rb
|
178
175
|
- spec/dummy/config/initializers/mime_types.rb
|
176
|
+
- spec/dummy/config/initializers/session_store.rb
|
177
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
179
178
|
- spec/dummy/config/locales/en.yml
|
180
179
|
- spec/dummy/config/routes.rb
|
181
|
-
- spec/dummy/config/database.yml
|
182
|
-
- spec/dummy/config/environment.rb
|
183
|
-
- spec/dummy/config/boot.rb
|
184
|
-
- spec/dummy/config/environments/production.rb
|
185
|
-
- spec/dummy/config/environments/test.rb
|
186
|
-
- spec/dummy/config/environments/development.rb
|
187
180
|
- spec/dummy/config/secrets.yml
|
188
|
-
- spec/dummy/
|
181
|
+
- spec/dummy/config.ru
|
182
|
+
- spec/dummy/db/migrate/20190523235417_create_containers.rb
|
183
|
+
- spec/dummy/db/migrate/20190523235430_create_items.rb
|
184
|
+
- spec/dummy/db/schema.rb
|
185
|
+
- spec/dummy/db/test.sqlite3
|
186
|
+
- spec/dummy/log/test.log
|
187
|
+
- spec/dummy/public/404.html
|
188
|
+
- spec/dummy/public/422.html
|
189
|
+
- spec/dummy/public/500.html
|
190
|
+
- spec/dummy/public/favicon.ico
|
191
|
+
- spec/lib/sortability/active_record/base_spec.rb
|
189
192
|
- spec/lib/sortability/active_record/connection_adapters/table_definition_spec.rb
|
190
193
|
- spec/lib/sortability/active_record/migration_spec.rb
|
191
|
-
- spec/
|
194
|
+
- spec/rails_helper.rb
|
195
|
+
- spec/spec_helper.rb
|
Binary file
|
@@ -1,140 +0,0 @@
|
|
1
|
-
DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
|
2
|
-
set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
|
3
|
-
boolean values and must have old data converted to 1 and 0 (its native boolean
|
4
|
-
serialization) before setting this flag to true. Conversion can be accomplished
|
5
|
-
by setting up a rake task which runs
|
6
|
-
|
7
|
-
ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
|
8
|
-
ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)
|
9
|
-
|
10
|
-
for all models and all boolean columns, after which the flag must be set to
|
11
|
-
true by adding the following to your application.rb file:
|
12
|
-
|
13
|
-
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
|
14
|
-
(called from <top (required)> at /home/dante/Desktop/sortability/spec/dummy/config/environment.rb:5)
|
15
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
16
|
-
[1m[35m (11.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
17
|
-
[1m[35m (16.4ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
18
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
19
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
20
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-05-23 15:10:43.061279"], ["updated_at", "2019-05-23 15:10:43.061279"]]
|
21
|
-
[1m[35m (10.9ms)[0m [1m[36mcommit transaction[0m
|
22
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
23
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
24
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
25
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
26
|
-
[1m[35m (15.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
27
|
-
[1m[35m (16.5ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
28
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
29
|
-
Migrating to CreateContainers (20190523235417)
|
30
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
31
|
-
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "containers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
32
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235417"]]
|
33
|
-
[1m[35m (14.3ms)[0m [1m[36mcommit transaction[0m
|
34
|
-
Migrating to CreateItems (20190523235430)
|
35
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
36
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "container_id" integer, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, CONSTRAINT "fk_rails_9ab3f324f3"
|
37
|
-
FOREIGN KEY ("container_id")
|
38
|
-
REFERENCES "containers" ("id")
|
39
|
-
)[0m
|
40
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_items_on_container_id" ON "items" ("container_id")[0m
|
41
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_{:scope=>:container_id}_on_sort_position" ON "{:scope=>:container_id}" ("sort_position")[0m
|
42
|
-
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
43
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
44
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
45
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
46
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
47
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-05-23 23:56:43.199474"], ["updated_at", "2019-05-23 23:56:43.199474"]]
|
48
|
-
[1m[35m (16.5ms)[0m [1m[36mcommit transaction[0m
|
49
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
50
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
51
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
52
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
53
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
54
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
55
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
56
|
-
[1m[35m (15.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
57
|
-
[1m[35m (16.8ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
58
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
59
|
-
Migrating to CreateContainers (20190523235417)
|
60
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
61
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "containers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
62
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235417"]]
|
63
|
-
[1m[35m (13.7ms)[0m [1m[36mcommit transaction[0m
|
64
|
-
Migrating to CreateItems (20190523235430)
|
65
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
66
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "container_id" integer, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, CONSTRAINT "fk_rails_9ab3f324f3"
|
67
|
-
FOREIGN KEY ("container_id")
|
68
|
-
REFERENCES "containers" ("id")
|
69
|
-
)[0m
|
70
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_items_on_container_id" ON "items" ("container_id")[0m
|
71
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_items_on_container_id_and_sort_position" ON "items" ("container_id", "sort_position")[0m
|
72
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235430"]]
|
73
|
-
[1m[35m (15.6ms)[0m [1m[36mcommit transaction[0m
|
74
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
75
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
76
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-05-23 23:56:44.736059"], ["updated_at", "2019-05-23 23:56:44.736059"]]
|
77
|
-
[1m[35m (14.2ms)[0m [1m[36mcommit transaction[0m
|
78
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
79
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
80
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
81
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
82
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
83
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
84
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
85
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
86
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
87
|
-
[1m[35m (18.6ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
88
|
-
[1m[35m (16.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
89
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
90
|
-
Migrating to CreateContainers (20190523235417)
|
91
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
92
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "containers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
93
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235417"]]
|
94
|
-
[1m[35m (15.0ms)[0m [1m[36mcommit transaction[0m
|
95
|
-
Migrating to CreateItems (20190523235430)
|
96
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
97
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "container_id" integer NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, CONSTRAINT "fk_rails_9ab3f324f3"
|
98
|
-
FOREIGN KEY ("container_id")
|
99
|
-
REFERENCES "containers" ("id")
|
100
|
-
)[0m
|
101
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_items_on_container_id" ON "items" ("container_id")[0m
|
102
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_items_on_container_id_and_sort_position" ON "items" ("container_id", "sort_position")[0m
|
103
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235430"]]
|
104
|
-
[1m[35m (15.6ms)[0m [1m[36mcommit transaction[0m
|
105
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
106
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
107
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-05-23 23:57:06.155960"], ["updated_at", "2019-05-23 23:57:06.155960"]]
|
108
|
-
[1m[35m (16.2ms)[0m [1m[36mcommit transaction[0m
|
109
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
110
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
111
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
112
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
113
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
114
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
115
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
116
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
117
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
118
|
-
[1m[35m (15.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
119
|
-
[1m[35m (16.8ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
120
|
-
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
121
|
-
Migrating to CreateContainers (20190523235417)
|
122
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
123
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "containers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
124
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235417"]]
|
125
|
-
[1m[35m (14.5ms)[0m [1m[36mcommit transaction[0m
|
126
|
-
Migrating to CreateItems (20190523235430)
|
127
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
128
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "container_id" integer NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, CONSTRAINT "fk_rails_9ab3f324f3"
|
129
|
-
FOREIGN KEY ("container_id")
|
130
|
-
REFERENCES "containers" ("id")
|
131
|
-
)[0m
|
132
|
-
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_items_on_container_id_and_sort_position" ON "items" ("container_id", "sort_position")[0m
|
133
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20190523235430"]]
|
134
|
-
[1m[35m (15.8ms)[0m [1m[36mcommit transaction[0m
|
135
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
136
|
-
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
137
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-05-23 23:57:43.652229"], ["updated_at", "2019-05-23 23:57:43.652229"]]
|
138
|
-
[1m[35m (13.6ms)[0m [1m[36mcommit transaction[0m
|
139
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
140
|
-
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|