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
c74b49c2
Commit
c74b49c2
authored
May 16, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-reversible-migrations' into 'master'
Make more migrations reversible See merge request !646
parents
d0b1993b
a9103eae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
db/migrate/20150406133311_add_invite_data_to_member.rb
db/migrate/20150406133311_add_invite_data_to_member.rb
+12
-1
db/migrate/20150417122318_remove_import_data_from_project.rb
db/migrate/20150417122318_remove_import_data_from_project.rb
+5
-1
db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
...5173433_add_default_snippet_visibility_to_app_settings.rb
+5
-1
No files found.
db/migrate/20150406133311_add_invite_data_to_member.rb
View file @
c74b49c2
class
AddInviteDataToMember
<
ActiveRecord
::
Migration
def
change
def
up
add_column
:members
,
:created_by_id
,
:integer
add_column
:members
,
:invite_email
,
:string
add_column
:members
,
:invite_token
,
:string
...
...
@@ -9,4 +9,15 @@ class AddInviteDataToMember < ActiveRecord::Migration
add_index
:members
,
:invite_token
,
unique:
true
end
def
down
remove_index
:members
,
:invite_token
change_column
:members
,
:user_id
,
:integer
,
null:
false
remove_column
:members
,
:invite_accepted_at
remove_column
:members
,
:invite_token
remove_column
:members
,
:invite_email
remove_column
:members
,
:created_by_id
end
end
db/migrate/20150417122318_remove_import_data_from_project.rb
View file @
c74b49c2
class
RemoveImportDataFromProject
<
ActiveRecord
::
Migration
def
change
def
up
remove_column
:projects
,
:import_data
end
def
down
add_column
:projects
,
:import_data
,
:text
end
end
db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
View file @
c74b49c2
class
AddDefaultSnippetVisibilityToAppSettings
<
ActiveRecord
::
Migration
def
change
def
up
add_column
:application_settings
,
:default_snippet_visibility
,
:integer
visibility
=
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
]
execute
(
"update application_settings set default_snippet_visibility =
#{
visibility
}
"
)
end
def
down
remove_column
:application_settings
,
:default_snippet_visibility
end
end
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