aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-05-05 23:43:43 +1200
committerPhilip Arndt <parndt@gmail.com>2011-05-05 23:44:05 +1200
commit1ae97bb9b1f4199d2b840bed982a9bb71d7c8c91 (patch)
tree4251103a4b436598f5cafd9f909cf0c5b998d823 /db
parent03e105b9e061ca658e0c8f3a3a05378390be4218 (diff)
downloadrefinerycms-blog-1ae97bb9b1f4199d2b840bed982a9bb71d7c8c91.tar.gz
refinerycms-blog-1ae97bb9b1f4199d2b840bed982a9bb71d7c8c91.tar.bz2
refinerycms-blog-1ae97bb9b1f4199d2b840bed982a9bb71d7c8c91.zip
Depend on seo_meta and create a migration for it unless it already exists.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/4_create_seo_meta_for_blog.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/db/migrate/4_create_seo_meta_for_blog.rb b/db/migrate/4_create_seo_meta_for_blog.rb
new file mode 100644
index 0000000..baf81a4
--- /dev/null
+++ b/db/migrate/4_create_seo_meta_for_blog.rb
@@ -0,0 +1,25 @@
+class CreateSeoMetaForBlog < ActiveRecord::Migration
+
+ def self.up
+ unless ::SeoMetum.table_exists?
+ create_table ::SeoMetum.table_name do |t|
+ t.integer :seo_meta_id
+ t.string :seo_meta_type
+
+ t.string :browser_title
+ t.string :meta_keywords
+ t.text :meta_description
+
+ t.timestamps
+ end
+
+ add_index ::SeoMetum.table_name, :id
+ add_index ::SeoMetum.table_name, [:seo_meta_id, :seo_meta_type]
+ end
+ end
+
+ def self.down
+ # can't drop the table because someone else might be using it.
+ end
+
+end