From 04dd345bf681b00b6220d17a9cfc53c029ab3f54 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Fri, 31 Jul 2015 14:07:20 +0300 Subject: [PATCH] Remove Invalid approvers records --- db/migrate/20150731200022_remove_invalid_approvers.rb | 8 ++++++++ db/schema.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20150731200022_remove_invalid_approvers.rb diff --git a/db/migrate/20150731200022_remove_invalid_approvers.rb b/db/migrate/20150731200022_remove_invalid_approvers.rb new file mode 100644 index 0000000000..e9d547d14f --- /dev/null +++ b/db/migrate/20150731200022_remove_invalid_approvers.rb @@ -0,0 +1,8 @@ +class RemoveInvalidApprovers < ActiveRecord::Migration + def up + execute("DELETE FROM approvers WHERE user_id = 0") + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 3754b72bf8..b0ba8083ec 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150717155058) do +ActiveRecord::Schema.define(version: 20150731200022) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql"