fixed migration files for database_config
Jeremy Steinberg
committed Sep 01, 2011
commit 500121c824106138f3b0de3a52ef0bd9fc9b165a
Showing 5
changed files with
10 additions
and 10 deletions
migrate/01_create_cms.rb b/db/migrate/01_create_cms.rb
+2
-2
| @@ | @@ -2,7 +2,7 @@ class CreateCms < ActiveRecord::Migration |
| def self.up | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| # -- Sites -------------------------------------------------------------- | |
| create_table :cms_sites do |t| | |
| @@ | @@ -111,7 +111,7 @@ class CreateCms < ActiveRecord::Migration |
| def self.down | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| drop_table :cms_sites | |
| drop_table :cms_layouts | |
migrate/upgrades/02_upgrade_to_1_1_0.rb b/db/migrate/upgrades/02_upgrade_to_1_1_0.rb
+2
-2
| @@ | @@ -1,6 +1,6 @@ |
| class UpgradeTo110 < ActiveRecord::Migration | |
| def self.up | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| rename_column :cms_layouts, :cms_site_id, :site_id | |
| rename_column :cms_pages, :cms_site_id, :site_id | |
| rename_column :cms_pages, :cms_layout_id, :layout_id | |
| @@ | @@ -10,7 +10,7 @@ class UpgradeTo110 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| rename_column :cms_uploads, :site_id, :cms_site_id | |
| rename_column :cms_snippets, :site_id, :cms_site_id | |
| rename_column :cms_blocks, :page_id, :cms_page_id | |
migrate/upgrades/03_upgrade_to_1_2_0.rb b/db/migrate/upgrades/03_upgrade_to_1_2_0.rb
+2
-2
| @@ | @@ -1,6 +1,6 @@ |
| class UpgradeTo120 < ActiveRecord::Migration | |
| def self.up | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| create_table :cms_revisions, :force => true do |t| | |
| t.string :record_type | |
| t.integer :record_id | |
| @@ | @@ -11,7 +11,7 @@ class UpgradeTo120 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| drop_table :cms_revisions | |
| end | |
| end | |
| \ No newline at end of file | |
migrate/upgrades/04_upgrade_to_1_3_0.rb b/db/migrate/upgrades/04_upgrade_to_1_3_0.rb
+2
-2
| @@ | @@ -1,6 +1,6 @@ |
| class UpgradeTo130 < ActiveRecord::Migration | |
| def self.up | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| add_column :cms_sites, :is_mirrored, :boolean, :null => false, :default => false | |
| add_column :cms_sites, :path, :string | |
| add_column :cms_sites, :locale, :string, :null => false, :default => 'en' | |
| @@ | @@ -12,7 +12,7 @@ class UpgradeTo130 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| remove_index :cms_sites, :is_mirrored | |
| remove_column :cms_sites, :path | |
| remove_column :cms_sites, :is_mirrored | |
migrate/upgrades/05_upgrade_to_1_4_0.rb b/db/migrate/upgrades/05_upgrade_to_1_4_0.rb
+2
-2
| @@ | @@ -1,6 +1,6 @@ |
| class UpgradeTo140 < ActiveRecord::Migration | |
| def self.up | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| rename_table :cms_uploads, :cms_files | |
| add_column :cms_files, :label, :string | |
| add_column :cms_files, :description, :string, :limit => 2048 | |
| @@ | @@ -23,7 +23,7 @@ class UpgradeTo140 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | ComfortableMexicanSofa.establish_connection(self) |
| + | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| remove_index :cms_files, [:site_id, :label] | |
| remove_column :cms_files, :description | |
| remove_column :cms_files, :label | |