protokoll 0.6.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 65dba789e3d32b3c53109a8388d60a9657d6f4e4
4
+ data.tar.gz: a9ff4072bb3c7848507bea2508c1aa18037cc08d
5
+ SHA512:
6
+ metadata.gz: 65b0deabd38eb5c0deff93f9a3ac873681b9d64902d3382b657e633031962ef32f8205a22473718a243e1e8e2808a8402488c72286aa2d52b2e4713d61a24614
7
+ data.tar.gz: 307c7306307927a569ff017ca644335ce520834a9a003de938859276f8e9c1ef87d5d2218aaf4217d2d0ee1977a802464cd9ac96ed850834bf3bea9f0d2f18f4
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Protokoll [![Travis](https://api.travis-ci.org/celsodantas/protokoll.png)](http://travis-ci.org/celsodantas/protokoll)
1
+ # Protokoll [![Travis](https://api.travis-ci.org/celsodantas/protokoll.png)](http://travis-ci.org/celsodantas/protokoll) [![Gem Version](https://badge.fury.io/rb/protokoll.svg)](http://badge.fury.io/rb/protokoll)
2
2
 
3
3
 
4
4
  ## Description
@@ -88,13 +88,15 @@ end
88
88
  Add a new intance method colled: "your_instance#reserve_#{column_name}!".
89
89
  With it you can reserve a number without the need to save it to the database. Ex:
90
90
 
91
- car = Car.new
92
- car.number
93
- # => nil
94
- car.reserve_number!
95
- car.number
96
- # => "CAR1100001"
97
- # if you save it, the object will preserve the number: "CAR1100001"
91
+ ```ruby
92
+ car = Car.new
93
+ car.number
94
+ # => nil
95
+ car.reserve_number!
96
+ car.number
97
+ # => "CAR1100001"
98
+ # if you save it, the object will preserve the number: "CAR1100001"
99
+ ```
98
100
 
99
101
  It just increases the counter so any other object that gets saved or uses the #reserve_#{column_name} will get the next available number.
100
102
 
@@ -122,10 +124,12 @@ and migrate your database
122
124
  ## Questions & Sugestions
123
125
  This is my _first_ public gem, so if you have any questions os sugestions, feel free to contact me (use github msg system for that). It will be awesome to hear feedback to improve the code.
124
126
 
125
- The gem is still on early _alpha_ so you may find bugs on it. And if you do, please use the _Issues_ here in Github and I'd love to fix it.
127
+ The gem is still on early _alpha_ so you may find bugs on it. And if you do, please use the _Issues_ here in Github and I'd love to fix it.
126
128
 
127
129
  This piece of software is free to use.
128
130
 
131
+ Check the wiki if you are having any issues while upgrading from version `0.x`
132
+
129
133
  ### Running tests in Development
130
134
 
131
135
  You need to clone the project
@@ -1,15 +1,15 @@
1
1
  class CreateCustomAutoIncrements < ActiveRecord::Migration
2
2
  def up
3
3
  create_table :custom_auto_increments, :force => true do |t|
4
- t.string :model_name
4
+ t.string :counter_model_name
5
5
  t.integer :counter, :default => 0
6
6
  t.timestamps
7
7
  end
8
-
9
- add_index :custom_auto_increments, :model_name
8
+
9
+ add_index :custom_auto_increments, :counter_model_name
10
10
  end
11
11
 
12
12
  def down
13
13
  drop_table :custom_auto_increments
14
14
  end
15
- end
15
+ end
@@ -3,7 +3,7 @@ require 'active_record'
3
3
  module Protokoll
4
4
  class Counter
5
5
  def self.next(object, options)
6
- element = Models::CustomAutoIncrement.find_or_create_by(model_name: object.class.to_s.underscore)
6
+ element = Models::CustomAutoIncrement.find_or_create_by(counter_model_name: object.class.to_s.underscore)
7
7
 
8
8
  element.counter = options[:start] if outdated?(element, options) || element.counter == 0
9
9
  element.counter += 1
@@ -1,3 +1,3 @@
1
1
  module Protokoll
2
- VERSION = "0.6.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -38,4 +38,6 @@ Dummy::Application.configure do
38
38
  config.assets.allow_debugging = true
39
39
 
40
40
  config.eager_load = false
41
+
42
+ config.active_support.test_order = :random
41
43
  end
Binary file
@@ -1,15 +1,15 @@
1
1
  class CreateCustomAutoIncrements < ActiveRecord::Migration
2
2
  def up
3
3
  create_table :custom_auto_increments, :force => true do |t|
4
- t.string :model_name
4
+ t.string :counter_model_name
5
5
  t.integer :counter, :default => 0
6
6
  t.timestamps
7
7
  end
8
-
9
- add_index :custom_auto_increments, :model_name
8
+
9
+ add_index :custom_auto_increments, :counter_model_name
10
10
  end
11
11
 
12
12
  def down
13
13
  drop_table :custom_auto_increments
14
14
  end
15
- end
15
+ end
@@ -13,25 +13,25 @@
13
13
 
14
14
  ActiveRecord::Schema.define(version: 20120222164124) do
15
15
 
16
- create_table "calls", force: true do |t|
16
+ create_table "calls", force: :cascade do |t|
17
17
  t.string "number"
18
- t.datetime "created_at", null: false
19
- t.datetime "updated_at", null: false
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
20
  end
21
21
 
22
- create_table "custom_auto_increments", force: true do |t|
23
- t.string "model_name"
24
- t.integer "counter", default: 0
25
- t.datetime "created_at", null: false
26
- t.datetime "updated_at", null: false
22
+ create_table "custom_auto_increments", force: :cascade do |t|
23
+ t.string "counter_model_name"
24
+ t.integer "counter", default: 0
25
+ t.datetime "created_at"
26
+ t.datetime "updated_at"
27
27
  end
28
28
 
29
- add_index "custom_auto_increments", ["model_name"], name: "index_custom_auto_increments_on_model_name"
29
+ add_index "custom_auto_increments", ["counter_model_name"], name: "index_custom_auto_increments_on_counter_model_name"
30
30
 
31
- create_table "protocols", force: true do |t|
31
+ create_table "protocols", force: :cascade do |t|
32
32
  t.string "number"
33
- t.datetime "created_at", null: false
34
- t.datetime "updated_at", null: false
33
+ t.datetime "created_at"
34
+ t.datetime "updated_at"
35
35
  end
36
36
 
37
37
  end
Binary file
@@ -1,76 +1,107 @@
1
-  (2.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
5
  Migrating to CreateProtocols (20110923024431)
5
-  (0.1ms) begin transaction
6
-  (0.3ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
7
- SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110923024431"]]
8
-  (0.7ms) commit transaction
6
+  (0.1ms) begin transaction
7
+ 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 change at /Users/celsodantas/code/ruby/protokoll/test/dummy/db/migrate/20110923024431_create_protocols.rb:6)
8
+  (0.5ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
9
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110923024431"]]
10
+  (0.7ms) commit transaction
9
11
  Migrating to CreateCalls (20110928013630)
10
-  (0.1ms) begin transaction
11
-  (0.3ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
12
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110928013630"]]
13
-  (0.6ms) commit transaction
12
+  (0.0ms) 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 change at /Users/celsodantas/code/ruby/protokoll/test/dummy/db/migrate/20110928013630_create_calls.rb:5)
14
+  (0.4ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
15
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110928013630"]]
16
+  (0.8ms) commit transaction
14
17
  Migrating to CreateCustomAutoIncrements (20120222164124)
15
-  (0.0ms) begin transaction
16
-  (0.3ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar(255), "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
17
-  (0.1ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
18
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120222164124"]]
19
-  (0.7ms) commit transaction
20
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
21
-  (3.0ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
22
-  (1.0ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar(255), "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
23
-  (1.0ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
24
-  (1.4ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
25
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
26
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
27
-  (0.1ms) SELECT version FROM "schema_migrations"
28
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
29
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
30
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
31
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
18
+  (0.0ms) begin transaction
19
+ 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/celsodantas/code/ruby/protokoll/test/dummy/db/migrate/20120222164124_create_custom_auto_increments.rb:6)
20
+  (0.2ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "counter_model_name" varchar, "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
21
+  (0.1ms) CREATE INDEX "index_custom_auto_increments_on_counter_model_name" ON "custom_auto_increments" ("counter_model_name")
22
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120222164124"]]
23
+  (0.7ms) commit transaction
32
24
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
33
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
25
+  (0.1ms)  SELECT sql
26
+ FROM sqlite_master
27
+ WHERE name='index_custom_auto_increments_on_counter_model_name' AND type='index'
28
+ UNION ALL
29
+ SELECT sql
30
+ FROM sqlite_temp_master
31
+ WHERE name='index_custom_auto_increments_on_counter_model_name' AND type='index'
32
+ 
33
+  (1.3ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) 
34
+  (0.9ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "counter_model_name" varchar, "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
35
+  (0.1ms) select sqlite_version(*)
36
+  (0.8ms) CREATE INDEX "index_custom_auto_increments_on_counter_model_name" ON "custom_auto_increments" ("counter_model_name")
37
+  (0.7ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) 
38
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
39
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
40
+  (0.1ms) SELECT version FROM "schema_migrations"
41
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
42
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
43
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
44
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
34
45
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
35
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
46
+  (0.2ms)  SELECT sql
47
+ FROM sqlite_master
48
+ WHERE name='index_custom_auto_increments_on_counter_model_name' AND type='index'
49
+ UNION ALL
50
+ SELECT sql
51
+ FROM sqlite_temp_master
52
+ WHERE name='index_custom_auto_increments_on_counter_model_name' AND type='index'
53
+ 
54
+  (1.1ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) 
55
+  (0.8ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "counter_model_name" varchar, "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
56
+  (0.1ms) select sqlite_version(*)
57
+  (0.8ms) CREATE INDEX "index_custom_auto_increments_on_counter_model_name" ON "custom_auto_increments" ("counter_model_name")
58
+  (0.6ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) 
59
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
60
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
61
+  (0.1ms) SELECT version FROM "schema_migrations"
62
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
63
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
64
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
65
+  (2.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
66
+  (0.1ms) select sqlite_version(*)
67
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36
68
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
37
-  (2.2ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
38
-  (1.1ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar(255), "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
39
-  (0.9ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
40
-  (0.8ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
41
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
42
-  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
43
-  (0.1ms) SELECT version FROM "schema_migrations"
44
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
45
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
46
-  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
47
-  (2.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
48
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
49
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
50
69
  Migrating to CreateProtocols (20110923024431)
51
-  (0.0ms) begin transaction
52
-  (0.3ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
53
- SQL (1.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110923024431"]]
54
-  (0.9ms) commit transaction
70
+  (0.1ms) begin transaction
71
+ 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 change at /Users/celsodantas/code/ruby/protokoll/test/dummy/db/migrate/20110923024431_create_protocols.rb:6)
72
+  (0.4ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
73
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110923024431"]]
74
+  (0.6ms) commit transaction
55
75
  Migrating to CreateCalls (20110928013630)
56
-  (0.0ms) begin transaction
57
-  (0.3ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
58
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110928013630"]]
59
-  (1.0ms) commit transaction
76
+  (0.1ms) begin transaction
77
+ 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 change at /Users/celsodantas/code/ruby/protokoll/test/dummy/db/migrate/20110928013630_create_calls.rb:5)
78
+  (0.4ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
79
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110928013630"]]
80
+  (0.7ms) commit transaction
60
81
  Migrating to CreateCustomAutoIncrements (20120222164124)
61
-  (0.0ms) begin transaction
62
-  (0.3ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar(255), "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
63
-  (0.1ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
64
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120222164124"]]
65
-  (1.0ms) commit transaction
66
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
67
-  (2.9ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) 
68
-  (1.4ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar(255), "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
69
-  (1.2ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
70
-  (1.0ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
71
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
72
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
73
-  (0.1ms) SELECT version FROM "schema_migrations"
74
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
75
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
76
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
82
+  (0.0ms) begin transaction
83
+ 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/celsodantas/code/ruby/protokoll/test/dummy/db/migrate/20120222164124_create_custom_auto_increments.rb:6)
84
+  (0.3ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar, "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
85
+  (0.1ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
86
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120222164124"]]
87
+  (0.8ms) commit transaction
88
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
89
+  (0.2ms)  SELECT sql
90
+ FROM sqlite_master
91
+ WHERE name='index_custom_auto_increments_on_model_name' AND type='index'
92
+ UNION ALL
93
+ SELECT sql
94
+ FROM sqlite_temp_master
95
+ WHERE name='index_custom_auto_increments_on_model_name' AND type='index'
96
+ 
97
+  (2.7ms) CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) 
98
+  (0.9ms) CREATE TABLE "custom_auto_increments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "model_name" varchar, "counter" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
99
+  (0.1ms) select sqlite_version(*)
100
+  (0.8ms) CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
101
+  (0.8ms) CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) 
102
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
103
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
104
+  (0.1ms) SELECT version FROM "schema_migrations"
105
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
106
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
107
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')