torque-postgresql 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/torque/postgresql/adapter/schema_creation.rb +3 -9
- data/lib/torque/postgresql/auxiliary_statement/recursive.rb +149 -0
- data/lib/torque/postgresql/auxiliary_statement/settings.rb +74 -22
- data/lib/torque/postgresql/auxiliary_statement.rb +39 -40
- data/lib/torque/postgresql/base.rb +11 -1
- data/lib/torque/postgresql/config.rb +4 -0
- data/lib/torque/postgresql/inheritance.rb +3 -1
- data/lib/torque/postgresql/railtie.rb +5 -1
- data/lib/torque/postgresql/relation/auxiliary_statement.rb +28 -15
- data/lib/torque/postgresql/version.rb +1 -1
- data/spec/models/category.rb +2 -0
- data/spec/schema.rb +7 -1
- data/spec/tests/auxiliary_statement_spec.rb +374 -35
- metadata +5 -2
data/spec/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
version =
|
13
|
+
version = 2
|
14
14
|
|
15
15
|
return if ActiveRecord::Migrator.current_version == version
|
16
16
|
ActiveRecord::Schema.define(version: version) do
|
@@ -69,6 +69,11 @@ ActiveRecord::Schema.define(version: version) do
|
|
69
69
|
t.enum "specialty", enum_type: :specialties
|
70
70
|
end
|
71
71
|
|
72
|
+
create_table "categories", force: :cascade do |t|
|
73
|
+
t.integer "parent_id"
|
74
|
+
t.string "title"
|
75
|
+
end
|
76
|
+
|
72
77
|
create_table "texts", force: :cascade do |t|
|
73
78
|
t.integer "user_id"
|
74
79
|
t.string "content"
|
@@ -86,6 +91,7 @@ ActiveRecord::Schema.define(version: version) do
|
|
86
91
|
end
|
87
92
|
|
88
93
|
create_table "courses", force: :cascade do |t|
|
94
|
+
t.integer "category_id"
|
89
95
|
t.string "title", null: false
|
90
96
|
t.interval "duration"
|
91
97
|
t.enum "types", enum_type: :types, array: true
|