aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
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