adding migrations for upcoming is_shared functionality
Oleg
committed Jun 25, 2011
commit 1436200dffce83a67cd5434f76bb7f0db42e3932
Showing 3
changed files with
13 additions
and 2 deletions
app/assets/stylesheets/comfortable_mexican_sofa/structure.css
+1
-1
| @@ | @@ -14,7 +14,7 @@ html, body { |
| position: relative; | |
| margin: 0px 250px 0px 175px; | |
| min-height: 100%; | |
| - | background-color: #D8D8D8; |
| + | background-color: #e6e6e6; |
| } | |
| .center_column .center_column_content { | |
| padding: 25px; | |
migrate/01_create_cms.rb b/db/migrate/01_create_cms.rb
+4
-1
| @@ | @@ -22,7 +22,8 @@ class CreateCms < ActiveRecord::Migration |
| t.text :content | |
| t.text :css | |
| t.text :js | |
| - | t.integer :position, :null => false, :default => 0 |
| + | t.integer :position, :null => false, :default => 0 |
| + | t.boolean :is_shared, :null => false, :default => false |
| t.timestamps | |
| end | |
| add_index :cms_layouts, [:parent_id, :position] | |
| @@ | @@ -41,6 +42,7 @@ class CreateCms < ActiveRecord::Migration |
| t.integer :position, :null => false, :default => 0 | |
| t.integer :children_count, :null => false, :default => 0 | |
| t.boolean :is_published, :null => false, :default => true | |
| + | t.boolean :is_shared, :null => false, :default => false |
| t.timestamps | |
| end | |
| add_index :cms_pages, [:site_id, :full_path] | |
| @@ | @@ -61,6 +63,7 @@ class CreateCms < ActiveRecord::Migration |
| t.string :label | |
| t.string :slug | |
| t.text :content | |
| + | t.boolean :is_shared, :null => false, :default => false |
| t.timestamps | |
| end | |
| add_index :cms_snippets, [:site_id, :slug], :unique => true | |
migrate/upgrades/04_upgrade_to_1_3_0.rb b/db/migrate/upgrades/04_upgrade_to_1_3_0.rb
+8
-0
| @@ | @@ -4,6 +4,10 @@ class UpgradeTo130 < ActiveRecord::Migration |
| add_column :cms_sites, :path, :string | |
| add_column :cms_sites, :locale, :string, :null_false, :default => 'en' | |
| add_index :cms_sites, :is_mirrored | |
| + | |
| + | add_column :cms_layouts, :is_shared, :null => false, :default => false |
| + | add_column :cms_pages, :is_shared, :null => false, :default => false |
| + | add_column :cms_snippets, :is_shared, :null => false, :default => false |
| end | |
| def self.down | |
| @@ | @@ -11,5 +15,9 @@ class UpgradeTo130 < ActiveRecord::Migration |
| remove_column :cms_sites, :path | |
| remove_column :cms_sites, :is_mirrored | |
| remove_column :cms_sites, :locale | |
| + | |
| + | remove_column :cms_layouts, :is_shared |
| + | remove_column :cms_pages, :is_shared |
| + | remove_column :cms_snippets, :is_shared |
| end | |
| end | |
| \ No newline at end of file | |