Commit a7ddcab7 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'members_table_timestamps' into 'master'

Add missing timestamps to the 'members' table

In 20140914145549_migrate_to_new_members_model.rb we forgot to set the
created_at and updated_at times for new records in the 'members' table. This
became a problem after commit c8e78d97 which
was added in GitLab 7.5. With this migration we ensure that all rows in
'members' have at least some created_at and updated_at timestamp.

See merge request !1272
parents e4af2b3d 4053c055
...@@ -41,6 +41,7 @@ v 7.5.0 ...@@ -41,6 +41,7 @@ v 7.5.0
- Display renamed files in diff views (Vinnie Okada) - Display renamed files in diff views (Vinnie Okada)
- Fix raw view for public snippets - Fix raw view for public snippets
- Use secret token with GitLab internal API. - Use secret token with GitLab internal API.
- Add missing timestamps to 'members' table
v 7.4.3 v 7.4.3
- Fix raw snippets view - Fix raw snippets view
......
# In 20140914145549_migrate_to_new_members_model.rb we forgot to set the
# created_at and updated_at times for new records in the 'members' table. This
# became a problem after commit c8e78d972a5a628870eefca0f2ccea0199c55bda which
# was added in GitLab 7.5. With this migration we ensure that all rows in
# 'members' have at least some created_at and updated_at timestamp.
class AddTimestampsToMembers < ActiveRecord::Migration
def up
execute "UPDATE members SET created_at = NOW() WHERE created_at is NULL"
execute "UPDATE members SET updated_at = NOW() WHERE updated_at is NULL"
end
def down
# no change
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141007100818) do ActiveRecord::Schema.define(version: 20141121133009) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment