Commit Graph

20 Commits

Author SHA1 Message Date
GitLab Bot 1caa60060b Add latest changes from gitlab-org/gitlab@master 2019-12-19 00:08:01 +00:00
GitLab Bot 8644755363 Add latest changes from gitlab-org/gitlab@master 2019-12-01 06:06:11 +00:00
Reuben Pereira 43d33ef824 Refactor new undo_* methods
- Move code for creating a new column from old into a function so that
it can be reused.
- Also add comments above the methods.
2019-09-05 12:15:16 +00:00
Stan Hu d93b985df0 Use self.ignored_columns += instead of =
This is to accomodate prepended modules.
2019-08-30 13:15:34 -07:00
dineshpanda fa6f19d1f8 Remove dependency on IgnorableColumn concern 2019-08-30 02:09:13 +05:30
Nick Thomas 5a574883f9
Remove MySQL references from development docs
I noticed the doc/development/testing_guide/best_practices.md still
referenced the `[run mysql]` tags, etc. They no longer work, so I
removed them, then realised I had better clean up the rest of
doc/development !
2019-08-16 14:05:08 +01:00
Marcel Amirault 61e1a14925 Expand markdown linting rules for docs
MD002 - First header should be level 1
MD006 - Start bullets at beginning of line
MD019 - No multiple spaces after header style
MD022 - Headers surrounded by blank lines
MD025 - Only 1 level 1 header
MD028 - No blank lines within blockquote
MD038 - Spaces inside code span elements
2019-08-05 02:13:46 +00:00
Yorick Peterse 40ad7d5d7a
Fix ActiveRecord::Migration deprecations
Extending from ActiveRecord::Migration is deprecated, but was still used
in a bunch of places.
2018-12-12 16:38:40 +01:00
Evan Read 20146580a0 Resolve Markdown ordered lists not conforming to styleguide 2018-11-13 10:53:38 +10:00
Mark Chao 2be54f1bbf Fix doc for large table column rename 2018-07-11 14:38:29 +08:00
Sean McGivern d3d9077830 Add a helper to rename a column using a background migration
This works the same way as change_column_type_using_background_migration, but
for renaming a column. It takes a table, not a relation, to match its concurrent
counterpart.

Also, generalise the cleanup migrations to reduce code duplication.
2018-06-26 13:54:52 +01:00
Sean McGivern 9a65af63e0 Add docs for the cleanup step of a background column type change
A background column type change needs a cleanup step, like any background
migration. We should call that out explicitly in the documentation.
2018-06-19 16:41:35 +01:00
Pascal Borreli 12e3eff462 Fixed typos 2018-04-27 08:50:05 +00:00
Yorick Peterse 78d22fb20d
Use a background migration for issues.closed_at
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.
2018-01-03 12:28:00 +01:00
digitalMoksha 9295c827b8 fix link that was linking to `html` instead of `md`
(to be consistent)
2017-11-29 10:44:33 +01:00
Valery Sizov cf9d9d865d [Migration guide] Add note about prefering change_column_null over change_column 2017-05-18 11:35:59 +03:00
Yorick Peterse 223d8a3d26
Prepare for zero downtime migrations
Starting with GitLab 9.1.0 we will no longer allow downtime migrations
unless absolutely necessary. This commit updates the various developer
guides and adds code that is necessary to make zero downtime migrations
less painful.
2017-04-12 18:15:19 +02:00
Nick Thomas 630eb119cb Renaming columns requires downtime 2016-11-07 10:57:08 +00:00
Yorick Peterse ee451ea573
Mention add_column_with_default in downtime guide
[ci skip]
2016-08-10 11:09:53 +02:00
Yorick Peterse c462dcec4d
Added guide about migrations and downtime
This guide describes various commonly used operations and the impact
they have on the availability of a GitLab instance.
2016-08-04 17:25:31 +02:00