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 +7 -0
- data/README.md +13 -9
- data/lib/generators/protokoll/migration/templates/create_custom_auto_increments.rb +4 -4
- data/lib/protokoll/counter.rb +1 -1
- data/lib/protokoll/version.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20120222164124_create_custom_auto_increments.rb +4 -4
- data/test/dummy/db/schema.rb +12 -12
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +98 -67
- data/test/dummy/log/test.log +4877 -65478
- metadata +17 -23
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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
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 :
|
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, :
|
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
|
data/lib/protokoll/counter.rb
CHANGED
@@ -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(
|
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
|
data/lib/protokoll/version.rb
CHANGED
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 :
|
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, :
|
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
|
data/test/dummy/db/schema.rb
CHANGED
@@ -13,25 +13,25 @@
|
|
13
13
|
|
14
14
|
ActiveRecord::Schema.define(version: 20120222164124) do
|
15
15
|
|
16
|
-
create_table "calls", force:
|
16
|
+
create_table "calls", force: :cascade do |t|
|
17
17
|
t.string "number"
|
18
|
-
t.datetime "created_at"
|
19
|
-
t.datetime "updated_at"
|
18
|
+
t.datetime "created_at"
|
19
|
+
t.datetime "updated_at"
|
20
20
|
end
|
21
21
|
|
22
|
-
create_table "custom_auto_increments", force:
|
23
|
-
t.string "
|
24
|
-
t.integer "counter",
|
25
|
-
t.datetime "created_at"
|
26
|
-
t.datetime "updated_at"
|
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", ["
|
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:
|
31
|
+
create_table "protocols", force: :cascade do |t|
|
32
32
|
t.string "number"
|
33
|
-
t.datetime "created_at"
|
34
|
-
t.datetime "updated_at"
|
33
|
+
t.datetime "created_at"
|
34
|
+
t.datetime "updated_at"
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,76 +1,107 @@
|
|
1
|
-
[1m[36m (
|
2
|
-
[1m[35m (0.
|
3
|
-
[1m[
|
1
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
4
5
|
Migrating to CreateProtocols (20110923024431)
|
5
|
-
[1m[
|
6
|
-
|
7
|
-
[1m[
|
8
|
-
[1m[
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
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
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
|
9
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20110923024431"]]
|
10
|
+
[1m[35m (0.7ms)[0m commit transaction
|
9
11
|
Migrating to CreateCalls (20110928013630)
|
10
|
-
[1m[
|
11
|
-
|
12
|
-
[1m[
|
13
|
-
[1m[
|
12
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
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
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
|
15
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20110928013630"]]
|
16
|
+
[1m[35m (0.8ms)[0m commit transaction
|
14
17
|
Migrating to CreateCustomAutoIncrements (20120222164124)
|
15
|
-
[1m[
|
16
|
-
|
17
|
-
[1m[35m (0.
|
18
|
-
[1m[
|
19
|
-
[1m[
|
20
|
-
[1m[
|
21
|
-
[1m[36m (3.0ms)[0m [1mCREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
22
|
-
[1m[35m (1.0ms)[0m 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
|
-
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")[0m
|
24
|
-
[1m[35m (1.4ms)[0m CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
|
25
|
-
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
26
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
28
|
-
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
|
29
|
-
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110923024431')[0m
|
30
|
-
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
|
31
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
18
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
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
|
+
[1m[35m (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_custom_auto_increments_on_counter_model_name" ON "custom_auto_increments" ("counter_model_name")[0m
|
22
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120222164124"]]
|
23
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
32
24
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
33
|
-
[1m[
|
25
|
+
[1m[36m (0.1ms)[0m [1m 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
|
+
[0m
|
33
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
34
|
+
[1m[35m (0.9ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
36
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_custom_auto_increments_on_counter_model_name" ON "custom_auto_increments" ("counter_model_name")
|
37
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
38
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
39
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
40
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
41
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120222164124')[0m
|
42
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
|
43
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110928013630')[0m
|
44
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
34
45
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
35
|
-
[1m[
|
46
|
+
[1m[36m (0.2ms)[0m [1m 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
|
+
[0m
|
54
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
55
|
+
[1m[35m (0.8ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
57
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_custom_auto_increments_on_counter_model_name" ON "custom_auto_increments" ("counter_model_name")
|
58
|
+
[1m[36m (0.6ms)[0m [1mCREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
59
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
60
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
61
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
62
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120222164124')[0m
|
63
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
|
64
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110928013630')[0m
|
65
|
+
[1m[36m (2.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
66
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
67
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
36
68
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
37
|
-
[1m[36m (2.2ms)[0m [1mCREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
38
|
-
[1m[35m (1.1ms)[0m 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
|
-
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")[0m
|
40
|
-
[1m[35m (0.8ms)[0m CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "created_at" datetime, "updated_at" datetime)
|
41
|
-
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
42
|
-
[1m[35m (1.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
43
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
44
|
-
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120222164124')
|
45
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110923024431')[0m
|
46
|
-
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110928013630')
|
47
|
-
[1m[36m (2.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
48
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
49
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
50
69
|
Migrating to CreateProtocols (20110923024431)
|
51
|
-
[1m[
|
52
|
-
|
53
|
-
[1m[
|
54
|
-
[1m[
|
70
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
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
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
|
73
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20110923024431"]]
|
74
|
+
[1m[35m (0.6ms)[0m commit transaction
|
55
75
|
Migrating to CreateCalls (20110928013630)
|
56
|
-
[1m[
|
57
|
-
|
58
|
-
[1m[
|
59
|
-
[1m[
|
76
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
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
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime)
|
79
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20110928013630"]]
|
80
|
+
[1m[35m (0.7ms)[0m commit transaction
|
60
81
|
Migrating to CreateCustomAutoIncrements (20120222164124)
|
61
|
-
[1m[
|
62
|
-
|
63
|
-
[1m[35m (0.
|
64
|
-
[1m[
|
65
|
-
[1m[
|
66
|
-
[1m[
|
67
|
-
[1m[
|
68
|
-
[1m[
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
[1m[
|
82
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
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
|
+
[1m[35m (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")[0m
|
86
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120222164124"]]
|
87
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
88
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
89
|
+
[1m[36m (0.2ms)[0m [1m 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
|
+
[0m
|
97
|
+
[1m[36m (2.7ms)[0m [1mCREATE TABLE "calls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
98
|
+
[1m[35m (0.9ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
100
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_custom_auto_increments_on_model_name" ON "custom_auto_increments" ("model_name")
|
101
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "protocols" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
102
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
103
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
104
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
105
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20120222164124')[0m
|
106
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110923024431')
|
107
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110928013630')[0m
|