acts_as_nested_interval 0.0.10 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,11 +1,7 @@
1
- [![Build Status](https://secure.travis-ci.org/clyfe/acts_as_nested_interval.png)](http://travis-ci.org/clyfe/acts_as_nested_interval)
2
-
3
- # ActsAsNestedInterval
1
+ # ActsAsNestedInterval [![Build Status](https://secure.travis-ci.org/clyfe/acts_as_nested_interval.png)](http://travis-ci.org/clyfe/acts_as_nested_interval)
4
2
 
5
3
  ## About
6
4
 
7
- Pythonic's acts_as_nested_interval updated to Rails 3 and gemified.
8
-
9
5
  This act implements a nested-interval tree.
10
6
  You can find all descendants or all ancestors with just one select query.
11
7
  You can insert and delete records without
@@ -15,6 +11,9 @@ Nested sets/intervals are good if you need to sort in preorder at DB-level.
15
11
  If you don't need that give a look to https://github.com/stefankroes/ancestry ,
16
12
  that implements a simpler encoding model (variant of materialized path).
17
13
 
14
+ If your database supports recursive queryes (`WITH RECURSIVE`) or specific custom extensions
15
+ (`CONNECT BY`, ltree) and you don't need portability, you're probably better off using those.
16
+
18
17
 
19
18
  ## Install
20
19
 
@@ -38,13 +37,13 @@ Example:
38
37
  ```ruby
39
38
  create_table :regions do |t|
40
39
  t.integer :parent_id
41
- t.integer :lftp, :null => false
42
- t.integer :lftq, :null => false
43
- t.integer :rgtp, :null => false
44
- t.integer :rgtq, :null => false
45
- t.float :lft, :null => false
46
- t.float :rgt, :null => false
47
- t.string :name, :null => false
40
+ t.integer :lftp, null: false
41
+ t.integer :lftq, null: false
42
+ t.integer :rgtp, null: false
43
+ t.integer :rgtq, null: false
44
+ t.decimal :lft, precision: 31, scale: 30, null: false
45
+ t.decimal :rgt, precision: 31, scale: 30, null: false
46
+ t.string :name, null: false
48
47
  end
49
48
  add_index :regions, :parent_id
50
49
  add_index :regions, :lftp
@@ -143,8 +142,8 @@ where x is the inverse of lftp modulo lftq.
143
142
 
144
143
  ## Moving nodes
145
144
 
146
- To move a record from `old.lftp, old.lftq` to `new.lftp, new.lftq`, apply this
147
- linear transform to lftp, lftq of all descendants:
145
+ To move a record from `old.lftp, old.lftq` to `new.lftp, new.lftq`,
146
+ the following linear transform is applied to lftp, lftq of all descendants:
148
147
 
149
148
  lftp := (old.lftq * new.rgtp - old.rgtq * new.lftp) * lftp
150
149
  + (old.rgtp * new.lftp - old.lftp * new.rgtp) * lftq
@@ -157,15 +156,17 @@ Example:
157
156
 
158
157
  ```ruby
159
158
  pacific = Region.create :name => "Pacific", :parent => earth
159
+ ActiveRecord::Base.connection.execute("LOCK TABLES regions WRITE")
160
160
  oceania.parent = pacific
161
161
  oceania.save!
162
+ ActiveRecord::Base.connection.execute("UNLOCK TABLES")
162
163
  ```
163
164
 
164
165
  ## Migrating from acts_as_tree
165
166
 
166
167
  If you come from acts_as_tree or another system where you only have a parent_id,
167
- to rebuild the intervals based on `acts_as_nested_set`, after you migrated the DB
168
- and created the columns required by `acts_as_nested_set` run:
168
+ to rebuild the intervals based on `acts_as_nested_interval`, after you migrated the DB
169
+ and created the columns required by `acts_as_nested_interval` run:
169
170
 
170
171
  ```ruby
171
172
  Region.rebuild_nested_interval_tree!
@@ -37,14 +37,14 @@ module ActsAsNestedInterval
37
37
  belongs_to :parent, class_name: name, foreign_key: nested_interval_foreign_key
38
38
  has_many :children, class_name: name, foreign_key: nested_interval_foreign_key,
39
39
  dependent: nested_interval_dependent
40
- scope :roots, where(nested_interval_foreign_key => nil)
40
+ scope :roots, -> { where(nested_interval_foreign_key => nil) }
41
41
 
42
42
  if columns_hash["rgt"]
43
- scope :preorder, order('rgt DESC, lftp ASC')
43
+ scope :preorder, -> { order('rgt DESC, lftp ASC') }
44
44
  elsif columns_hash["rgtp"] && columns_hash["rgtq"]
45
- scope :preorder, order('1.0 * rgtp / rgtq DESC, lftp ASC')
45
+ scope :preorder, -> { order('1.0 * rgtp / rgtq DESC, lftp ASC') }
46
46
  else
47
- scope :preorder, order('nested_interval_rgt(lftp, lftq) DESC, lftp ASC')
47
+ scope :preorder, -> { order('nested_interval_rgt(lftp, lftq) DESC, lftp ASC') }
48
48
  end
49
49
 
50
50
  before_create :create_nested_interval
@@ -1,3 +1,3 @@
1
1
  module ActsAsNestedInterval
2
- VERSION = "0.0.10"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_nested_interval
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,24 +10,30 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-08 00:00:00.000000000 Z
13
+ date: 2013-06-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - ~>
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.2.1
23
+ - - <
24
+ - !ruby/object:Gem::Version
25
+ version: '5'
23
26
  type: :runtime
24
27
  prerelease: false
25
28
  version_requirements: !ruby/object:Gem::Requirement
26
29
  none: false
27
30
  requirements:
28
- - - ~>
31
+ - - ! '>='
29
32
  - !ruby/object:Gem::Version
30
33
  version: 3.2.1
34
+ - - <
35
+ - !ruby/object:Gem::Version
36
+ version: '5'
31
37
  - !ruby/object:Gem::Dependency
32
38
  name: sqlite3
33
39
  requirement: !ruby/object:Gem::Requirement
@@ -84,55 +90,51 @@ executables: []
84
90
  extensions: []
85
91
  extra_rdoc_files: []
86
92
  files:
87
- - lib/acts_as_nested_interval.rb
88
- - lib/acts_as_nested_interval/core_ext/integer.rb
89
- - lib/acts_as_nested_interval/version.rb
90
93
  - lib/acts_as_nested_interval/class_methods.rb
91
94
  - lib/acts_as_nested_interval/instance_methods.rb
95
+ - lib/acts_as_nested_interval/core_ext/integer.rb
96
+ - lib/acts_as_nested_interval/version.rb
97
+ - lib/acts_as_nested_interval.rb
92
98
  - lib/tasks/acts_as_nested_interval_tasks.rake
93
99
  - MIT-LICENSE
94
100
  - Rakefile
95
101
  - README.md
96
- - test/test_helper.rb
97
- - test/acts_as_nested_interval_test.rb
98
- - test/dummy/test/unit/region_test.rb
99
- - test/dummy/test/fixtures/regions.yml
100
102
  - test/dummy/script/rails
101
- - test/dummy/db/development.sqlite3
102
- - test/dummy/db/schema.rb
103
- - test/dummy/db/test.sqlite3
104
- - test/dummy/db/migrate/20121004204252_change_interval_precision.rb
105
- - test/dummy/db/migrate/20120302143528_create_regions.rb
106
- - test/dummy/app/controllers/application_controller.rb
107
- - test/dummy/app/views/layouts/application.html.erb
108
- - test/dummy/app/helpers/application_helper.rb
109
- - test/dummy/app/models/region.rb
110
103
  - test/dummy/app/assets/javascripts/application.js
111
104
  - test/dummy/app/assets/stylesheets/application.css
112
- - test/dummy/README.rdoc
113
- - test/dummy/config/application.rb
105
+ - test/dummy/app/models/region.rb
106
+ - test/dummy/app/views/layouts/application.html.erb
107
+ - test/dummy/app/controllers/application_controller.rb
108
+ - test/dummy/app/helpers/application_helper.rb
109
+ - test/dummy/db/migrate/20120302143528_create_regions.rb
110
+ - test/dummy/db/migrate/20121004204252_change_interval_precision.rb
111
+ - test/dummy/db/schema.rb
112
+ - test/dummy/Rakefile
113
+ - test/dummy/config.ru
114
+ - test/dummy/test/unit/region_test.rb
115
+ - test/dummy/test/fixtures/regions.yml
114
116
  - test/dummy/config/database.yml
115
117
  - test/dummy/config/initializers/inflections.rb
116
- - test/dummy/config/initializers/mime_types.rb
117
118
  - test/dummy/config/initializers/session_store.rb
119
+ - test/dummy/config/initializers/mime_types.rb
120
+ - test/dummy/config/initializers/wrap_parameters.rb
118
121
  - test/dummy/config/initializers/secret_token.rb
119
122
  - test/dummy/config/initializers/backtrace_silencers.rb
120
- - test/dummy/config/initializers/wrap_parameters.rb
121
- - test/dummy/config/routes.rb
122
- - test/dummy/config/environments/production.rb
123
+ - test/dummy/config/boot.rb
124
+ - test/dummy/config/locales/en.yml
123
125
  - test/dummy/config/environments/test.rb
124
126
  - test/dummy/config/environments/development.rb
125
- - test/dummy/config/boot.rb
127
+ - test/dummy/config/environments/production.rb
126
128
  - test/dummy/config/environment.rb
127
- - test/dummy/config/locales/en.yml
128
- - test/dummy/public/404.html
129
+ - test/dummy/config/application.rb
130
+ - test/dummy/config/routes.rb
131
+ - test/dummy/README.rdoc
132
+ - test/dummy/public/favicon.ico
129
133
  - test/dummy/public/422.html
130
134
  - test/dummy/public/500.html
131
- - test/dummy/public/favicon.ico
132
- - test/dummy/Rakefile
133
- - test/dummy/config.ru
134
- - test/dummy/log/test.log
135
- - test/dummy/log/development.log
135
+ - test/dummy/public/404.html
136
+ - test/test_helper.rb
137
+ - test/acts_as_nested_interval_test.rb
136
138
  homepage: https://github.com/clyfe/acts_as_nested_interval
137
139
  licenses: []
138
140
  post_install_message:
@@ -153,48 +155,45 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
155
  version: '0'
154
156
  requirements: []
155
157
  rubyforge_project:
156
- rubygems_version: 1.8.19
158
+ rubygems_version: 1.8.23
157
159
  signing_key:
158
160
  specification_version: 3
159
161
  summary: Encode Trees in RDBMS using nested interval method.
160
162
  test_files:
161
- - test/test_helper.rb
162
- - test/acts_as_nested_interval_test.rb
163
- - test/dummy/test/unit/region_test.rb
164
- - test/dummy/test/fixtures/regions.yml
165
163
  - test/dummy/script/rails
166
- - test/dummy/db/development.sqlite3
167
- - test/dummy/db/schema.rb
168
- - test/dummy/db/test.sqlite3
169
- - test/dummy/db/migrate/20121004204252_change_interval_precision.rb
170
- - test/dummy/db/migrate/20120302143528_create_regions.rb
171
- - test/dummy/app/controllers/application_controller.rb
172
- - test/dummy/app/views/layouts/application.html.erb
173
- - test/dummy/app/helpers/application_helper.rb
174
- - test/dummy/app/models/region.rb
175
164
  - test/dummy/app/assets/javascripts/application.js
176
165
  - test/dummy/app/assets/stylesheets/application.css
177
- - test/dummy/README.rdoc
178
- - test/dummy/config/application.rb
166
+ - test/dummy/app/models/region.rb
167
+ - test/dummy/app/views/layouts/application.html.erb
168
+ - test/dummy/app/controllers/application_controller.rb
169
+ - test/dummy/app/helpers/application_helper.rb
170
+ - test/dummy/db/migrate/20120302143528_create_regions.rb
171
+ - test/dummy/db/migrate/20121004204252_change_interval_precision.rb
172
+ - test/dummy/db/schema.rb
173
+ - test/dummy/Rakefile
174
+ - test/dummy/config.ru
175
+ - test/dummy/test/unit/region_test.rb
176
+ - test/dummy/test/fixtures/regions.yml
179
177
  - test/dummy/config/database.yml
180
178
  - test/dummy/config/initializers/inflections.rb
181
- - test/dummy/config/initializers/mime_types.rb
182
179
  - test/dummy/config/initializers/session_store.rb
180
+ - test/dummy/config/initializers/mime_types.rb
181
+ - test/dummy/config/initializers/wrap_parameters.rb
183
182
  - test/dummy/config/initializers/secret_token.rb
184
183
  - test/dummy/config/initializers/backtrace_silencers.rb
185
- - test/dummy/config/initializers/wrap_parameters.rb
186
- - test/dummy/config/routes.rb
187
- - test/dummy/config/environments/production.rb
184
+ - test/dummy/config/boot.rb
185
+ - test/dummy/config/locales/en.yml
188
186
  - test/dummy/config/environments/test.rb
189
187
  - test/dummy/config/environments/development.rb
190
- - test/dummy/config/boot.rb
188
+ - test/dummy/config/environments/production.rb
191
189
  - test/dummy/config/environment.rb
192
- - test/dummy/config/locales/en.yml
193
- - test/dummy/public/404.html
190
+ - test/dummy/config/application.rb
191
+ - test/dummy/config/routes.rb
192
+ - test/dummy/README.rdoc
193
+ - test/dummy/public/favicon.ico
194
194
  - test/dummy/public/422.html
195
195
  - test/dummy/public/500.html
196
- - test/dummy/public/favicon.ico
197
- - test/dummy/Rakefile
198
- - test/dummy/config.ru
199
- - test/dummy/log/test.log
200
- - test/dummy/log/development.log
196
+ - test/dummy/public/404.html
197
+ - test/test_helper.rb
198
+ - test/acts_as_nested_interval_test.rb
199
+ has_rdoc:
Binary file
Binary file
@@ -1,291 +0,0 @@
1
-  (0.1ms) select sqlite_version(*)
2
-  (116.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
-  (0.1ms) PRAGMA index_list("schema_migrations")
4
-  (60.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
- Migrating to CreateRegions (20120302143528)
7
-  (0.1ms) begin transaction
8
-  (0.5ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
9
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120302143528')
10
-  (71.9ms) commit transaction
11
-  (0.6ms) select sqlite_version(*)
12
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
13
-  (0.0ms) PRAGMA index_list("regions")
14
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
15
-  (0.2ms) select sqlite_version(*)
16
-  (163.5ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
17
-  (78.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
18
-  (0.1ms) PRAGMA index_list("schema_migrations")
19
-  (99.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
20
-  (0.2ms) SELECT version FROM "schema_migrations"
21
-  (75.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
22
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
23
-  (0.2ms) select sqlite_version(*)
24
-  (216.1ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
25
-  (177.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
26
-  (0.1ms) PRAGMA index_list("schema_migrations")
27
-  (157.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
28
-  (0.2ms) SELECT version FROM "schema_migrations"
29
-  (254.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
30
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
31
-  (0.2ms) select sqlite_version(*)
32
-  (213.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
33
-  (187.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
34
-  (0.2ms) PRAGMA index_list("schema_migrations")
35
-  (166.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36
-  (0.2ms) SELECT version FROM "schema_migrations"
37
-  (165.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
38
- SQLite3::ConstraintException: regions.name may not be NULL: INSERT INTO "regions" ("fiction", "lft", "lftp", "lftq", "name", "region_id", "rgt", "rgtp", "rgtq") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
39
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
40
-  (0.2ms) select sqlite_version(*)
41
-  (203.5ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
42
-  (144.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
43
-  (0.1ms) PRAGMA index_list("schema_migrations")
44
-  (144.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
45
-  (0.2ms) SELECT version FROM "schema_migrations"
46
-  (156.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
47
-  (0.1ms) select sqlite_version(*)
48
-  (192.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
49
-  (0.1ms) PRAGMA index_list("schema_migrations")
50
-  (155.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
51
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
52
-  (0.1ms) select sqlite_version(*)
53
-  (163.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
54
-  (0.0ms) PRAGMA index_list("schema_migrations")
55
-  (156.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
56
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
57
- Migrating to CreateRegions (20120302143528)
58
-  (0.1ms) begin transaction
59
-  (0.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
60
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120302143528')
61
-  (156.1ms) commit transaction
62
-  (0.2ms) select sqlite_version(*)
63
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
64
-  (0.0ms) PRAGMA index_list("regions")
65
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
66
-  (0.2ms) select sqlite_version(*)
67
-  (177.0ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
68
-  (156.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
69
-  (0.1ms) PRAGMA index_list("schema_migrations")
70
-  (155.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
71
-  (0.2ms) SELECT version FROM "schema_migrations"
72
-  (154.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
73
-  (0.1ms) select sqlite_version(*)
74
-  (259.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
75
-  (0.1ms) PRAGMA index_list("schema_migrations")
76
-  (211.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
77
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
78
- Migrating to CreateRegions (20120302143528)
79
-  (0.1ms) begin transaction
80
-  (0.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
81
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120302143528')
82
-  (153.4ms) commit transaction
83
-  (0.6ms) select sqlite_version(*)
84
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
85
-  (0.1ms) PRAGMA index_list("regions")
86
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
87
-  (0.2ms) select sqlite_version(*)
88
-  (163.6ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
89
-  (144.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
90
-  (0.1ms) PRAGMA index_list("schema_migrations")
91
-  (177.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
92
-  (0.2ms) SELECT version FROM "schema_migrations"
93
-  (145.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
94
-  (0.1ms) select sqlite_version(*)
95
-  (161.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
96
-  (0.0ms) PRAGMA index_list("schema_migrations")
97
-  (156.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
98
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
99
- Migrating to CreateRegions (20120302143528)
100
-  (0.1ms) begin transaction
101
-  (0.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
102
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120302143528')
103
-  (160.7ms) commit transaction
104
-  (0.6ms) select sqlite_version(*)
105
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
106
-  (0.1ms) PRAGMA index_list("regions")
107
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
108
-  (0.2ms) select sqlite_version(*)
109
-  (160.2ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
110
-  (156.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
111
-  (0.1ms) PRAGMA index_list("schema_migrations")
112
-  (200.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
113
-  (0.2ms) SELECT version FROM "schema_migrations"
114
-  (166.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
115
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
116
-  (0.2ms) select sqlite_version(*)
117
-  (179.3ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
118
-  (155.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
119
-  (0.1ms) PRAGMA index_list("schema_migrations")
120
-  (168.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
121
-  (0.2ms) SELECT version FROM "schema_migrations"
122
-  (166.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
123
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
124
-  (0.2ms) select sqlite_version(*)
125
-  (198.5ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
126
-  (166.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
127
-  (0.0ms) PRAGMA index_list("schema_migrations")
128
-  (167.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
129
-  (0.1ms) SELECT version FROM "schema_migrations"
130
-  (167.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
131
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
132
-  (0.2ms) select sqlite_version(*)
133
-  (179.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
134
-  (199.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
135
-  (0.1ms) PRAGMA index_list("schema_migrations")
136
-  (166.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
137
-  (0.2ms) SELECT version FROM "schema_migrations"
138
-  (166.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
139
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
140
-  (0.2ms) select sqlite_version(*)
141
-  (182.0ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
142
-  (156.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
143
-  (0.0ms) PRAGMA index_list("schema_migrations")
144
-  (178.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
145
-  (0.2ms) SELECT version FROM "schema_migrations"
146
-  (188.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
147
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
148
-  (0.2ms) select sqlite_version(*)
149
-  (183.0ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
150
-  (166.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
151
-  (0.1ms) PRAGMA index_list("schema_migrations")
152
-  (167.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
153
-  (0.2ms) SELECT version FROM "schema_migrations"
154
-  (177.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
155
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
156
- Migrating to CreateRegions (20120302143528)
157
-  (0.2ms) select sqlite_version(*)
158
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
159
-  (0.0ms) PRAGMA index_list("regions")
160
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
161
-  (0.2ms) select sqlite_version(*)
162
-  (178.2ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
163
-  (166.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
164
-  (0.1ms) PRAGMA index_list("schema_migrations")
165
-  (189.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
166
-  (0.2ms) SELECT version FROM "schema_migrations"
167
-  (189.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
168
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
169
- Migrating to CreateRegions (20120302143528)
170
-  (0.2ms) select sqlite_version(*)
171
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
172
-  (0.0ms) PRAGMA index_list("regions")
173
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
174
-  (0.2ms) select sqlite_version(*)
175
-  (274.2ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
176
-  (167.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
177
-  (0.1ms) PRAGMA index_list("schema_migrations")
178
-  (133.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
179
-  (0.2ms) SELECT version FROM "schema_migrations"
180
-  (132.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
181
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
182
-  (0.2ms) select sqlite_version(*)
183
-  (166.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
184
-  (166.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
185
-  (0.1ms) PRAGMA index_list("schema_migrations")
186
-  (167.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
187
-  (0.2ms) SELECT version FROM "schema_migrations"
188
-  (143.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
189
-  (0.1ms) select sqlite_version(*)
190
-  (183.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
191
-  (0.1ms) PRAGMA index_list("schema_migrations")
192
-  (155.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
193
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
194
- Migrating to CreateRegions (20120302143528)
195
-  (0.1ms) begin transaction
196
-  (0.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
197
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120302143528')
198
-  (160.5ms) commit transaction
199
-  (0.2ms) select sqlite_version(*)
200
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
201
-  (0.0ms) PRAGMA index_list("regions")
202
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
203
-  (0.2ms) select sqlite_version(*)
204
-  (226.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
205
-  (144.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
206
-  (0.1ms) PRAGMA index_list("schema_migrations")
207
-  (144.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
208
-  (0.1ms) SELECT version FROM "schema_migrations"
209
-  (156.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
210
-  (0.1ms) select sqlite_version(*)
211
-  (184.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
212
-  (0.0ms) PRAGMA index_list("schema_migrations")
213
-  (156.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
214
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
215
- Migrating to CreateRegions (20120302143528)
216
-  (0.1ms) begin transaction
217
-  (0.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
218
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120302143528')
219
-  (130.3ms) commit transaction
220
-  (0.2ms) select sqlite_version(*)
221
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
222
-  (0.1ms) PRAGMA index_list("regions")
223
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
224
-  (0.2ms) select sqlite_version(*)
225
-  (194.1ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
226
-  (145.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
227
-  (0.0ms) PRAGMA index_list("schema_migrations")
228
-  (167.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
229
-  (0.2ms) SELECT version FROM "schema_migrations"
230
-  (165.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
231
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
232
-  (0.2ms) select sqlite_version(*)
233
-  (195.4ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL) 
234
-  (166.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
235
-  (0.1ms) PRAGMA index_list("schema_migrations")
236
-  (156.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
237
-  (0.2ms) SELECT version FROM "schema_migrations"
238
-  (154.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
239
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
240
- Migrating to CreateRegions (20120302143528)
241
- Migrating to ChangeIntervalPrecision (20121004204252)
242
-  (0.2ms) select sqlite_version(*)
243
-  (0.1ms) begin transaction
244
-  (0.5ms) CREATE TEMPORARY TABLE "altered_regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" float NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL)
245
-  (0.1ms) PRAGMA index_list("regions")
246
-  (0.1ms) SELECT * FROM "regions"
247
-  (0.2ms) DROP TABLE "regions"
248
-  (0.2ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL)
249
-  (0.0ms) PRAGMA index_list("altered_regions")
250
-  (0.1ms) SELECT * FROM "altered_regions"
251
-  (55.4ms) DROP TABLE "altered_regions"
252
-  (0.2ms) CREATE TEMPORARY TABLE "altered_regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" float NOT NULL, "name" varchar(255) NOT NULL)
253
-  (0.0ms) PRAGMA index_list("regions")
254
-  (0.1ms) SELECT * FROM "regions"
255
-  (0.1ms) DROP TABLE "regions"
256
-  (0.1ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL)
257
-  (0.0ms) PRAGMA index_list("altered_regions")
258
-  (0.1ms) SELECT * FROM "altered_regions"
259
-  (0.1ms) DROP TABLE "altered_regions"
260
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121004204252')
261
-  (268.2ms) commit transaction
262
-  (0.3ms) select sqlite_version(*)
263
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
264
-  (0.0ms) PRAGMA index_list("regions")
265
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
266
-  (0.2ms) select sqlite_version(*)
267
-  (180.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL) 
268
-  (165.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
269
-  (0.1ms) PRAGMA index_list("schema_migrations")
270
-  (166.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
271
-  (0.2ms) SELECT version FROM "schema_migrations"
272
-  (143.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20121004204252')
273
-  (145.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
274
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
275
-  (0.2ms) select sqlite_version(*)
276
-  (172.9ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL) 
277
-  (166.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
278
-  (0.2ms) PRAGMA index_list("schema_migrations")
279
-  (189.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
280
-  (0.1ms) SELECT version FROM "schema_migrations"
281
-  (166.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20121004204252')
282
-  (156.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')
283
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
284
-  (0.2ms) select sqlite_version(*)
285
-  (182.0ms) CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "fiction" boolean DEFAULT 'f' NOT NULL, "region_id" integer, "lftp" integer NOT NULL, "lftq" integer NOT NULL, "rgtp" integer NOT NULL, "rgtq" integer NOT NULL, "lft" decimal(31,30) NOT NULL, "rgt" decimal(31,30) NOT NULL, "name" varchar(255) NOT NULL) 
286
-  (156.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
287
-  (0.1ms) PRAGMA index_list("schema_migrations")
288
-  (189.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
289
-  (0.2ms) SELECT version FROM "schema_migrations"
290
-  (243.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20121004204252')
291
-  (211.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120302143528')