removing establish_connection from migrations, this gotta be a manual process
Oleg
committed Sep 08, 2011
commit 675f3deeb9eb93bf8c714a865a0269447641e7cf
Showing 6
changed files with
1 additions
and 18 deletions
app/views/cms_admin/pages/_form.html.erb
+1
-2
| @@ | @@ -25,10 +25,9 @@ |
| <%= form.select :target_page_id, [["---- #{t('.select_target_page')} ----", nil]] + options %> | |
| <% end %> | |
| <%= cms_hook :page_form, :object => form %> | |
| + | <%= render :partial => 'cms_admin/categories/form', :object => form %> |
| </div> | |
| - | <%= render :partial => 'cms_admin/categories/form', :object => form %> |
| - | |
| <%= render :partial => 'form_blocks' %> | |
| <%= form.simple_field nil, nil, :class => 'submit_element' do %> | |
migrate/01_create_cms.rb b/db/migrate/01_create_cms.rb
+0
-8
| @@ | @@ -1,9 +1,6 @@ |
| class CreateCms < ActiveRecord::Migration | |
| def self.up | |
| - | |
| - | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| - | |
| # -- Sites -------------------------------------------------------------- | |
| create_table :cms_sites do |t| | |
| t.string :label | |
| @@ | @@ -107,13 +104,9 @@ class CreateCms < ActiveRecord::Migration |
| end | |
| add_index :cms_categorizations, [:category_id, :categorized_type, :categorized_id], :unique => true, | |
| :name => 'index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id' | |
| - | |
| end | |
| def self.down | |
| - | |
| - | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| - | |
| drop_table :cms_sites | |
| drop_table :cms_layouts | |
| drop_table :cms_pages | |
| @@ | @@ -123,6 +116,5 @@ class CreateCms < ActiveRecord::Migration |
| drop_table :cms_revisions | |
| drop_table :cms_categories | |
| drop_table :cms_categorizations | |
| - | |
| end | |
| end | |
migrate/upgrades/02_upgrade_to_1_1_0.rb b/db/migrate/upgrades/02_upgrade_to_1_1_0.rb
+0
-2
| @@ | @@ -1,6 +1,5 @@ |
| class UpgradeTo110 < ActiveRecord::Migration | |
| def self.up | |
| - | 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 +9,6 @@ class UpgradeTo110 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | 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
+0
-2
| @@ | @@ -1,6 +1,5 @@ |
| class UpgradeTo120 < ActiveRecord::Migration | |
| def self.up | |
| - | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| create_table :cms_revisions, :force => true do |t| | |
| t.string :record_type | |
| t.integer :record_id | |
| @@ | @@ -11,7 +10,6 @@ class UpgradeTo120 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | 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
+0
-2
| @@ | @@ -1,6 +1,5 @@ |
| class UpgradeTo130 < ActiveRecord::Migration | |
| def self.up | |
| - | 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 +11,6 @@ class UpgradeTo130 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | 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
+0
-2
| @@ | @@ -1,6 +1,5 @@ |
| class UpgradeTo140 < ActiveRecord::Migration | |
| def self.up | |
| - | 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 +22,6 @@ class UpgradeTo140 < ActiveRecord::Migration |
| end | |
| def self.down | |
| - | ComfortableMexicanSofa.establish_connection(ActiveRecord::Base) |
| remove_index :cms_files, [:site_id, :label] | |
| remove_column :cms_files, :description | |
| remove_column :cms_files, :label | |