multitenant-mysql 1.1.0 → 1.1.1
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/CHANGELOG.rdoc +2 -0
- data/README.rdoc +12 -11
- data/lib/generators/multitenant/migrations/migration_builder.rb +1 -1
- data/lib/multitenant-mysql/version.rb +1 -1
- metadata +3 -2
data/CHANGELOG.rdoc
ADDED
data/README.rdoc
CHANGED
@@ -74,20 +74,21 @@ if method used by `set_current_tenant` returns blank name then `root` account is
|
|
74
74
|
== Options and Notes
|
75
75
|
|
76
76
|
- if you have changed columns for tenant dependend models then you need to regenerate views, you could use generator
|
77
|
-
multitenant:views_and_triggers:refresh
|
77
|
+
multitenant:views_and_triggers:refresh
|
78
78
|
|
79
|
-
- if you want to use subdomain as a tenant name then you can use
|
80
|
-
|
79
|
+
- if you want to use subdomain as a tenant name then you can use method
|
80
|
+
set_current_tenant_by_subdomain
|
81
81
|
|
82
82
|
- list of available generators to manage views and triggers
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
83
|
+
|
84
|
+
multitenant:triggers:create
|
85
|
+
multitenant:triggers:drop
|
86
|
+
multitenant:triggers:refresh
|
87
|
+
multitenant:views:create
|
88
|
+
multitenant:views:drop
|
89
|
+
multitenant:views:refresh
|
90
|
+
multitenant:views_and_triggers:create
|
91
|
+
multitenant:views_and_triggers:refresh
|
91
92
|
|
92
93
|
== How It Works
|
93
94
|
|
@@ -10,7 +10,7 @@ module Multitenant
|
|
10
10
|
|
11
11
|
actions = Multitenant::Mysql.models.map { |model_name|
|
12
12
|
model = model_name.constantize
|
13
|
-
"add_column :#{model.
|
13
|
+
"add_column :#{model.original_table_name}, :tenant, :string"
|
14
14
|
}
|
15
15
|
|
16
16
|
dest_path = "db/migrate/#{migration_number}_#{MIGRATION_NAME}.rb"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multitenant-mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- .gitignore
|
38
38
|
- .rspec
|
39
39
|
- .travis.yml
|
40
|
+
- CHANGELOG.rdoc
|
40
41
|
- Gemfile
|
41
42
|
- LICENSE
|
42
43
|
- README.rdoc
|