Permalink
Browse files

added migrations to install generator

	new file:   lib/generators/goldencobra/templates/migrations/20120604141401_add_article_type_to_goldencobra_articles.rb
	new file:   lib/generators/goldencobra/templates/migrations/20120605082035_add_description_to_goldencobra_menues.rb
	new file:   lib/generators/goldencobra/templates/migrations/20120608095444_add_teaser_title_to_goldencobra_menue.rb
	new file:   lib/generators/goldencobra/templates/migrations/20120608121356_create_versions.rb
  • Loading branch information...
1 parent c26399f commit 68ff1204ea2a13e843217c1d5262eef105f905db @5minpause 5minpause committed Jun 11, 2012
@@ -0,0 +1,5 @@
+class AddArticleTypeToGoldencobraArticles < ActiveRecord::Migration
+ def change
+ add_column :goldencobra_articles, :article_type, :string
+ end
+end
@@ -0,0 +1,6 @@
+class AddDescriptionToGoldencobraMenues < ActiveRecord::Migration
+ def change
+ add_column :goldencobra_menues, :description, :text
+ add_column :goldencobra_menues, :call_to_action_name, :string
+ end
+end
@@ -0,0 +1,5 @@
+class AddTeaserTitleToGoldencobraMenue < ActiveRecord::Migration
+ def change
+ add_column :goldencobra_menues, :description_title, :string
+ end
+end
@@ -0,0 +1,18 @@
+class CreateVersions < ActiveRecord::Migration
+ def self.up
+ create_table :versions do |t|
+ t.string :item_type, :null => false
+ t.integer :item_id, :null => false
+ t.string :event, :null => false
+ t.string :whodunnit
+ t.text :object
+ t.datetime :created_at
+ end
+ add_index :versions, [:item_type, :item_id]
+ end
+
+ def self.down
+ remove_index :versions, [:item_type, :item_id]
+ drop_table :versions
+ end
+end

0 comments on commit 68ff120

Please sign in to comment.