Skip to content
Snippets Groups Projects

Catchup with main 2.8.1

Merged Charlotte Hausman requested to merge catchup_with_main_2.8.1 into 2.8.2-DEVELOPMENT
1 file
+ 27
0
Compare changes
  • Side-by-side
  • Inline
@@ -41,6 +41,33 @@ def upgrade():
WHERE "group" = 'DA';
"""
)
# Remove duplicate entries
op.execute(
"""
CREATE TABLE qa_staff_tmp (LIKE qa_staff);
"""
)
op.execute(
"""
INSERT INTO qa_staff_tmp(user_name, "group", available, email)
SELECT
DISTINCT ON (user_name, "group") user_name, "group", available, email
FROM qa_staff;
"""
)
op.execute(
"""
DROP TABLE qa_staff;
"""
)
op.execute(
"""
ALTER TABLE qa_staff_tmp
RENAME TO qa_staff;
"""
)
# Put back unique constraint
op.execute(
"""
ALTER TABLE qa_staff
Loading