pg_schema 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +38 -0
- data/lib/pg_schema/version.rb +1 -1
- data/pg_schema.gemspec +2 -2
- metadata +4 -3
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Features
|
2
|
+
|
3
|
+
* Automatically sets fully qualified table_name for all models
|
4
|
+
* Adds a schema aware db:create_with_schema rake task
|
5
|
+
|
6
|
+
# Installation
|
7
|
+
|
8
|
+
Add the gem to your gemfile
|
9
|
+
|
10
|
+
gem 'pg_schema'
|
11
|
+
|
12
|
+
Run install generator
|
13
|
+
|
14
|
+
rails g pg_schema:install
|
15
|
+
|
16
|
+
Add a schema search path to your database.yml
|
17
|
+
|
18
|
+
...
|
19
|
+
host: localhost
|
20
|
+
database: my_project_dev
|
21
|
+
schema_search_path: my_schema
|
22
|
+
...
|
23
|
+
|
24
|
+
Create db and schema
|
25
|
+
|
26
|
+
rake db:create_with_schema
|
27
|
+
|
28
|
+
Test in console
|
29
|
+
|
30
|
+
>> Model.table_name
|
31
|
+
>> "my_schema.models"
|
32
|
+
|
33
|
+
# Issues
|
34
|
+
|
35
|
+
* Running the pg_schema:install with the schema_search_path set may break if the
|
36
|
+
database already exists but the specified schema doesn't. Remove the
|
37
|
+
schema_search_path from your database.yml, run pg_schema:install, then add the
|
38
|
+
search path back before running db:create_with_schema.
|
data/lib/pg_schema/version.rb
CHANGED
data/pg_schema.gemspec
CHANGED
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = PgSchema::VERSION
|
8
8
|
s.authors = ["Alex Skryl"]
|
9
9
|
s.email = ["rut216@gmail.com"]
|
10
|
-
s.homepage = "http://skryl
|
10
|
+
s.homepage = "http://github.com/skryl/pg_schema"
|
11
11
|
s.summary = %q{Postgres schema support}
|
12
|
-
s.description = %q{Support for postgres
|
12
|
+
s.description = %q{Support for postgres schemas}
|
13
13
|
|
14
14
|
s.rubyforge_project = "pg_schema"
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: Support for postgres
|
14
|
+
description: Support for postgres schemas
|
15
15
|
email:
|
16
16
|
- rut216@gmail.com
|
17
17
|
executables: []
|
@@ -22,6 +22,7 @@ files:
|
|
22
22
|
- .rvmrc
|
23
23
|
- Gemfile
|
24
24
|
- LICENSE.txt
|
25
|
+
- README.md
|
25
26
|
- Rakefile
|
26
27
|
- lib/generators/pg_schema/install_generator.rb
|
27
28
|
- lib/generators/pg_schema/templates/lib/pg_schema.rake
|
@@ -29,7 +30,7 @@ files:
|
|
29
30
|
- lib/pg_schema/postgresql_adapter.rb
|
30
31
|
- lib/pg_schema/version.rb
|
31
32
|
- pg_schema.gemspec
|
32
|
-
homepage: http://skryl
|
33
|
+
homepage: http://github.com/skryl/pg_schema
|
33
34
|
licenses: []
|
34
35
|
post_install_message:
|
35
36
|
rdoc_options: []
|