Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
881e11df
Commit
881e11df
authored
May 11, 2015
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small improvements to style guide.
parent
426fa2af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
doc/development/migration_style_guide.md
doc/development/migration_style_guide.md
+6
-3
No files found.
doc/development/migration_style_guide.md
View file @
881e11df
# Migration Style Guide
# Migration Style Guide
When writing migrations for GitLab, you have to take into account that
When writing migrations for GitLab, you have to take into account that
these will be ran by thousands of organizations of all sizes, some with
these will be ran by
hundreds of
thousands of organizations of all sizes, some with
many years of data in their database.
many years of data in their database.
In addition, having to take a server offline for a an upgrade small or big is
In addition, having to take a server offline for a an upgrade small or big is
a big burden for most organizations. For this reason it is important that your
a big burden for most organizations. For this reason it is important that your
migrations are written carefully and adhere to the style guide below.
migrations are written carefully
, can be applied online
and adhere to the style guide below.
When writing your migrations, also consider that databases might have stale data
When writing your migrations, also consider that databases might have stale data
or inconsistencies and guard for that. Try to make as little assumptions as possible
or inconsistencies and guard for that. Try to make as little assumptions as possible
about the state of the database.
about the state of the database.
Please don't depend on GitLab specific code since it can change in future versions.
If needed copy-paste GitLab code into the migration to make make it forward compatible.
## Comments in the migration
## Comments in the migration
Each migration you write needs to have the two following pieces of information
Each migration you write needs to have the two following pieces of information
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment