contact_sync 1.4.6 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +24 -22
  3. data/lib/contact_sync.rb +0 -1
  4. data/lib/contact_sync/engine.rb +7 -0
  5. data/lib/contact_sync/syncable.rb +10 -0
  6. data/lib/contact_sync/version.rb +1 -1
  7. data/lib/generators/install_contact_sync/templates/contact.rb +0 -64
  8. data/lib/generators/install_contact_sync/templates/phone.rb +18 -8
  9. data/{test → spec}/dummy/README.rdoc +0 -0
  10. data/{test → spec}/dummy/Rakefile +0 -0
  11. data/{test → spec}/dummy/app/assets/javascripts/application.js +0 -0
  12. data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -0
  13. data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -0
  14. data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
  15. data/spec/dummy/app/models/address.rb +5 -0
  16. data/spec/dummy/app/models/contact.rb +10 -0
  17. data/spec/dummy/app/models/email.rb +14 -0
  18. data/spec/dummy/app/models/phone.rb +41 -0
  19. data/spec/dummy/app/models/routes.rb +9 -0
  20. data/spec/dummy/app/models/user.rb +4 -0
  21. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  22. data/{test → spec}/dummy/bin/bundle +0 -0
  23. data/{test → spec}/dummy/bin/rails +0 -0
  24. data/{test → spec}/dummy/bin/rake +0 -0
  25. data/{test → spec}/dummy/bin/setup +0 -0
  26. data/{test → spec}/dummy/config.ru +0 -0
  27. data/{test → spec}/dummy/config/application.rb +13 -3
  28. data/{test → spec}/dummy/config/boot.rb +0 -0
  29. data/{test → spec}/dummy/config/database.yml +0 -0
  30. data/{test → spec}/dummy/config/environment.rb +0 -0
  31. data/{test → spec}/dummy/config/environments/development.rb +0 -0
  32. data/{test → spec}/dummy/config/environments/production.rb +0 -0
  33. data/{test → spec}/dummy/config/environments/test.rb +0 -0
  34. data/{test → spec}/dummy/config/initializers/assets.rb +0 -0
  35. data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  36. data/{test → spec}/dummy/config/initializers/cookies_serializer.rb +0 -0
  37. data/{test → spec}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  38. data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
  39. data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
  40. data/spec/dummy/config/initializers/session_store.rb +3 -0
  41. data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
  42. data/{test → spec}/dummy/config/locales/en.yml +0 -0
  43. data/{test → spec}/dummy/config/routes.rb +0 -0
  44. data/{test → spec}/dummy/config/secrets.yml +3 -3
  45. data/spec/dummy/db/development.sqlite3 +0 -0
  46. data/spec/dummy/db/migrate/20150520065844_create_contact_sync_schema.rb +70 -0
  47. data/spec/dummy/db/migrate/20150529072537_remove_device_id_from_contacts.rb +7 -0
  48. data/spec/dummy/db/schema.rb +74 -0
  49. data/spec/dummy/db/test.sqlite3 +0 -0
  50. data/spec/dummy/log/development.log +186 -0
  51. data/spec/dummy/log/test.log +386 -0
  52. data/{test → spec}/dummy/public/404.html +0 -0
  53. data/{test → spec}/dummy/public/422.html +0 -0
  54. data/{test → spec}/dummy/public/500.html +0 -0
  55. data/{test → spec}/dummy/public/favicon.ico +0 -0
  56. data/spec/factories/contact_factory.rb +18 -0
  57. data/spec/factories/user_factory.rb +7 -0
  58. data/spec/rails_helper.rb +82 -0
  59. data/spec/spec_helper.rb +92 -0
  60. data/spec/string_phone_spec.rb +15 -0
  61. metadata +152 -82
  62. data/test/con_sync_test.rb +0 -7
  63. data/test/dummy/config/initializers/session_store.rb +0 -3
  64. data/test/dummy/db/schema.rb +0 -17
  65. data/test/integration/navigation_test.rb +0 -10
  66. data/test/lib/generators/con_sync/install_con_sync_generator_test.rb +0 -16
  67. data/test/test_helper.rb +0 -20
@@ -0,0 +1,70 @@
1
+ class CreateContactSyncSchema < ActiveRecord::Migration
2
+ def up
3
+ create_table :contacts do |t|
4
+ t.string :composite_name
5
+ t.string :first_name
6
+ t.string :middle_name
7
+ t.string :last_name
8
+ t.string :prefix
9
+ t.string :suffix
10
+ t.string :nickname
11
+ t.string :organization
12
+ t.string :job_title
13
+ t.string :department
14
+ t.date :birthdate
15
+ t.text :note
16
+ t.string :device_id
17
+ t.integer :record_id, default: 0
18
+ t.datetime :creation_date
19
+ t.datetime :modification_date
20
+ t.integer :user_id
21
+ t.timestamps
22
+ end
23
+
24
+ create_table :phones do |t|
25
+ t.string :label
26
+ t.string :encrypted_number
27
+ t.string :cc_prefix
28
+ t.string :extension
29
+ t.integer :contact_id
30
+
31
+ t.timestamps
32
+ end
33
+
34
+ create_table :emails do |t|
35
+ t.string :label
36
+ t.string :encrypted_email
37
+ t.integer :contact_id
38
+
39
+ t.timestamps
40
+ end
41
+
42
+ if table_exists? :users
43
+ add_column :users, :last_contact_sync, :datetime
44
+ add_column :users, :encrypted_number, :string
45
+ add_column :users, :cc_prefix, :string
46
+ add_index :users, :encrypted_number
47
+ else
48
+ create_table :users do |t|
49
+ t.string :first_name
50
+ t.string :middle_name
51
+ t.string :last_name
52
+ t.string :email
53
+ t.string :encrypted_number
54
+ t.string :cc_prefix
55
+ t.datetime :last_contact_sync
56
+ end
57
+ add_index :users, :encrypted_number
58
+ end
59
+
60
+ add_index :contacts, [:record_id, :device_id], name: "unique_device_contact", unique: true
61
+ add_index :contacts, :user_id
62
+ add_index :phones, :encrypted_number
63
+ add_index :emails, :encrypted_email
64
+
65
+ end
66
+
67
+ def down
68
+
69
+ end
70
+ end
@@ -0,0 +1,7 @@
1
+ class RemoveDeviceIdFromContacts < ActiveRecord::Migration
2
+ def up
3
+ remove_column :contacts, :device_id, :string, default: ""
4
+ remove_index :contacts, columns: [:device_id, :record_id], name: "unique_device_contact"
5
+ add_index :contacts, [:user_id, :record_id], unique: true
6
+ end
7
+ end
@@ -0,0 +1,74 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20150529072537) do
15
+
16
+ create_table "contacts", force: :cascade do |t|
17
+ t.string "composite_name"
18
+ t.string "first_name"
19
+ t.string "middle_name"
20
+ t.string "last_name"
21
+ t.string "prefix"
22
+ t.string "suffix"
23
+ t.string "nickname"
24
+ t.string "organization"
25
+ t.string "job_title"
26
+ t.string "department"
27
+ t.date "birthdate"
28
+ t.text "note"
29
+ t.integer "record_id", default: 0
30
+ t.datetime "creation_date"
31
+ t.datetime "modification_date"
32
+ t.integer "user_id"
33
+ t.datetime "created_at"
34
+ t.datetime "updated_at"
35
+ end
36
+
37
+ add_index "contacts", ["user_id", "record_id"], name: "index_contacts_on_user_id_and_record_id", unique: true
38
+ add_index "contacts", ["user_id"], name: "index_contacts_on_user_id"
39
+
40
+ create_table "emails", force: :cascade do |t|
41
+ t.string "label"
42
+ t.string "encrypted_email"
43
+ t.integer "contact_id"
44
+ t.datetime "created_at"
45
+ t.datetime "updated_at"
46
+ end
47
+
48
+ add_index "emails", ["encrypted_email"], name: "index_emails_on_encrypted_email"
49
+
50
+ create_table "phones", force: :cascade do |t|
51
+ t.string "label"
52
+ t.string "encrypted_number"
53
+ t.string "cc_prefix"
54
+ t.string "extension"
55
+ t.integer "contact_id"
56
+ t.datetime "created_at"
57
+ t.datetime "updated_at"
58
+ end
59
+
60
+ add_index "phones", ["encrypted_number"], name: "index_phones_on_encrypted_number"
61
+
62
+ create_table "users", force: :cascade do |t|
63
+ t.string "first_name"
64
+ t.string "middle_name"
65
+ t.string "last_name"
66
+ t.string "email"
67
+ t.string "encrypted_number"
68
+ t.string "cc_prefix"
69
+ t.datetime "last_contact_sync"
70
+ end
71
+
72
+ add_index "users", ["encrypted_number"], name: "index_users_on_encrypted_number"
73
+
74
+ end
@@ -0,0 +1,186 @@
1
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6
+  (0.1ms) select sqlite_version(*)
7
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
8
+  (0.1ms) SELECT version FROM "schema_migrations"
9
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
10
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
+ Migrating to CreateContactSyncSchema (20150520065844)
12
+  (0.1ms) begin transaction
13
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in up at /Users/SM/Developer/Personal/RoR/con_sync/spec/dummy/db/migrate/20150520065844_create_contact_sync_schema.rb:21)
14
+  (0.7ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "device_id" varchar, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
15
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in up at /Users/SM/Developer/Personal/RoR/con_sync/spec/dummy/db/migrate/20150520065844_create_contact_sync_schema.rb:31)
16
+  (0.2ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
17
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in up at /Users/SM/Developer/Personal/RoR/con_sync/spec/dummy/db/migrate/20150520065844_create_contact_sync_schema.rb:39)
18
+  (0.2ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime) 
19
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
20
+  (0.1ms) select sqlite_version(*)
21
+  (0.2ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
22
+  (1.3ms) CREATE UNIQUE INDEX "unique_device_contact" ON "contacts" ("record_id", "device_id")
23
+  (0.1ms) SELECT sql
24
+ FROM sqlite_master
25
+ WHERE name='unique_device_contact' AND type='index'
26
+ UNION ALL
27
+ SELECT sql
28
+ FROM sqlite_temp_master
29
+ WHERE name='unique_device_contact' AND type='index'
30
+
31
+  (0.1ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
32
+  (0.1ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
33
+  (0.1ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
34
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150520065844"]]
35
+  (1.0ms) commit transaction
36
+ Migrating to RemoveDeviceIdFromContacts (20150529072537)
37
+  (0.1ms) begin transaction
38
+  (0.5ms) CREATE TEMPORARY TABLE "acontacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "device_id" varchar, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
39
+  (0.1ms) SELECT sql
40
+ FROM sqlite_master
41
+ WHERE name='index_contacts_on_user_id' AND type='index'
42
+ UNION ALL
43
+ SELECT sql
44
+ FROM sqlite_temp_master
45
+ WHERE name='index_contacts_on_user_id' AND type='index'
46
+
47
+  (0.1ms)  SELECT sql
48
+ FROM sqlite_master
49
+ WHERE name='unique_device_contact' AND type='index'
50
+ UNION ALL
51
+ SELECT sql
52
+ FROM sqlite_temp_master
53
+ WHERE name='unique_device_contact' AND type='index'
54
+ 
55
+  (0.1ms) CREATE INDEX "tindex_acontacts_on_user_id" ON "acontacts" ("user_id")
56
+  (0.3ms) CREATE UNIQUE INDEX "tunique_device_contact" ON "acontacts" ("record_id", "device_id")
57
+  (0.1ms) SELECT * FROM "contacts"
58
+  (0.4ms) DROP TABLE "contacts"
59
+  (0.2ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime)
60
+  (0.2ms)  SELECT sql
61
+ FROM sqlite_master
62
+ WHERE name='tunique_device_contact' AND type='index'
63
+ UNION ALL
64
+ SELECT sql
65
+ FROM sqlite_temp_master
66
+ WHERE name='tunique_device_contact' AND type='index'
67
+ 
68
+  (0.1ms) SELECT sql
69
+ FROM sqlite_master
70
+ WHERE name='tindex_acontacts_on_user_id' AND type='index'
71
+ UNION ALL
72
+ SELECT sql
73
+ FROM sqlite_temp_master
74
+ WHERE name='tindex_acontacts_on_user_id' AND type='index'
75
+
76
+  (0.4ms) CREATE UNIQUE INDEX "unique_device_contact" ON "contacts" ("record_id")
77
+  (0.1ms) SELECT sql
78
+ FROM sqlite_master
79
+ WHERE name='unique_device_contact' AND type='index'
80
+ UNION ALL
81
+ SELECT sql
82
+ FROM sqlite_temp_master
83
+ WHERE name='unique_device_contact' AND type='index'
84
+
85
+  (0.2ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
86
+  (0.1ms) SELECT * FROM "acontacts"
87
+  (0.2ms) DROP TABLE "acontacts"
88
+  (0.1ms) SELECT sql
89
+ FROM sqlite_master
90
+ WHERE name='index_contacts_on_user_id' AND type='index'
91
+ UNION ALL
92
+ SELECT sql
93
+ FROM sqlite_temp_master
94
+ WHERE name='index_contacts_on_user_id' AND type='index'
95
+
96
+  (0.1ms)  SELECT sql
97
+ FROM sqlite_master
98
+ WHERE name='unique_device_contact' AND type='index'
99
+ UNION ALL
100
+ SELECT sql
101
+ FROM sqlite_temp_master
102
+ WHERE name='unique_device_contact' AND type='index'
103
+ 
104
+  (0.1ms) DROP INDEX "unique_device_contact"
105
+  (0.1ms)  SELECT sql
106
+ FROM sqlite_master
107
+ WHERE name='index_contacts_on_user_id' AND type='index'
108
+ UNION ALL
109
+ SELECT sql
110
+ FROM sqlite_temp_master
111
+ WHERE name='index_contacts_on_user_id' AND type='index'
112
+ 
113
+  (0.2ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
114
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150529072537"]]
115
+  (1.6ms) commit transaction
116
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
117
+  (0.2ms) SELECT sql
118
+ FROM sqlite_master
119
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
120
+ UNION ALL
121
+ SELECT sql
122
+ FROM sqlite_temp_master
123
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
124
+
125
+  (0.2ms)  SELECT sql
126
+ FROM sqlite_master
127
+ WHERE name='index_contacts_on_user_id' AND type='index'
128
+ UNION ALL
129
+ SELECT sql
130
+ FROM sqlite_temp_master
131
+ WHERE name='index_contacts_on_user_id' AND type='index'
132
+ 
133
+  (0.3ms) SELECT sql
134
+ FROM sqlite_master
135
+ WHERE name='index_emails_on_encrypted_email' AND type='index'
136
+ UNION ALL
137
+ SELECT sql
138
+ FROM sqlite_temp_master
139
+ WHERE name='index_emails_on_encrypted_email' AND type='index'
140
+
141
+  (0.2ms)  SELECT sql
142
+ FROM sqlite_master
143
+ WHERE name='index_phones_on_encrypted_number' AND type='index'
144
+ UNION ALL
145
+ SELECT sql
146
+ FROM sqlite_temp_master
147
+ WHERE name='index_phones_on_encrypted_number' AND type='index'
148
+ 
149
+  (0.2ms) SELECT sql
150
+ FROM sqlite_master
151
+ WHERE name='index_users_on_encrypted_number' AND type='index'
152
+ UNION ALL
153
+ SELECT sql
154
+ FROM sqlite_temp_master
155
+ WHERE name='index_users_on_encrypted_number' AND type='index'
156
+
157
+  (1.1ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
158
+  (0.2ms) select sqlite_version(*)
159
+  (1.2ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
160
+  (0.3ms) SELECT sql
161
+ FROM sqlite_master
162
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
163
+ UNION ALL
164
+ SELECT sql
165
+ FROM sqlite_temp_master
166
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
167
+
168
+  (1.1ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
169
+  (1.0ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
170
+  (0.9ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
171
+  (1.0ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
172
+  (1.1ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
173
+  (1.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
174
+  (1.4ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
175
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
176
+  (2.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
177
+  (0.2ms) SELECT version FROM "schema_migrations"
178
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
179
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
180
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
181
+  (0.1ms) begin transaction
182
+ SQL (0.6ms) INSERT INTO "users" ("first_name", "last_name") VALUES (?, ?) [["first_name", "Saad"], ["last_name", "Masood"]]
183
+  (6.1ms) commit transaction
184
+ User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
185
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
186
+ Contact Load (0.2ms) SELECT "contacts".* FROM "contacts" WHERE "contacts"."user_id" = ? [["user_id", 1]]
@@ -0,0 +1,386 @@
1
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
3
+  (0.1ms) select sqlite_version(*)
4
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.1ms) SELECT version FROM "schema_migrations"
6
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
7
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
8
+  (0.1ms) begin transaction
9
+  (0.1ms) rollback transaction
10
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
12
+  (0.1ms) select sqlite_version(*)
13
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
14
+  (0.1ms) SELECT version FROM "schema_migrations"
15
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
16
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
+  (0.1ms) begin transaction
18
+  (0.1ms) rollback transaction
19
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
20
+  (3.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
21
+  (0.1ms) select sqlite_version(*)
22
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
23
+  (0.1ms) SELECT version FROM "schema_migrations"
24
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
25
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
26
+  (0.1ms) begin transaction
27
+  (0.1ms) rollback transaction
28
+  (0.1ms) begin transaction
29
+  (0.0ms) rollback transaction
30
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
31
+  (6.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
32
+  (0.1ms) select sqlite_version(*)
33
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
34
+  (0.1ms) SELECT version FROM "schema_migrations"
35
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
36
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
37
+  (0.1ms) begin transaction
38
+  (0.1ms) rollback transaction
39
+  (0.1ms) begin transaction
40
+  (0.0ms) rollback transaction
41
+  (0.0ms) begin transaction
42
+  (0.2ms) rollback transaction
43
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
44
+  (6.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
45
+  (0.1ms) select sqlite_version(*)
46
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
47
+  (0.1ms) SELECT version FROM "schema_migrations"
48
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
49
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
50
+  (0.1ms) begin transaction
51
+  (0.1ms) rollback transaction
52
+  (0.1ms) begin transaction
53
+  (0.1ms) rollback transaction
54
+  (0.0ms) begin transaction
55
+  (0.1ms) rollback transaction
56
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
57
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
58
+  (0.1ms) select sqlite_version(*)
59
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
60
+  (0.1ms) SELECT version FROM "schema_migrations"
61
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
62
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
63
+  (0.1ms) begin transaction
64
+  (0.1ms) rollback transaction
65
+  (0.1ms) begin transaction
66
+  (0.0ms) rollback transaction
67
+  (0.1ms) begin transaction
68
+  (0.0ms) rollback transaction
69
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
70
+  (1.3ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
71
+  (0.1ms) select sqlite_version(*)
72
+  (1.1ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
73
+  (0.1ms) SELECT sql
74
+ FROM sqlite_master
75
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
76
+ UNION ALL
77
+ SELECT sql
78
+ FROM sqlite_temp_master
79
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
80
+
81
+  (1.0ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
82
+  (1.0ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
83
+  (0.9ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
84
+  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
85
+  (0.9ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
86
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
87
+  (0.8ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
88
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
89
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
90
+  (0.1ms) SELECT version FROM "schema_migrations"
91
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
92
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
93
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
94
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
95
+  (6.6ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
96
+  (0.1ms) select sqlite_version(*)
97
+  (1.1ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
98
+  (0.1ms) SELECT sql
99
+ FROM sqlite_master
100
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
101
+ UNION ALL
102
+ SELECT sql
103
+ FROM sqlite_temp_master
104
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
105
+
106
+  (0.9ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
107
+  (0.9ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
108
+  (0.9ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
109
+  (0.8ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
110
+  (0.9ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
111
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
112
+  (0.8ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
113
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
114
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
115
+  (0.1ms) SELECT version FROM "schema_migrations"
116
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
117
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
118
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
119
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
120
+  (3.7ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
121
+  (0.1ms) select sqlite_version(*)
122
+  (1.3ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
123
+  (0.1ms) SELECT sql
124
+ FROM sqlite_master
125
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
126
+ UNION ALL
127
+ SELECT sql
128
+ FROM sqlite_temp_master
129
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
130
+
131
+  (1.0ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
132
+  (1.0ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
133
+  (0.9ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
134
+  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
135
+  (1.0ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
136
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
137
+  (0.8ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
138
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
139
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
140
+  (0.1ms) SELECT version FROM "schema_migrations"
141
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
142
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
143
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
144
+  (0.2ms) begin transaction
145
+  (0.0ms) commit transaction
146
+  (0.0ms) begin transaction
147
+  (0.4ms) DELETE FROM "contacts";
148
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
149
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'contacts';
150
+  (0.1ms) DELETE FROM "emails";
151
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
152
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'emails';
153
+  (0.1ms) DELETE FROM "phones";
154
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
155
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'phones';
156
+  (0.1ms) DELETE FROM "users";
157
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
158
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'users';
159
+  (0.5ms) rollback transaction
160
+  (0.1ms) begin transaction
161
+  (0.0ms) commit transaction
162
+  (0.0ms) begin transaction
163
+  (0.0ms) SAVEPOINT active_record_1
164
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
165
+  (0.0ms) rollback transaction
166
+  (0.1ms) begin transaction
167
+  (0.0ms) commit transaction
168
+  (0.0ms) begin transaction
169
+  (0.0ms) SAVEPOINT active_record_1
170
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
171
+  (0.0ms) rollback transaction
172
+  (0.0ms) begin transaction
173
+  (0.0ms) commit transaction
174
+  (0.0ms) begin transaction
175
+  (0.0ms) SAVEPOINT active_record_1
176
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
177
+  (0.0ms) rollback transaction
178
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
179
+  (6.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
180
+  (0.1ms) select sqlite_version(*)
181
+  (1.1ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
182
+  (0.1ms) SELECT sql
183
+ FROM sqlite_master
184
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
185
+ UNION ALL
186
+ SELECT sql
187
+ FROM sqlite_temp_master
188
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
189
+
190
+  (0.8ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
191
+  (0.9ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
192
+  (0.8ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
193
+  (0.8ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
194
+  (0.9ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
195
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
196
+  (0.8ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
197
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
198
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
199
+  (0.1ms) SELECT version FROM "schema_migrations"
200
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
201
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
202
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
203
+  (0.1ms) begin transaction
204
+  (0.0ms) commit transaction
205
+  (0.0ms) begin transaction
206
+  (0.3ms) DELETE FROM "contacts";
207
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
208
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'contacts';
209
+  (0.1ms) DELETE FROM "emails";
210
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
211
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'emails';
212
+  (0.1ms) DELETE FROM "phones";
213
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
214
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'phones';
215
+  (0.1ms) DELETE FROM "users";
216
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
217
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'users';
218
+  (0.1ms) SAVEPOINT active_record_1
219
+ SQL (1.4ms) INSERT INTO "users" ("first_name", "last_name", "cc_prefix", "encrypted_number") VALUES (?, ?, ?, ?) [["first_name", "John"], ["last_name", "Doe"], ["cc_prefix", "92"], ["encrypted_number", "hFkuSUoedTG9SuJmGG6EIw==\n"]]
220
+  (0.1ms) RELEASE SAVEPOINT active_record_1
221
+  (2.9ms) rollback transaction
222
+  (0.1ms) begin transaction
223
+  (0.0ms) commit transaction
224
+  (0.0ms) begin transaction
225
+  (0.0ms) SAVEPOINT active_record_1
226
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
227
+  (0.0ms) rollback transaction
228
+  (0.1ms) begin transaction
229
+  (0.0ms) commit transaction
230
+  (0.0ms) begin transaction
231
+  (0.0ms) SAVEPOINT active_record_1
232
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
233
+  (0.0ms) rollback transaction
234
+  (0.0ms) begin transaction
235
+  (0.0ms) commit transaction
236
+  (0.0ms) begin transaction
237
+  (0.0ms) SAVEPOINT active_record_1
238
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
239
+  (0.0ms) rollback transaction
240
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
241
+  (6.2ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
242
+  (0.1ms) select sqlite_version(*)
243
+  (1.0ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
244
+  (0.1ms) SELECT sql
245
+ FROM sqlite_master
246
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
247
+ UNION ALL
248
+ SELECT sql
249
+ FROM sqlite_temp_master
250
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
251
+
252
+  (0.9ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
253
+  (0.9ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
254
+  (0.8ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
255
+  (0.8ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
256
+  (1.0ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
257
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
258
+  (0.8ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
259
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
260
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
261
+  (0.1ms) SELECT version FROM "schema_migrations"
262
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
263
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
264
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
265
+  (0.1ms) begin transaction
266
+  (0.0ms) commit transaction
267
+  (0.0ms) begin transaction
268
+  (0.3ms) DELETE FROM "contacts";
269
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
270
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'contacts';
271
+  (0.1ms) DELETE FROM "emails";
272
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
273
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'emails';
274
+  (0.1ms) DELETE FROM "phones";
275
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
276
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'phones';
277
+  (0.1ms) DELETE FROM "users";
278
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
279
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'users';
280
+  (2.5ms) rollback transaction
281
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
282
+  (6.2ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
283
+  (0.1ms) select sqlite_version(*)
284
+  (1.1ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
285
+  (0.1ms) SELECT sql
286
+ FROM sqlite_master
287
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
288
+ UNION ALL
289
+ SELECT sql
290
+ FROM sqlite_temp_master
291
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
292
+
293
+  (1.0ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
294
+  (1.0ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
295
+  (0.9ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
296
+  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
297
+  (1.0ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
298
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
299
+  (0.8ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
300
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
301
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
302
+  (0.1ms) SELECT version FROM "schema_migrations"
303
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
304
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
305
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
306
+  (0.1ms) begin transaction
307
+  (0.0ms) commit transaction
308
+  (0.0ms) begin transaction
309
+  (0.3ms) DELETE FROM "contacts";
310
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
311
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'contacts';
312
+  (0.1ms) DELETE FROM "emails";
313
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
314
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'emails';
315
+  (0.1ms) DELETE FROM "phones";
316
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
317
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'phones';
318
+  (0.1ms) DELETE FROM "users";
319
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
320
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'users';
321
+  (0.1ms) SAVEPOINT active_record_1
322
+ SQL (1.4ms) INSERT INTO "users" ("first_name", "last_name", "cc_prefix", "encrypted_number") VALUES (?, ?, ?, ?) [["first_name", "John"], ["last_name", "Doe"], ["cc_prefix", "92"], ["encrypted_number", "hFkuSUoedTG9SuJmGG6EIw==\n"]]
323
+  (0.1ms) RELEASE SAVEPOINT active_record_1
324
+  (2.9ms) rollback transaction
325
+  (0.1ms) begin transaction
326
+  (0.0ms) commit transaction
327
+  (0.0ms) begin transaction
328
+  (0.0ms) SAVEPOINT active_record_1
329
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
330
+  (0.1ms) rollback transaction
331
+  (0.1ms) begin transaction
332
+  (0.0ms) commit transaction
333
+  (0.0ms) begin transaction
334
+  (0.0ms) SAVEPOINT active_record_1
335
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
336
+  (0.0ms) rollback transaction
337
+  (0.1ms) begin transaction
338
+  (0.1ms) commit transaction
339
+  (0.1ms) begin transaction
340
+  (0.0ms) SAVEPOINT active_record_1
341
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
342
+  (0.1ms) rollback transaction
343
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
344
+  (3.7ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "composite_name" varchar, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "prefix" varchar, "suffix" varchar, "nickname" varchar, "organization" varchar, "job_title" varchar, "department" varchar, "birthdate" date, "note" text, "record_id" integer DEFAULT 0, "creation_date" datetime, "modification_date" datetime, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
345
+  (0.1ms) select sqlite_version(*)
346
+  (1.1ms) CREATE UNIQUE INDEX "index_contacts_on_user_id_and_record_id" ON "contacts" ("user_id", "record_id")
347
+  (0.1ms) SELECT sql
348
+ FROM sqlite_master
349
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
350
+ UNION ALL
351
+ SELECT sql
352
+ FROM sqlite_temp_master
353
+ WHERE name='index_contacts_on_user_id_and_record_id' AND type='index'
354
+
355
+  (1.0ms) CREATE INDEX "index_contacts_on_user_id" ON "contacts" ("user_id")
356
+  (0.8ms) CREATE TABLE "emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_email" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
357
+  (0.8ms) CREATE INDEX "index_emails_on_encrypted_email" ON "emails" ("encrypted_email")
358
+  (0.9ms) CREATE TABLE "phones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "extension" varchar, "contact_id" integer, "created_at" datetime, "updated_at" datetime)
359
+  (0.9ms) CREATE INDEX "index_phones_on_encrypted_number" ON "phones" ("encrypted_number")
360
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "middle_name" varchar, "last_name" varchar, "email" varchar, "encrypted_number" varchar, "cc_prefix" varchar, "last_contact_sync" datetime)
361
+  (1.0ms) CREATE INDEX "index_users_on_encrypted_number" ON "users" ("encrypted_number")
362
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
363
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
364
+  (0.1ms) SELECT version FROM "schema_migrations"
365
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150529072537')
366
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150520065844')
367
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
368
+  (0.1ms) begin transaction
369
+  (0.0ms) commit transaction
370
+  (0.0ms) begin transaction
371
+  (0.4ms) DELETE FROM "contacts";
372
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
373
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'contacts';
374
+  (0.1ms) DELETE FROM "emails";
375
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
376
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'emails';
377
+  (0.1ms) DELETE FROM "phones";
378
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
379
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'phones';
380
+  (0.1ms) DELETE FROM "users";
381
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
382
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'users';
383
+  (0.1ms) SAVEPOINT active_record_1
384
+ SQL (1.5ms) INSERT INTO "users" ("first_name", "last_name", "cc_prefix", "encrypted_number") VALUES (?, ?, ?, ?) [["first_name", "John"], ["last_name", "Doe"], ["cc_prefix", "92"], ["encrypted_number", "hFkuSUoedTG9SuJmGG6EIw==\n"]]
385
+  (0.1ms) RELEASE SAVEPOINT active_record_1
386
+  (0.8ms) rollback transaction