diff --git a/CHANGELOG.md b/CHANGELOG.md index c39e889a..617ece17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [[0.11.16]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.16) - 2024-02-19 ### Changed + - [499](https://github.com/thoth-pub/thoth/issues/499) - Default main\_contribution to true - [561](https://github.com/thoth-pub/thoth/issues/561) - Add "Publisher Website" as a location platform - [553](https://github.com/thoth-pub/thoth/pull/553) - Upgrade rust to `1.76.0` in production and development `Dockerfile` - [305](https://github.com/thoth-pub/thoth/issues/305) - Update rust edition to 2021 diff --git a/thoth-api/migrations/v0.11.17/down.sql b/thoth-api/migrations/v0.11.17/down.sql new file mode 100644 index 00000000..055b53a9 --- /dev/null +++ b/thoth-api/migrations/v0.11.17/down.sql @@ -0,0 +1,2 @@ +ALTER TABLE contribution + ALTER COLUMN main_contribution SET DEFAULT False; diff --git a/thoth-api/migrations/v0.11.17/up.sql b/thoth-api/migrations/v0.11.17/up.sql new file mode 100644 index 00000000..87fe07b7 --- /dev/null +++ b/thoth-api/migrations/v0.11.17/up.sql @@ -0,0 +1,2 @@ +ALTER TABLE contribution + ALTER COLUMN main_contribution SET DEFAULT True; diff --git a/thoth-api/src/model/contribution/mod.rs b/thoth-api/src/model/contribution/mod.rs index ae6c87be..aa670d6d 100644 --- a/thoth-api/src/model/contribution/mod.rs +++ b/thoth-api/src/model/contribution/mod.rs @@ -212,7 +212,7 @@ impl Default for Contribution { work_id: Default::default(), contributor_id: Default::default(), contribution_type: Default::default(), - main_contribution: Default::default(), + main_contribution: true, biography: Default::default(), created_at: Default::default(), updated_at: Default::default(),