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
Tatuya Kamada
gitlab-ce
Commits
a9103eae
Commit
a9103eae
authored
May 13, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make more migrations reversible
[ci skip]
parent
cc0a4b7e
Changes
3
Show 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 @
a9103eae
class
AddInviteDataToMember
<
ActiveRecord
::
Migration
class
AddInviteDataToMember
<
ActiveRecord
::
Migration
def
change
def
up
add_column
:members
,
:created_by_id
,
:integer
add_column
:members
,
:created_by_id
,
:integer
add_column
:members
,
:invite_email
,
:string
add_column
:members
,
:invite_email
,
:string
add_column
:members
,
:invite_token
,
:string
add_column
:members
,
:invite_token
,
:string
...
@@ -9,4 +9,15 @@ class AddInviteDataToMember < ActiveRecord::Migration
...
@@ -9,4 +9,15 @@ class AddInviteDataToMember < ActiveRecord::Migration
add_index
:members
,
:invite_token
,
unique:
true
add_index
:members
,
:invite_token
,
unique:
true
end
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
end
db/migrate/20150417122318_remove_import_data_from_project.rb
View file @
a9103eae
class
RemoveImportDataFromProject
<
ActiveRecord
::
Migration
class
RemoveImportDataFromProject
<
ActiveRecord
::
Migration
def
change
def
up
remove_column
:projects
,
:import_data
remove_column
:projects
,
:import_data
end
end
def
down
add_column
:projects
,
:import_data
,
:text
end
end
end
db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
View file @
a9103eae
class
AddDefaultSnippetVisibilityToAppSettings
<
ActiveRecord
::
Migration
class
AddDefaultSnippetVisibilityToAppSettings
<
ActiveRecord
::
Migration
def
change
def
up
add_column
:application_settings
,
:default_snippet_visibility
,
:integer
add_column
:application_settings
,
:default_snippet_visibility
,
:integer
visibility
=
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
]
visibility
=
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
]
execute
(
"update application_settings set default_snippet_visibility =
#{
visibility
}
"
)
execute
(
"update application_settings set default_snippet_visibility =
#{
visibility
}
"
)
end
end
def
down
remove_column
:application_settings
,
:default_snippet_visibility
end
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