Commit Graph

194 Commits

Author SHA1 Message Date
GitLab Bot 846ebeb02e Add latest changes from gitlab-org/gitlab@master 2020-11-26 03:09:17 +00:00
GitLab Bot adcc3955fe Add latest changes from gitlab-org/gitlab@master 2020-11-18 12:09:16 +00:00
GitLab Bot 6d9c4dc2ef Add latest changes from gitlab-org/gitlab@master 2020-11-16 18:09:15 +00:00
GitLab Bot 8d94fb4ae1 Add latest changes from gitlab-org/gitlab@master 2020-11-04 00:09:12 +00:00
GitLab Bot 98d7cc758f Add latest changes from gitlab-org/gitlab@master 2020-10-30 18:08:56 +00:00
GitLab Bot 3940f59a61 Add latest changes from gitlab-org/gitlab@master 2020-10-16 15:08:46 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot cf37ae7acd Add latest changes from gitlab-org/gitlab@master 2020-10-07 12:09:12 +00:00
GitLab Bot 6ab9cdec26 Add latest changes from gitlab-org/gitlab@master 2020-10-06 12:08:38 +00:00
GitLab Bot 497d517e13 Add latest changes from gitlab-org/gitlab@master 2020-10-06 09:08:32 +00:00
GitLab Bot 58d68e313f Add latest changes from gitlab-org/gitlab@master 2020-09-29 09:09:49 +00:00
GitLab Bot aa33f5d5bb Add latest changes from gitlab-org/gitlab@master 2020-09-16 21:09:52 +00:00
GitLab Bot 03c7356304 Add latest changes from gitlab-org/gitlab@master 2020-09-15 09:09:30 +00:00
GitLab Bot 184906087f Add latest changes from gitlab-org/gitlab@master 2020-08-31 00:10:37 +00:00
GitLab Bot 2d075756ce Add latest changes from gitlab-org/gitlab@master 2020-08-27 06:10:37 +00:00
GitLab Bot 67370c8b72 Add latest changes from gitlab-org/gitlab@master 2020-08-25 12:04:30 +00:00
GitLab Bot 5f4dec4ac3 Add latest changes from gitlab-org/gitlab@master 2020-08-06 15:09:42 +00:00
GitLab Bot 339a04aba2 Add latest changes from gitlab-org/gitlab@master 2020-07-21 00:09:37 +00:00
GitLab Bot 9d67bc14cb Add latest changes from gitlab-org/gitlab@master 2020-07-16 12:09:22 +00:00
GitLab Bot 000087abd5 Add latest changes from gitlab-org/gitlab@master 2020-07-16 06:09:33 +00:00
GitLab Bot 3c2841692e Add latest changes from gitlab-org/gitlab@master 2020-07-02 06:09:26 +00:00
GitLab Bot 8eef083ccd Add latest changes from gitlab-org/gitlab@master 2020-06-18 12:09:25 +00:00
GitLab Bot c61d90dbfa Add latest changes from gitlab-org/gitlab@master 2020-06-17 15:08:36 +00:00
GitLab Bot ecfcccb684 Add latest changes from gitlab-org/gitlab@master 2020-06-15 21:08:35 +00:00
GitLab Bot 38b39c5047 Add latest changes from gitlab-org/gitlab@master 2020-06-05 12:08:24 +00:00
GitLab Bot 6b7b853dff Add latest changes from gitlab-org/gitlab@master 2020-06-03 06:08:34 +00:00
GitLab Bot 4d5ee2b814 Add latest changes from gitlab-org/gitlab@master 2020-05-27 15:08:11 +00:00
GitLab Bot 6fdf80d94a Add latest changes from gitlab-org/gitlab@master 2020-05-25 18:08:35 +00:00
GitLab Bot 4a3ba3e5f2 Add latest changes from gitlab-org/gitlab@master 2020-05-22 09:08:09 +00:00
GitLab Bot 8f306a7dc5 Add latest changes from gitlab-org/gitlab@master 2020-05-21 06:08:25 +00:00
GitLab Bot d84f18d66c Add latest changes from gitlab-org/gitlab@master 2020-05-19 18:08:11 +00:00
GitLab Bot c4c1fc5fe7 Add latest changes from gitlab-org/gitlab@master 2020-05-15 15:08:04 +00:00
GitLab Bot 5ba0ad3da6 Add latest changes from gitlab-org/gitlab@master 2020-05-04 09:09:36 +00:00
GitLab Bot 6f2dc43926 Add latest changes from gitlab-org/gitlab@master 2020-04-29 18:09:56 +00:00
GitLab Bot 647de7e6fd Add latest changes from gitlab-org/gitlab@master 2020-04-29 15:09:58 +00:00
GitLab Bot 8a7efa45c3 Add latest changes from gitlab-org/gitlab@master 2020-04-02 18:08:11 +00:00
GitLab Bot 684d65316a Add latest changes from gitlab-org/gitlab@master 2020-04-02 12:08:18 +00:00
GitLab Bot c36152ff8c Add latest changes from gitlab-org/gitlab@master 2020-03-13 15:09:21 +00:00
GitLab Bot 988b28ec1a Add latest changes from gitlab-org/gitlab@master 2020-03-02 12:07:57 +00:00
GitLab Bot 597a43f359 Add latest changes from gitlab-org/gitlab@master 2020-02-28 03:09:04 +00:00
GitLab Bot c77fda905a Add latest changes from gitlab-org/gitlab@master 2020-02-27 21:09:17 +00:00
GitLab Bot c2367afbf5 Add latest changes from gitlab-org/gitlab@master 2020-02-24 18:09:05 +00:00
GitLab Bot cf6a3e7ed4 Add latest changes from gitlab-org/gitlab@master 2020-02-21 15:09:05 +00:00
GitLab Bot 2a040e2655 Add latest changes from gitlab-org/gitlab@master 2020-02-21 12:09:07 +00:00
GitLab Bot df2eda3f14 Add latest changes from gitlab-org/gitlab@master 2020-02-20 18:08:51 +00:00
GitLab Bot 0e9eea40b6 Add latest changes from gitlab-org/gitlab@master 2020-02-11 21:08:44 +00:00
GitLab Bot fa478f1890 Add latest changes from gitlab-org/gitlab@master 2020-02-06 06:08:52 +00:00
GitLab Bot ca05512007 Add latest changes from gitlab-org/gitlab@master 2020-02-04 18:08:50 +00:00
GitLab Bot afa0ab923d Add latest changes from gitlab-org/gitlab@master 2020-01-09 03:07:56 +00:00
GitLab Bot c02f53288a Add latest changes from gitlab-org/gitlab@master 2019-11-27 09:06:29 +00:00
GitLab Bot 77a73903aa Add latest changes from gitlab-org/gitlab@master 2019-11-01 18:06:00 +00:00
GitLab Bot eadb77d89f Add latest changes from gitlab-org/gitlab@master 2019-10-07 18:06:24 +00:00
GitLab Bot 4a45a78770 Add latest changes from gitlab-org/gitlab@master 2019-09-24 06:06:02 +00:00
GitLab Bot c792263edf Add latest changes from gitlab-org/gitlab@master 2019-09-23 18:06:14 +00:00
GitLab Bot b082790134 Add latest changes from gitlab-org/gitlab@master 2019-09-18 18:06:14 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Evan Read 42e8bef3eb Removes trailing whitespace to fix linting 2019-08-27 11:31:43 +00:00
Mayra Cabrera 9d5ea4203c Migrations guide: use atomic steps, when possible
Currently, the DB migrations guide says that "you must" use non-blocking
operations (such as CREATE INDEX CONCURRENTLY), always.

But this does not make sense in cases of empty tables and leads to
splitting the work to multiple non-atomic
(with disable_ddl_transaction!) DB migrations.

To follow KISS principle, to have fewer DB migrations steps,
to have them atomic when it's possible and simplify deployment
and troubleshooting, the following exceptions were added
to the doc:

- index creation,
- index dropping,
- defining an FK,
- adding a column with DEFAULT,
2019-08-27 10:22:12 +00:00
Valery Sizov 19f36a3452 Update Migration Style Guide 2019-08-07 18:02:20 +03:00
Marcel Amirault 347a879909 Update redirected links to final destination
Updating redirected links in the development, install, policy
raketasks and university dirs. Should now link to final
URL to avoid redirect hops
2019-07-09 00:20:40 +00:00
Shinya Maeda ff14b58dc5 Add note for index requirement with FK constraint
Update migration_style_guide.md
2019-05-23 12:45:52 +00:00
Gosia Ksionek fb94014773 Add information about moving migrations
Add to docs paragraph about a way of moving EE migrations to CE
if needed
2019-04-12 16:41:59 +00:00
Evan Read 47fb1c5235 Remove consecutive blank lines from markdown files
For the sake of consistency, removes any extraneous
consecutive blank lines from the doc suite.
2019-02-18 09:36:13 +00:00
Evan Read d98560c1f5 Make unordered lists conform to styleguide
- Also makes other minor Markdown fixes that were near the main fixes.
2019-01-08 12:21:09 +10:00
Kamil Trzciński 0103d5be96 Add config_options|variables to BuildMetadata
These are data columns that store runtime configuration
of build needed to execute it on runner and within pipeline.

The definition of this data is that once used, and when no longer
needed (due to retry capability) they can be freely removed.

They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking
support for json datatype on old enough version).
2019-01-04 16:38:17 +01: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
Yorick Peterse 3cf5ae3158 Merge branch 'improve_migrations_docs' into 'master'
Documentation: Correct inaccurate phrase related to disable_ddl_transaction mode

See merge request gitlab-org/gitlab-ce!21175
2018-11-20 12:18:42 +00:00
Kamil Trzciński 90801a43ca Validate foreign keys being indexed 2018-11-15 12:51:15 +01:00
Nikolay 918177b749 Correct inaccurate phrase related to disable_ddl_transaction mode 2018-08-14 00:51:27 +00:00
Andreas Brandl 3d2a3e5782 Docs: FK constraints require an index.
Closes #49789.
2018-08-08 23:30:48 +02:00
Brett Walker 7b0e7bcf5d make a little more obvious what operations might need downtime or enhanced migration techniques 2018-03-22 16:08:21 +00:00
Andreas Brandl 1362d9fe13 Shortcut concurrent index creation/removal if no effect.
Index creation does not have an effect if the index is present already.
Index removal does not have an affect if the index is not present.

This helps to avoid patterns like this in migrations:
```
if index_exists?(...)
  remove_concurrent_index(...)
end
```
2018-03-20 18:44:00 +01:00
Ville Skyttä 0cbbb08e79 doc: Spelling fixes 2018-01-19 12:09:59 +02:00
Sean McGivern 4d367dd400 Add computed update docs for update_column_in_batches 2017-11-17 16:56:50 +00:00
Yorick Peterse d5cb29434a
Mention schema migrations and patch releases 2017-08-04 13:34:42 +02:00
Yorick Peterse 9d3f27a22d
Removed commit guidelines for migrations
At some point we decided this isn't really necessary, so let's get rid
of it.
2017-08-04 13:34:42 +02:00
blackst0ne bc00806a4e Add database helpers 'add_timestamps_with_timezone' and 'timestamps_with_timezone' 2017-06-13 22:44:13 +11:00
Bob Van Landuyt ffc486a585 Add some documentation for the new migration helpers 2017-05-02 14:10:55 +02: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
blackst0ne 9997c58fc0 Add remove_concurrent_index to database helper 2017-04-06 09:53:57 +11:00
Robert Speicher 9a2ad60ffa Add more highlighting to Migration Style Guide doc
[ci skip]
2016-11-09 10:59:15 +00:00
Nick Thomas 267a96f3d4 Link to the "What requires downtime?" page from the Migration Style Guide
[ci skip]
2016-10-02 20:36:45 +01:00
Drew Blessing e000f02bd3 Add support for column limits in add_column_with_default 2016-09-15 21:59:58 -05:00
Yorick Peterse a8bfe20d0d
Added checks for migration downtime
These new checks can be used to check if migrations require downtime or
not (as tagged by their authors). In CI this compares the current branch
with master so migrations added by merge requests are automatically
verified.

To check the migrations added since a Git reference simply run:

    bundle exec rake gitlab:db:downtime_check[GIT_REF]
2016-07-20 12:41:56 +02:00
Drew Blessing 8d96bae6db Remove Rubocop skip comment from migration style guide [ci skip] 2016-06-23 09:01:04 -05:00
Drew Blessing 8033afd817 Update migration_style_guide.md with new details 2016-06-15 21:38:12 +00:00
Chris Spicer 348d16f524 updtae -> update 2016-05-29 22:31:39 -07:00
Yorick Peterse e8efaca23c
Updated migration styleguide for new helpers 2016-05-12 13:03:55 +02:00
Rémy Coutable a4ffdf922d Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2016-02-17 17:33:09 +01:00
Prayag Verma b877afc371 Fix a typo [ci skip]
Remove extra `make`
2016-02-12 19:02:35 +05:30
Kamil Trzciński 35b93f9d22 Add notice about offline migrations 2015-11-02 15:14:34 +00:00
Valery Sizov 34a9aa2e8a update migration style guide 2015-05-12 14:34:43 +03:00
Sytse Sijbrandij 881e11df1b Small improvements to style guide. 2015-05-11 14:48:39 +00:00
Job van der Voort 6a6047f80c create migration style guide. Fixes #2305 2015-05-11 15:09:36 +02:00