fix: rm unique constraint on profile photo link
DESCRIPTION If user hasn't configured a profile photo on their forge instance, it would point to the default photo of the forge instance, which might be the same for all users without a profile photo on that forge instance.
This commit is contained in:
parent
9cf1d9df46
commit
8ad466dbc8
3 changed files with 1 additions and 7 deletions
|
@ -44,10 +44,6 @@ pub enum DBError {
|
||||||
#[error("User HTML link is already taken")]
|
#[error("User HTML link is already taken")]
|
||||||
DuplicateUserLink,
|
DuplicateUserLink,
|
||||||
|
|
||||||
/// User profile photo link Type is already taken
|
|
||||||
#[error("User profile photo link is already taken")]
|
|
||||||
DuplicateProfilePhotoLink,
|
|
||||||
|
|
||||||
/// Topic is already taken
|
/// Topic is already taken
|
||||||
#[error("Topic is already taken")]
|
#[error("Topic is already taken")]
|
||||||
DuplicateTopic,
|
DuplicateTopic,
|
||||||
|
|
|
@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS starchart_users (
|
||||||
hostname_id INTEGER NOT NULL REFERENCES starchart_forges(ID) ON DELETE CASCADE,
|
hostname_id INTEGER NOT NULL REFERENCES starchart_forges(ID) ON DELETE CASCADE,
|
||||||
username TEXT NOT NULL,
|
username TEXT NOT NULL,
|
||||||
html_url TEXT NOT NULL UNIQUE,
|
html_url TEXT NOT NULL UNIQUE,
|
||||||
profile_photo_html_url TEXT DEFAULT NULL UNIQUE,
|
profile_photo_html_url TEXT DEFAULT NULL,
|
||||||
added_on INTEGER NOT NULL,
|
added_on INTEGER NOT NULL,
|
||||||
last_crawl_on INTEGER NOT NULL,
|
last_crawl_on INTEGER NOT NULL,
|
||||||
ID INTEGER PRIMARY KEY NOT NULL
|
ID INTEGER PRIMARY KEY NOT NULL
|
||||||
|
|
|
@ -40,8 +40,6 @@ pub fn map_register_err(e: Error) -> DBError {
|
||||||
DBError::DuplicateForgeType
|
DBError::DuplicateForgeType
|
||||||
} else if msg.contains("starchart_users.html_url") {
|
} else if msg.contains("starchart_users.html_url") {
|
||||||
DBError::DuplicateUserLink
|
DBError::DuplicateUserLink
|
||||||
} else if msg.contains("starchart_users.profile_photo_html_url") {
|
|
||||||
DBError::DuplicateProfilePhotoLink
|
|
||||||
} else if msg.contains("starchart_project_topics.name") {
|
} else if msg.contains("starchart_project_topics.name") {
|
||||||
DBError::DuplicateTopic
|
DBError::DuplicateTopic
|
||||||
} else if msg.contains("starchart_repositories.name") {
|
} else if msg.contains("starchart_repositories.name") {
|
||||||
|
|
Loading…
Reference in a new issue