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
Jérome Perrin
gitlab-ce
Commits
5cc2315e
Commit
5cc2315e
authored
Dec 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix migrations for postgres on test environment
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
24c7eafb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
39 deletions
+46
-39
db/migrate/20121220064453_init_schema.rb
db/migrate/20121220064453_init_schema.rb
+37
-37
db/migrate/20140122112253_create_merge_request_diffs.rb
db/migrate/20140122112253_create_merge_request_diffs.rb
+7
-2
db/migrate/20140903115954_migrate_to_new_shell.rb
db/migrate/20140903115954_migrate_to_new_shell.rb
+2
-0
No files found.
db/migrate/20121220064453_init_schema.rb
View file @
5cc2315e
...
...
@@ -66,8 +66,8 @@ class InitSchema < ActiveRecord::Migration
t
.
boolean
"closed"
,
default:
false
,
null:
false
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
text
"st_commits"
,
limit:
2147483647
t
.
text
"st_diffs"
,
limit:
2147483647
t
.
text
"st_commits"
t
.
text
"st_diffs"
t
.
boolean
"merged"
,
default:
false
,
null:
false
t
.
integer
"state"
,
default:
1
,
null:
false
t
.
integer
"milestone_id"
...
...
db/migrate/20140122112253_create_merge_request_diffs.rb
View file @
5cc2315e
...
...
@@ -2,11 +2,16 @@ class CreateMergeRequestDiffs < ActiveRecord::Migration
def
change
create_table
:merge_request_diffs
do
|
t
|
t
.
string
:state
,
null:
false
,
default:
'collected'
t
.
text
:st_commits
,
null:
true
,
limit:
2147483647
t
.
text
:st_diffs
,
null:
true
,
limit:
2147483647
t
.
text
:st_commits
,
null:
true
t
.
text
:st_diffs
,
null:
true
t
.
integer
:merge_request_id
,
null:
false
t
.
timestamps
end
if
ActiveRecord
::
Base
.
configurations
[
Rails
.
env
][
'adapter'
]
=~
/^mysql/
change_column
:merge_request_diffs
,
:st_commits
,
:text
,
limit:
2147483647
change_column
:merge_request_diffs
,
:st_diffs
,
:text
,
limit:
2147483647
end
end
end
db/migrate/20140903115954_migrate_to_new_shell.rb
View file @
5cc2315e
class
MigrateToNewShell
<
ActiveRecord
::
Migration
def
change
return
if
Rails
.
env
.
test?
gitlab_shell_path
=
Gitlab
.
config
.
gitlab_shell
.
path
if
system
(
"
#{
gitlab_shell_path
}
/bin/create-hooks"
)
puts
'Repositories updated with new hooks'
...
...
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