krikri 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/krikri/records_controller.rb +7 -7
  3. data/app/models/krikri/validation_report.rb +1 -1
  4. data/lib/krikri/harvesters/couchdb_harvester.rb +66 -10
  5. data/lib/krikri/version.rb +1 -1
  6. data/spec/internal/Gemfile.lock +9 -9
  7. data/spec/internal/config/initializers/blacklight_initializer.rb +1 -1
  8. data/spec/internal/config/initializers/devise.rb +2 -2
  9. data/spec/internal/config/secrets.yml +2 -2
  10. data/spec/internal/db/development.sqlite3 +0 -0
  11. data/spec/internal/db/migrate/{20150406003020_devise_create_users.rb → 20150408190519_devise_create_users.rb} +0 -0
  12. data/spec/internal/db/migrate/{20150406003043_create_searches.blacklight.rb → 20150408190543_create_searches.blacklight.rb} +0 -0
  13. data/spec/internal/db/migrate/{20150406003044_create_bookmarks.blacklight.rb → 20150408190544_create_bookmarks.blacklight.rb} +0 -0
  14. data/spec/internal/db/migrate/{20150406003045_add_polymorphic_type_to_bookmarks.blacklight.rb → 20150408190545_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
  15. data/spec/internal/db/schema.rb +1 -1
  16. data/spec/internal/db/test.sqlite3 +0 -0
  17. data/spec/internal/log/development.log +53 -53
  18. data/spec/internal/log/test.log +3901 -3777
  19. data/spec/internal/tmp/cache/318/301/krikri%2Fapplication_helper%2Favailable_providers +0 -0
  20. data/spec/internal/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  21. data/spec/internal/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  22. data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  23. data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
  24. data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
  25. data/spec/internal/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  26. data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  27. data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  28. data/spec/lib/krikri/harvesters/couchdb_harvester_spec.rb +195 -36
  29. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6b203c78eb59c0ebe59c473df10e84eaaa6aba5
4
- data.tar.gz: 9e1824d2badadd4a0aa6d2fcdbaa89ed6b650da7
3
+ metadata.gz: 9b2d8957a0e4e4129ae3a818d8bbd972a14bc591
4
+ data.tar.gz: 79217f0cc7464b0cec61013d7b0fc10cb6c53f99
5
5
  SHA512:
6
- metadata.gz: 0ecaf50ef5597d05994ffdf031145e661e0a4a8c23a90fcc3e29a5958f41e8523a27a75e9ba344484f4bdbdb9d6f5853d8b8c8b03aa9fe43629de20e64114ed9
7
- data.tar.gz: e7dd24afa55cfa79efe78a5804725e0368bdcfa22721a779b9052290816f5a217980bddd7b6d559b4fe9623e9b65d8af5ea87fd120e7f2c57a37bdb5b327149b
6
+ metadata.gz: 788f41ca87a996bc7ee6bfcec0b02f298020f73a0075df7154479b4cfc3ce065d45c38bc957d8e9c99bd10de4a1a344d512a4dae17f35cc6c3f12063d821a264
7
+ data.tar.gz: 6d25298019ee75a91147d6c6f2f973311bd46e9db7c0a967486515c1b95490c90c357d0d39aa7b1b8df97778d1172b8e469e41e4bb176f7c560fa7120a34dd88
@@ -51,14 +51,14 @@ module Krikri
51
51
  # :show may be set to false if you don't want the facet to be drawn in the
52
52
  # facet bar
53
53
 
54
- config.add_facet_field 'sourceResource_type_id', :label => 'Type'
54
+ config.add_facet_field 'sourceResource_type_providedLabel', :label => 'Type'
55
55
  config.add_facet_field 'sourceResource_format', :label => 'Format'
56
- config.add_facet_field 'sourceResource_spatial_name', :label => 'Place'
57
- config.add_facet_field 'sourceResource_subject_name', :label => 'Subject'
56
+ config.add_facet_field 'sourceResource_spatial_providedLabel', :label => 'Place'
57
+ config.add_facet_field 'sourceResource_subject_providedLabel', :label => 'Subject'
58
58
  config.add_facet_field 'sourceResource_collection_title',
59
59
  :label => 'Collection'
60
- config.add_facet_field 'dataProvider_name', :label => 'Data Provider'
61
- config.add_facet_field 'sourceResource_creator_name', :label => 'Creator'
60
+ config.add_facet_field 'dataProvider_providedLabel', :label => 'Data Provider'
61
+ config.add_facet_field 'sourceResource_creator_providedLabel', :label => 'Creator'
62
62
 
63
63
  # Have BL send all facet field names to Solr, which has been the default
64
64
  # previously. Simply remove these lines if you'd rather use Solr request
@@ -72,10 +72,10 @@ module Krikri
72
72
  :label => 'Description'
73
73
  config.add_index_field 'sourceResource_date_providedLabel',
74
74
  :label => 'Date'
75
- config.add_index_field 'sourceResource_type_id', :label => 'Type'
75
+ config.add_index_field 'sourceResource_type_providedLabel', :label => 'Type'
76
76
  config.add_index_field 'sourceResource_format', :label => 'Format'
77
77
  config.add_index_field 'sourceResource_rights', :label => 'Rights'
78
- config.add_index_field 'dataProvider_name', :label => 'Data Provider'
78
+ config.add_index_field 'dataProvider_providedLabel', :label => 'Data Provider'
79
79
 
80
80
  config.index.thumbnail_field = :preview_id
81
81
 
@@ -2,7 +2,7 @@ module Krikri
2
2
  class ValidationReport
3
3
  attr_accessor :provider_id, :page, :rows
4
4
 
5
- REQUIRED_FIELDS = ['dataProvider_name', 'isShownAt_id', 'preview_id',
5
+ REQUIRED_FIELDS = ['dataProvider_providedLabel', 'isShownAt_id', 'preview_id',
6
6
  'sourceResource_rights', 'sourceResource_title',
7
7
  'sourceResource_type_id']
8
8
 
@@ -20,6 +20,7 @@ module Krikri::Harvesters
20
20
  super
21
21
  @opts = opts.fetch(:couchdb, view: '_all_docs')
22
22
  @opts[:view] ||= '_all_docs'
23
+ @opts[:limit] ||= 10
23
24
  @client = Analysand::Database.new(uri)
24
25
  end
25
26
 
@@ -35,34 +36,89 @@ module Krikri::Harvesters
35
36
  # @see Analysand::StreamingViewResponse
36
37
  def record_ids(opts = {})
37
38
  view = opts[:view] || @opts[:view]
38
- client.view(view, include_docs: false, stream: true).keys.lazy
39
+ # The set of record ids is all of the record IDs in the database minus
40
+ # the IDs of CouchDB design documents.
41
+ view_opts = {include_docs: false, stream: true}
42
+ client.view(view, view_opts).keys.lazy.select do |k|
43
+ !k.start_with?('_design')
44
+ end
39
45
  end
40
46
 
41
47
  ##
42
- # Returns the total number of documents reported by a CouchDB view.
48
+ # Return the total number of documents reported by a CouchDB view.
49
+ #
50
+ # @param opts [Hash] Analysand::Database#view options
51
+ # - view: database view name
52
+ # @return [Fixnum]
53
+ #
43
54
  def count(opts = {})
44
55
  view = opts[:view] || @opts[:view]
45
- client.view(view,
46
- limit: 0,
47
- include_docs: false,
48
- stream: true).total_rows
56
+ # The count that we want is the total documents in the database minus
57
+ # CouchDB design documents. Asking for the design documents will give us
58
+ # the total count in addition to letting us determine the number of
59
+ # design documents.
60
+ v = client.view(view,
61
+ include_docs: false,
62
+ stream: false,
63
+ startkey: '_design',
64
+ endkey: '_design0')
65
+ total = v.total_rows
66
+ design_doc_count = v.keys.size
67
+ total - design_doc_count
49
68
  end
50
69
 
51
70
  ##
52
- # Streams a response from a CouchDB view to yield documents.
71
+ # Makes requests to a CouchDB view to yield documents.
53
72
  #
54
73
  # The following will only send requests to the endpoint until it
55
74
  # has 1000 records:
56
75
  #
57
76
  # records.take(1000)
58
77
  #
78
+ # Batches of records are requested, in order to avoid using
79
+ # `Analysand::StreamingViewResponse`, and the CouchDB `startkey` parameter
80
+ # is used for greater efficiency than `skip` in locating the next page of
81
+ # records.
82
+ #
83
+ # @return [Enumerator]
59
84
  # @see Analysand::Viewing
60
- # @see Analysand::StreamingViewResponse
85
+ # @see http://docs.couchdb.org/en/latest/couchapp/views/collation.html#all-docs
61
86
  def records(opts = {})
62
87
  view = opts[:view] || @opts[:view]
63
- client.view(view, include_docs: true, stream: true).docs.lazy.map do |r|
64
- @record_class.build(mint_id(r['_id']), r.to_json, 'application/json')
88
+ limit = opts[:limit] || @opts[:limit]
89
+ record_rows(view, limit).map do |row|
90
+ @record_class.build(
91
+ mint_id(row['doc']['_id']),
92
+ row['doc'].to_json,
93
+ 'application/json'
94
+ )
95
+ end
96
+ end
97
+
98
+ ##
99
+ # Return an enumerator that provides individual records from batched view
100
+ # requests.
101
+ #
102
+ # @return [Enumerator]
103
+ # @see #records
104
+ def record_rows(view, limit)
105
+ en = Enumerator.new do |e|
106
+ view_opts = {include_docs: true, stream: false, limit: limit}
107
+ rows_retrieved = 0
108
+ total_rows = nil
109
+ loop do
110
+ v = client.view(view, view_opts)
111
+ total_rows ||= v.total_rows
112
+ rows_retrieved += v.rows.size
113
+ v.rows.each do |row|
114
+ next if row['id'].start_with?('_design')
115
+ e.yield row
116
+ end
117
+ break if rows_retrieved == total_rows
118
+ view_opts[:startkey] = v.rows.last['id'] + '0'
119
+ end
65
120
  end
121
+ en.lazy
66
122
  end
67
123
 
68
124
  ##
@@ -1,3 +1,3 @@
1
1
  module Krikri
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mark/Documents/Code/dpla/KriKri
3
3
  specs:
4
- krikri (0.5.1)
4
+ krikri (0.5.3)
5
5
  analysand (= 4.0.0)
6
6
  blacklight (~> 5.8.0)
7
7
  devise (~> 3.4.1)
@@ -89,7 +89,7 @@ GEM
89
89
  coffee-rails (4.0.1)
90
90
  coffee-script (>= 2.2.0)
91
91
  railties (>= 4.0.0, < 5.0)
92
- coffee-script (2.3.0)
92
+ coffee-script (2.4.1)
93
93
  coffee-script-source
94
94
  execjs
95
95
  coffee-script-source (1.9.1)
@@ -124,7 +124,7 @@ GEM
124
124
  equivalent-xml (0.5.1)
125
125
  nokogiri (>= 1.4.3)
126
126
  erubis (2.7.0)
127
- execjs (2.4.0)
127
+ execjs (2.5.0)
128
128
  factory_girl (4.4.0)
129
129
  activesupport (>= 3.0.0)
130
130
  factory_girl_rails (4.4.1)
@@ -240,13 +240,13 @@ GEM
240
240
  rake (>= 0.8.7)
241
241
  thor (>= 0.18.1, < 2.0)
242
242
  rake (10.4.2)
243
- rdf (1.1.10)
243
+ rdf (1.1.11)
244
244
  link_header (~> 0.0, >= 0.0.8)
245
245
  rdf-aggregate-repo (1.1.0)
246
246
  rdf (>= 1.1)
247
247
  rdf-isomorphic (1.1.0)
248
248
  rdf (>= 1.1)
249
- rdf-json (1.1.1)
249
+ rdf-json (1.1.2)
250
250
  rdf (~> 1.1)
251
251
  rdf-marmotta (0.0.8)
252
252
  nokogiri
@@ -254,7 +254,7 @@ GEM
254
254
  rdf (~> 1.1)
255
255
  rdf-rdfxml (~> 1.1)
256
256
  sparql-client (~> 1.1.4)
257
- rdf-microdata (2.0)
257
+ rdf-microdata (2.0.1)
258
258
  htmlentities (~> 4.3)
259
259
  nokogiri (~> 1.6)
260
260
  rdf (~> 1.1)
@@ -267,7 +267,7 @@ GEM
267
267
  rdf (~> 1.1, >= 1.1.6)
268
268
  rdf-aggregate-repo
269
269
  rdf-xsd (~> 1.1)
270
- rdf-rdfxml (1.1.3)
270
+ rdf-rdfxml (1.1.4)
271
271
  htmlentities (~> 4.3)
272
272
  rdf (~> 1.1, >= 1.1.6)
273
273
  rdf-rdfa (~> 1.1, >= 1.1.4.1)
@@ -282,9 +282,9 @@ GEM
282
282
  rdf-turtle (~> 1.1, >= 1.1.3)
283
283
  rdf-trix (1.1.0)
284
284
  rdf (>= 1.1)
285
- rdf-turtle (1.1.5)
285
+ rdf-turtle (1.1.6)
286
286
  ebnf (~> 0.3, >= 0.3.6)
287
- rdf (~> 1.1, >= 1.1.4)
287
+ rdf (~> 1.1, >= 1.1.10)
288
288
  rdf-xsd (1.1.3)
289
289
  rdf (~> 1.1, >= 1.1.9)
290
290
  rdoc (4.2.0)
@@ -3,5 +3,5 @@
3
3
  # will use the application's secret key base instead.
4
4
  #
5
5
 
6
- # Blacklight.secret_key = '85c1dc12a2d01e31c18e6af4a99554055b3b5e676816c6e116f6a66f246082e39241563291d1dda640a201c1e05321cead02a080b7671b05cb390ef9f40b586e'
6
+ # Blacklight.secret_key = '0d06e6bc99e4c427c3b5d75b00b5b415038ebb832c8f983540db6ba603143e638c210786531582afcbdbc86be5fe9bc03ebfcd24c0f8d39affa46db71875c5d8'
7
7
 
@@ -4,7 +4,7 @@ Devise.setup do |config|
4
4
  # The secret key used by Devise. Devise uses this key to generate
5
5
  # random tokens. Changing this key will render invalid all existing
6
6
  # confirmation, reset password and unlock tokens in the database.
7
- # config.secret_key = 'd2709715f3121aee4cca787a33fe444930eca3960d96dc11ceac86b6e0b7cc221c533eaf330956dad2bb58a259924e559a21bcf83150309f2168c766d941d899'
7
+ # config.secret_key = '8af3c3fb5037ca0803eaa67ac97b6d1772505b16b62f06d0189d3a788b55028452a217bc9987b13670be761cce89b19e29f5e30f5906137782080f1c7ece9f5d'
8
8
 
9
9
  # ==> Mailer Configuration
10
10
  # Configure the e-mail address which will be shown in Devise::Mailer,
@@ -97,7 +97,7 @@ Devise.setup do |config|
97
97
  config.stretches = Rails.env.test? ? 1 : 10
98
98
 
99
99
  # Setup a pepper to generate the encrypted password.
100
- # config.pepper = '74f48822ac8273a684fdad7e3831d5a54de52b3eb9e52cb9e6a1c7e8db1ddfcf75b95359ecc3b6564892ec5abd83421a8237ee61c4f7f0dd399b2b5f96296bdb'
100
+ # config.pepper = 'c3f0259db44a3013e15ea80e829622d1a9b0fc10edc49c94243a6ade494db2d2f2a53354cc13a0bde446c0a6eb21a5552ad6deea3c5c60c54a21c948066a91e8'
101
101
 
102
102
  # ==> Configuration for :confirmable
103
103
  # A period that the user is allowed to access the website even without
@@ -11,10 +11,10 @@
11
11
  # if you're sharing your code publicly.
12
12
 
13
13
  development:
14
- secret_key_base: 0951375aa31191755be394d5bd477a0529bca96a8a6eaff31d7fc9a154c796cafc00d869d5833446f33046835e0f7edd604dea36e8188c62a544fc77957414ff
14
+ secret_key_base: 5e14aec5bae471921d516befadda906e28a79854b2c090746fa596331a6ab3fcd58f13ea3e2850b2b8a0aeb9489cec7af350148f502f17027bbc4b2264588d0a
15
15
 
16
16
  test:
17
- secret_key_base: 0665e80e05c13be03eed0a78b3b3df3b3da4ea4a2707ce5226d84aaf4af0f7ad521e85b3aed8d5fdc00622a47345a2e3fc301739e14d442e12d7805d9c754a11
17
+ secret_key_base: 2c8c52ae7e1103728d1fd3630e08355e1c4ed01bb00443ebeac34cf5f07b5641a7e9cd59fa94ea362b91edbdcceae406ed63846160b04204f44c2b7fc4e81e80
18
18
 
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150406003045) do
14
+ ActiveRecord::Schema.define(version: 20150408190545) do
15
15
 
16
16
  create_table "bookmarks", force: true do |t|
17
17
  t.integer "user_id", null: false
@@ -1,5 +1,5 @@
1
1
   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
2
+  (0.4ms) select sqlite_version(*)
3
3
   (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
4
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
5
  Migrating to CreateKrikriInstitutions (20141113200614)
@@ -8,50 +8,50 @@ Migrating to CreateKrikriInstitutions (20141113200614)
8
8
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141113200614"]]
9
9
   (0.6ms) commit transaction
10
10
  Migrating to CreateKrikriHarvestSources (20141113200643)
11
-  (0.0ms) begin transaction
11
+  (0.1ms) begin transaction
12
12
   (0.3ms) CREATE TABLE "krikri_harvest_sources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "institution_id" integer, "name" varchar(255), "source_type" varchar(255), "metadata_schema" varchar(255), "uri" varchar(255), "notes" text, "created_at" datetime, "updated_at" datetime)
13
13
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141113200643"]]
14
14
   (0.6ms) commit transaction
15
15
  Migrating to CreateKrikriActivities (20141212220924)
16
-  (0.0ms) begin transaction
16
+  (0.1ms) begin transaction
17
17
   (0.3ms) CREATE TABLE "krikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" varchar(255), "created_at" datetime, "updated_at" datetime)
18
18
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141212220924"]]
19
-  (0.5ms) commit transaction
19
+  (0.6ms) commit transaction
20
20
  Migrating to AddOptsToKrikriHarvestSources (20150106164218)
21
-  (0.0ms) begin transaction
22
-  (0.3ms) ALTER TABLE "krikri_harvest_sources" ADD "opts" text
21
+  (0.1ms) begin transaction
22
+  (0.7ms) ALTER TABLE "krikri_harvest_sources" ADD "opts" text
23
23
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150106164218"]]
24
-  (0.5ms) commit transaction
24
+  (0.6ms) commit transaction
25
25
  Migrating to ChangeOptsInKrikriActivities (20150309160112)
26
-  (0.0ms) begin transaction
27
-  (0.8ms) CREATE TEMPORARY TABLE "akrikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" varchar(255), "created_at" datetime, "updated_at" datetime)
26
+  (0.1ms) begin transaction
27
+  (1.1ms) CREATE TEMPORARY TABLE "akrikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" varchar(255), "created_at" datetime, "updated_at" datetime)
28
28
   (0.1ms) SELECT * FROM "krikri_activities"
29
-  (0.2ms) DROP TABLE "krikri_activities"
29
+  (0.9ms) DROP TABLE "krikri_activities"
30
30
   (0.1ms) CREATE TABLE "krikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" text(255), "created_at" datetime, "updated_at" datetime) 
31
31
   (0.0ms) SELECT * FROM "akrikri_activities"
32
32
   (0.3ms) DROP TABLE "akrikri_activities"
33
33
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150309160112"]]
34
-  (0.9ms) commit transaction
34
+  (0.8ms) commit transaction
35
35
  Migrating to RemoveOptsLimitInKrikriActivities (20150310190054)
36
-  (0.0ms) begin transaction
36
+  (0.1ms) begin transaction
37
37
   (0.2ms) CREATE TEMPORARY TABLE "akrikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" text(255), "created_at" datetime, "updated_at" datetime) 
38
38
   (0.1ms) SELECT * FROM "krikri_activities"
39
39
   (0.2ms) DROP TABLE "krikri_activities"
40
-  (0.1ms) CREATE TABLE "krikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" text, "created_at" datetime, "updated_at" datetime)
40
+  (0.2ms) CREATE TABLE "krikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" text, "created_at" datetime, "updated_at" datetime)
41
41
   (0.0ms) SELECT * FROM "akrikri_activities"
42
42
   (0.1ms) DROP TABLE "akrikri_activities"
43
43
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150310190054"]]
44
44
   (0.7ms) commit transaction
45
45
  Migrating to AddQaReport (20150328035550)
46
-  (0.0ms) begin transaction
47
-  (0.2ms) CREATE TABLE "krikri_qa_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "field_report" text, "count_report" text, "created_at" datetime, "updated_at" datetime)
46
+  (0.1ms) begin transaction
47
+  (0.3ms) CREATE TABLE "krikri_qa_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "field_report" text, "count_report" text, "created_at" datetime, "updated_at" datetime)
48
48
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150328035550"]]
49
49
   (0.6ms) commit transaction
50
- Migrating to DeviseCreateUsers (20150406003020)
50
+ Migrating to DeviseCreateUsers (20150408190519)
51
51
   (0.0ms) begin transaction
52
52
   (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime)
53
-  (0.3ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
54
-  (0.0ms) SELECT sql
53
+  (0.6ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
54
+  (0.1ms) SELECT sql
55
55
  FROM sqlite_master
56
56
  WHERE name='index_users_on_email' AND type='index'
57
57
  UNION ALL
@@ -59,8 +59,8 @@ Migrating to DeviseCreateUsers (20150406003020)
59
59
  FROM sqlite_temp_master
60
60
  WHERE name='index_users_on_email' AND type='index'
61
61
 
62
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
63
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150406003020"]]
62
+  (0.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
63
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150408190519"]]
64
64
   (0.6ms) commit transaction
65
65
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
66
   (0.1ms)  SELECT sql
@@ -80,24 +80,24 @@ Migrating to DeviseCreateUsers (20150406003020)
80
80
  WHERE name='index_users_on_email' AND type='index'
81
81
 
82
82
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
83
- Migrating to CreateSearches (20150406003043)
83
+ Migrating to CreateSearches (20150408190543)
84
84
   (0.1ms) begin transaction
85
-  (0.5ms) CREATE TABLE "searches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "query_params" text, "user_id" integer, "user_type" varchar(255), "created_at" datetime, "updated_at" datetime) 
85
+  (0.4ms) CREATE TABLE "searches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "query_params" text, "user_id" integer, "user_type" varchar(255), "created_at" datetime, "updated_at" datetime) 
86
86
   (0.1ms) select sqlite_version(*)
87
87
   (0.1ms) CREATE INDEX "index_searches_on_user_id" ON "searches" ("user_id")
88
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150406003043"]]
89
-  (0.5ms) commit transaction
90
- Migrating to CreateBookmarks (20150406003044)
91
-  (0.0ms) begin transaction
92
-  (0.2ms) CREATE TABLE "bookmarks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255), "document_id" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime) 
93
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150406003044"]]
94
-  (0.5ms) commit transaction
95
- Migrating to AddPolymorphicTypeToBookmarks (20150406003045)
96
-  (0.0ms) begin transaction
97
-  (0.2ms) ALTER TABLE "bookmarks" ADD "document_type" varchar(255)
88
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150408190543"]]
89
+  (2.2ms) commit transaction
90
+ Migrating to CreateBookmarks (20150408190544)
91
+  (0.1ms) begin transaction
92
+  (0.3ms) CREATE TABLE "bookmarks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255), "document_id" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime) 
93
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150408190544"]]
94
+  (0.6ms) commit transaction
95
+ Migrating to AddPolymorphicTypeToBookmarks (20150408190545)
96
+  (0.2ms) begin transaction
97
+  (0.4ms) ALTER TABLE "bookmarks" ADD "document_type" varchar(255)
98
98
   (0.1ms) CREATE INDEX "index_bookmarks_on_user_id" ON "bookmarks" ("user_id")
99
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150406003045"]]
100
-  (0.8ms) commit transaction
99
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150408190545"]]
100
+  (0.6ms) commit transaction
101
101
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
102
102
   (0.1ms) SELECT sql
103
103
  FROM sqlite_master
@@ -131,16 +131,16 @@ Migrating to AddPolymorphicTypeToBookmarks (20150406003045)
131
131
  FROM sqlite_temp_master
132
132
  WHERE name='index_users_on_email' AND type='index'
133
133
  
134
-  (0.9ms) CREATE TABLE "bookmarks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255), "document_id" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime, "document_type" varchar(255))
134
+  (0.8ms) CREATE TABLE "bookmarks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255), "document_id" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime, "document_type" varchar(255))
135
135
   (0.0ms) select sqlite_version(*)
136
-  (0.6ms) CREATE INDEX "index_bookmarks_on_user_id" ON "bookmarks" ("user_id")
136
+  (0.7ms) CREATE INDEX "index_bookmarks_on_user_id" ON "bookmarks" ("user_id")
137
137
   (0.6ms) CREATE TABLE "krikri_activities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_time" datetime, "end_time" datetime, "agent" varchar(255), "opts" text, "created_at" datetime, "updated_at" datetime) 
138
-  (0.7ms) CREATE TABLE "krikri_harvest_sources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "institution_id" integer, "name" varchar(255), "source_type" varchar(255), "metadata_schema" varchar(255), "uri" varchar(255), "notes" text, "created_at" datetime, "updated_at" datetime, "opts" text)
139
-  (0.6ms) CREATE TABLE "krikri_institutions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "notes" text, "created_at" datetime, "updated_at" datetime) 
140
-  (0.9ms) CREATE TABLE "krikri_qa_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "field_report" text, "count_report" text, "created_at" datetime, "updated_at" datetime)
141
-  (0.8ms) CREATE TABLE "searches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "query_params" text, "user_id" integer, "user_type" varchar(255), "created_at" datetime, "updated_at" datetime) 
138
+  (0.8ms) CREATE TABLE "krikri_harvest_sources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "institution_id" integer, "name" varchar(255), "source_type" varchar(255), "metadata_schema" varchar(255), "uri" varchar(255), "notes" text, "created_at" datetime, "updated_at" datetime, "opts" text)
139
+  (0.7ms) CREATE TABLE "krikri_institutions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "notes" text, "created_at" datetime, "updated_at" datetime) 
140
+  (0.7ms) CREATE TABLE "krikri_qa_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "field_report" text, "count_report" text, "created_at" datetime, "updated_at" datetime)
141
+  (0.7ms) CREATE TABLE "searches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "query_params" text, "user_id" integer, "user_type" varchar(255), "created_at" datetime, "updated_at" datetime) 
142
142
   (0.7ms) CREATE INDEX "index_searches_on_user_id" ON "searches" ("user_id")
143
-  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime) 
143
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime) 
144
144
   (0.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
145
145
   (0.1ms)  SELECT sql
146
146
  FROM sqlite_master
@@ -151,17 +151,17 @@ Migrating to AddPolymorphicTypeToBookmarks (20150406003045)
151
151
  WHERE name='index_users_on_email' AND type='index'
152
152
  
153
153
   (0.7ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
154
-  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
155
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
154
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
155
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
156
156
   (0.1ms) SELECT version FROM "schema_migrations"
157
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150406003045')
158
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150406003020')
159
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150406003043')
160
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150406003044')
161
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141113200614')
162
-  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141113200643')
163
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141212220924')
164
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106164218')
157
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150408190545')
158
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150408190519')
159
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150408190543')
160
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150408190544')
161
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141113200614')
162
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141113200643')
163
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141212220924')
164
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106164218')
165
165
   (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150309160112')
166
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150310190054')
167
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150328035550')
166
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150310190054')
167
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150328035550')