diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20150223022001_set_missing_last_activity_at.rb | 9 | ||||
| -rw-r--r-- | db/schema.rb | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/db/migrate/20150223022001_set_missing_last_activity_at.rb b/db/migrate/20150223022001_set_missing_last_activity_at.rb new file mode 100644 index 00000000000..3a3adf18872 --- /dev/null +++ b/db/migrate/20150223022001_set_missing_last_activity_at.rb @@ -0,0 +1,9 @@ +class SetMissingLastActivityAt < ActiveRecord::Migration + def up + execute "UPDATE projects SET last_activity_at = updated_at WHERE last_activity_at IS NULL" + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/schema.rb b/db/schema.rb index 8069d95c698..2659efe4df9 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: 20150217123345) do +ActiveRecord::Schema.define(version: 20150223022001) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |
