Migration : Remove All PieceJustificative empty in database

This commit is contained in:
Xavier J 2016-03-17 14:59:27 +01:00
parent bb79aca58a
commit 5ff7bc0075
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,8 @@
class DBremovePieceJustificativeEmpty < ActiveRecord::Migration
class PieceJustificative < ActiveRecord::Base
end
def change
PieceJustificative.where(content: nil).delete_all
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160315101245) do
ActiveRecord::Schema.define(version: 20160317135217) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"