From 28ec385b72c3575b15a4c89f592c289cbaa306df Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Mon, 19 Jun 2017 12:09:08 +0200 Subject: [PATCH] Drop unused tables and columns --- .gitignore | 1 - db/migrate/20170607190249_remove_image_from_asciicasts.rb | 7 +++++++ db/migrate/20170611171826_remove_comments_and_likes.rb | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20170607190249_remove_image_from_asciicasts.rb create mode 100644 db/migrate/20170611171826_remove_comments_and_likes.rb diff --git a/.gitignore b/.gitignore index 38ab297..94e9479 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ # App artifacts /_build -/db /deps /*.ez diff --git a/db/migrate/20170607190249_remove_image_from_asciicasts.rb b/db/migrate/20170607190249_remove_image_from_asciicasts.rb new file mode 100644 index 0000000..ad09bd6 --- /dev/null +++ b/db/migrate/20170607190249_remove_image_from_asciicasts.rb @@ -0,0 +1,7 @@ +class RemoveImageFromAsciicasts < ActiveRecord::Migration + def change + remove_column :asciicasts, :image + remove_column :asciicasts, :image_width + remove_column :asciicasts, :image_height + end +end diff --git a/db/migrate/20170611171826_remove_comments_and_likes.rb b/db/migrate/20170611171826_remove_comments_and_likes.rb new file mode 100644 index 0000000..162f50c --- /dev/null +++ b/db/migrate/20170611171826_remove_comments_and_likes.rb @@ -0,0 +1,8 @@ +class RemoveCommentsAndLikes < ActiveRecord::Migration + def change + remove_column :asciicasts, :comments_count + remove_column :asciicasts, :likes_count + drop_table :comments + drop_table :likes + end +end