trollo 0.1.7 → 0.1.8
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/lib/generators/active_record/templates/migration.rb +11 -4
- data/lib/trollo.rb +1 -0
- data/lib/trollo/version.rb +1 -1
- data/spec/internal/db/schema.rb +11 -4
- metadata +1 -1
@@ -1,9 +1,18 @@
|
|
1
1
|
class CreateTrolloTables < ActiveRecord::Migration
|
2
2
|
def self.change
|
3
3
|
|
4
|
+
create_table :trollo_boards do |t|
|
5
|
+
t.string :name
|
6
|
+
t.timestamps
|
7
|
+
end
|
8
|
+
|
9
|
+
create_table :boards_lists do |t|
|
10
|
+
t.references :board
|
11
|
+
t.references :list
|
12
|
+
end
|
13
|
+
|
4
14
|
create_table :trollo_lists do |t|
|
5
15
|
t.string :name
|
6
|
-
t.references :trollable, polymorphic: true
|
7
16
|
t.timestamps
|
8
17
|
end
|
9
18
|
|
@@ -40,7 +49,7 @@ class CreateTrolloTables < ActiveRecord::Migration
|
|
40
49
|
end
|
41
50
|
|
42
51
|
create_table :trollo_subscriptions do |t|
|
43
|
-
t.references :
|
52
|
+
t.references :board
|
44
53
|
t.references :subscriber, polymorphic: true
|
45
54
|
end
|
46
55
|
|
@@ -58,8 +67,6 @@ class CreateTrolloTables < ActiveRecord::Migration
|
|
58
67
|
t.references :label
|
59
68
|
end
|
60
69
|
|
61
|
-
add_index :trollo_lists, [:trollable_type, :trollable_id]
|
62
|
-
|
63
70
|
add_index :trollo_cards, :list_id
|
64
71
|
add_index :trollo_cards, [:trollable_type, :trollable_id]
|
65
72
|
|
data/lib/trollo.rb
CHANGED
data/lib/trollo/version.rb
CHANGED
data/spec/internal/db/schema.rb
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
ActiveRecord::Schema.define do
|
2
|
+
|
3
|
+
create_table :trollo_boards do |t|
|
4
|
+
t.string :name
|
5
|
+
t.timestamps
|
6
|
+
end
|
7
|
+
|
8
|
+
create_table :boards_lists do |t|
|
9
|
+
t.references :board
|
10
|
+
t.references :list
|
11
|
+
end
|
2
12
|
|
3
13
|
create_table :trollo_lists do |t|
|
4
14
|
t.string :name
|
5
|
-
t.references :trollable, polymorphic: true
|
6
15
|
t.timestamps
|
7
16
|
end
|
8
17
|
|
@@ -39,7 +48,7 @@ ActiveRecord::Schema.define do
|
|
39
48
|
end
|
40
49
|
|
41
50
|
create_table :trollo_subscriptions do |t|
|
42
|
-
t.references :
|
51
|
+
t.references :board
|
43
52
|
t.references :subscriber, polymorphic: true
|
44
53
|
end
|
45
54
|
|
@@ -57,8 +66,6 @@ ActiveRecord::Schema.define do
|
|
57
66
|
t.references :label
|
58
67
|
end
|
59
68
|
|
60
|
-
add_index :trollo_lists, [:trollable_type, :trollable_id]
|
61
|
-
|
62
69
|
add_index :trollo_cards, :list_id
|
63
70
|
add_index :trollo_cards, [:trollable_type, :trollable_id]
|
64
71
|
|