Skip to content

Commit afa3641

Browse files
committed
remove email field from dump
- `do_nothing` on `emails` insertion violates unique contraint on user_id
1 parent 5ef002d commit afa3641

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/models/user.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<'a> NewUser<'a> {
9090

9191
let token = insert_into(emails::table)
9292
.values(&new_email)
93-
.on_conflict_do_nothing()
93+
.do_update()
9494
.returning(emails::token)
9595
.get_result::<String>(conn)
9696
.optional()?;

src/tasks/dump_db/dump-db.toml

-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ id in (
165165
)"""
166166
[users.columns]
167167
id = "public"
168-
email = "private"
169168
gh_access_token = "private"
170169
gh_login = "public"
171170
name = "public"

0 commit comments

Comments
 (0)