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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9a96a827
Commit
9a96a827
authored
Nov 12, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
parents
940ed58e
31d9864a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
CHANGELOG
CHANGELOG
+1
-0
lib/backup/database.rb
lib/backup/database.rb
+1
-0
lib/tasks/gitlab/db/drop_all_postgres_sequences.rake
lib/tasks/gitlab/db/drop_all_postgres_sequences.rake
+10
-0
No files found.
CHANGELOG
View file @
9a96a827
...
...
@@ -3,6 +3,7 @@ v 7.5.0
- Add time zone configuration on gitlab.yml (Sullivan Senechal)
- Fix LDAP authentication for Git HTTP access
- Fix LDAP config lookup for provider 'ldap'
- Drop all sequences during Postgres database restore
- Project title links to project homepage (Ben Bodenmiller)
- Add Atlassian Bamboo CI service (Drew Blessing)
- Mentioned @user will receive email even if he is not participating in issue or commit
...
...
lib/backup/database.rb
View file @
9a96a827
...
...
@@ -34,6 +34,7 @@ module Backup
# Drop all tables because PostgreSQL DB dumps do not contain DROP TABLE
# statements like MySQL.
Rake
::
Task
[
"gitlab:db:drop_all_tables"
].
invoke
Rake
::
Task
[
"gitlab:db:drop_all_postgres_sequences"
].
invoke
pg_env
system
(
'psql'
,
config
[
'database'
],
'-f'
,
db_file_name
)
end
...
...
lib/tasks/gitlab/db/drop_all_postgres_sequences.rake
0 → 100644
View file @
9a96a827
namespace
:gitlab
do
namespace
:db
do
task
drop_all_postgres_sequences: :environment
do
connection
=
ActiveRecord
::
Base
.
connection
connection
.
execute
(
"SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';"
).
each
do
|
sequence
|
connection
.
execute
(
"DROP SEQUENCE
#{
sequence
[
'relname'
]
}
"
)
end
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