<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/db, branch remove-commit-tree</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Merge branch 'change-issues-closed-at-background-migration' into 'master'</title>
<updated>2018-01-04T10:14:06+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@mcgivern.me.uk</email>
</author>
<published>2018-01-04T10:14:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ac409fb44402622dfd6abb076f7a85df4b27d39d'/>
<id>ac409fb44402622dfd6abb076f7a85df4b27d39d</id>
<content type='text'>
Use a background migration for migrating issues.closed_at

See merge request gitlab-org/gitlab-ce!16083</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a background migration for migrating issues.closed_at

See merge request gitlab-org/gitlab-ce!16083</pre>
</div>
</content>
</entry>
<entry>
<title>Use a background migration for issues.closed_at</title>
<updated>2018-01-03T11:28:00+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-12-21T15:44:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=78d22fb20db14c90861318b9f316466fbf002114'/>
<id>78d22fb20db14c90861318b9f316466fbf002114</id>
<content type='text'>
In a previous attempt (rolled back in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16021) we tried
to migrate `issues.closed_at` from timestamp to timestamptz using a
regular migration. This has a bad impact on GitLab.com and as such was
rolled back.

This commit re-implements the original migrations using generic
background migrations, allowing us to still migrate the data in a single
release but without a negative impact on availability.

To ensure the database schema is up to date the background migrations
are performed inline in development and test environments. We also make
sure to not migrate that that doesn't need migrating in the first place
or has already been migrated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a previous attempt (rolled back in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16021) we tried
to migrate `issues.closed_at` from timestamp to timestamptz using a
regular migration. This has a bad impact on GitLab.com and as such was
rolled back.

This commit re-implements the original migrations using generic
background migrations, allowing us to still migrate the data in a single
release but without a negative impact on availability.

To ensure the database schema is up to date the background migrations
are performed inline in development and test environments. We also make
sure to not migrate that that doesn't need migrating in the first place
or has already been migrated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cache merged and closed events data in merge_request_metrics table</title>
<updated>2018-01-02T19:45:25+00:00</updated>
<author>
<name>Oswaldo Ferreira</name>
<email>oswaldo@gitlab.com</email>
</author>
<published>2017-12-07T17:41:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=bf8c20729baffbf55605484230ff33680d72139b'/>
<id>bf8c20729baffbf55605484230ff33680d72139b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix user membership destroy relation</title>
<updated>2018-01-02T15:06:44+00:00</updated>
<author>
<name>Francisco Javier López</name>
<email>fjlopez@gitlab.com</email>
</author>
<published>2018-01-02T15:06:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=2665aea6275cc82888ed3e3ab3dbe384028d663c'/>
<id>2665aea6275cc82888ed3e3ab3dbe384028d663c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '39289-local-schema-rb-automatically-reverts-datetime-to-datetime_with_timezone-after-migrations' into 'master'</title>
<updated>2018-01-02T12:33:42+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@mcgivern.me.uk</email>
</author>
<published>2018-01-02T12:33:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=81dcd8ed8f71968215c7e776da482e83823c8b74'/>
<id>81dcd8ed8f71968215c7e776da482e83823c8b74</id>
<content type='text'>
Prevent schema.rb reverting from datetime_with_timezone to datetime

Closes #39289

See merge request gitlab-org/gitlab-ce!14956</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent schema.rb reverting from datetime_with_timezone to datetime

Closes #39289

See merge request gitlab-org/gitlab-ce!14956</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'sh-fix-mysql-migration-10-3' into 'master'</title>
<updated>2017-12-27T16:14:36+00:00</updated>
<author>
<name>Grzegorz Bizon</name>
<email>grzegorz@gitlab.com</email>
</author>
<published>2017-12-27T16:14:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ff3e9af6fdac37ae71ea526bbb9aaf4b7d2ce876'/>
<id>ff3e9af6fdac37ae71ea526bbb9aaf4b7d2ce876</id>
<content type='text'>
Fix migration for removing orphaned issues.moved_to_id values in MySQL and PostgreSQL

Closes #41498

See merge request gitlab-org/gitlab-ce!16141</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix migration for removing orphaned issues.moved_to_id values in MySQL and PostgreSQL

Closes #41498

See merge request gitlab-org/gitlab-ce!16141</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify implementation and allow for batch updates in MySQL</title>
<updated>2017-12-27T15:11:54+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-12-27T15:11:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e97671b81259a2e8bc02babbe94f5ab7aa19fa93'/>
<id>e97671b81259a2e8bc02babbe94f5ab7aa19fa93</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix PostgreSQL implementation of migration</title>
<updated>2017-12-27T12:12:18+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-12-27T11:22:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dfdf22c7d8a9e4776a0e3bfc130ef47aff911022'/>
<id>dfdf22c7d8a9e4776a0e3bfc130ef47aff911022</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Gitlab::Access.values to Gitlab::Access.sym_options at 06_teams on development db fixtures</title>
<updated>2017-12-27T09:55:57+00:00</updated>
<author>
<name>ogom</name>
<email>ogom@outlook.com</email>
</author>
<published>2017-12-27T09:55:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=9fcc40aeafe83cfdbc6f0fff0ebaf9e733983cfc'/>
<id>9fcc40aeafe83cfdbc6f0fff0ebaf9e733983cfc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix migration for removing orphaned issues.moved_to_id values in MySQL</title>
<updated>2017-12-27T06:29:15+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-12-27T06:22:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=5cacdc4ec1f63338fab923ddb657fdba0a7e6300'/>
<id>5cacdc4ec1f63338fab923ddb657fdba0a7e6300</id>
<content type='text'>
According to https://dev.mysql.com/doc/refman/5.7/en/update.html,
"You cannot update a table and select from the same table in a subquery."
Attempting to do so results in the error:

```
Mysql2::Error: Table 'issues' is specified twice, both as a target for 'UPDATE' and as a separate source for data
```

Instead, we can use a LEFT JOIN on the same table to make MySQL do the right
thing.

Closes #41498
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to https://dev.mysql.com/doc/refman/5.7/en/update.html,
"You cannot update a table and select from the same table in a subquery."
Attempting to do so results in the error:

```
Mysql2::Error: Table 'issues' is specified twice, both as a target for 'UPDATE' and as a separate source for data
```

Instead, we can use a LEFT JOIN on the same table to make MySQL do the right
thing.

Closes #41498
</pre>
</div>
</content>
</entry>
</feed>
