Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glandos
magnetico_merge
Commits
231aa3de
Commit
231aa3de
authored
Dec 13, 2020
by
Glandos
Browse files
minor fixes and format
parent
e6bfabc7
Changes
1
Show whitespace changes
Inline
Side-by-side
magnetico_merge.py
View file @
231aa3de
...
@@ -288,9 +288,9 @@ class PostgreSQL(Database):
...
@@ -288,9 +288,9 @@ class PostgreSQL(Database):
)
)
for
statement
in
self
.
drop_contraint_statements
:
for
statement
in
self
.
drop_contraint_statements
:
self
.
cursor
.
execute
(
statement
)
self
.
cursor
.
execute
(
statement
)
click
.
echo
(
" Done."
)
click
.
echo
(
" Done."
)
# Collect indices after dropping constraints
self
.
indices
=
self
.
get_indices
()
self
.
indices
=
self
.
get_indices
()
index_names
=
self
.
indices
.
keys
()
index_names
=
self
.
indices
.
keys
()
click
.
echo
(
click
.
echo
(
...
@@ -298,15 +298,13 @@ class PostgreSQL(Database):
...
@@ -298,15 +298,13 @@ class PostgreSQL(Database):
nl
=
False
,
nl
=
False
,
)
)
self
.
cursor
.
execute
(
f
"DROP INDEX
{
','
.
join
(
index_names
)
}
"
)
self
.
cursor
.
execute
(
f
"DROP INDEX
{
','
.
join
(
index_names
)
}
"
)
click
.
echo
(
" Done."
)
click
.
echo
(
" Done."
)
def
after_import
(
self
):
def
after_import
(
self
):
with
self
.
connection
:
with
self
.
connection
:
if
self
.
options
.
get
(
"fast"
,
False
):
if
self
.
options
.
get
(
"fast"
,
False
):
index_names
=
self
.
indices
.
keys
()
click
.
echo
(
click
.
echo
(
f
"-> Postgresql target, recreating indices:
{
', '
.
join
(
index_names
)
}
…"
,
f
"-> Postgresql target, recreating indices:
{
', '
.
join
(
self
.
indices
.
keys
()
)
}
…"
,
nl
=
False
,
nl
=
False
,
)
)
for
statement
in
self
.
indices
.
values
():
for
statement
in
self
.
indices
.
values
():
...
...
Write
Preview
Supports
Markdown
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