rails_structure_loading 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tasks/rails_structure_loading.rb +8 -2
- metadata +2 -2
@@ -48,9 +48,10 @@ namespace :db do
|
|
48
48
|
opts << "--data-only"
|
49
49
|
opts << "--column-inserts"
|
50
50
|
opts << "--exclude-table=schema_migrations"
|
51
|
+
opts << "--no-owner"
|
51
52
|
opts << "-U #{conf["username"]}" if conf["username"]
|
52
53
|
opts = opts.join(" ")
|
53
|
-
`pg_dump #{opts} #{conf["database"]} > #{domain}`
|
54
|
+
`pg_dump #{opts} #{conf["database"]} | grep -v '^--' | cat -s > #{domain}`
|
54
55
|
end
|
55
56
|
end
|
56
57
|
end
|
@@ -66,9 +67,14 @@ namespace :db do
|
|
66
67
|
desc "Dump the structure after a migration"
|
67
68
|
task :migrate do
|
68
69
|
Rake::Task["db:structure:dump"].invoke if ActiveRecord::Base.schema_format == :sql
|
69
|
-
|
70
|
+
end
|
71
|
+
|
72
|
+
namespace :migrate do
|
73
|
+
desc "Dump the domain when a migrate-reset is run"
|
74
|
+
task :reset do
|
70
75
|
Rake::Task["db:domain:dump"].invoke if ActiveRecord::Base.schema_format == :sql
|
71
76
|
end
|
72
77
|
end
|
78
|
+
|
73
79
|
end
|
74
80
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_structure_loading
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Gauthier
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-30 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|