Skip to content

Commit 3ef5abe

Browse files
authored
V6 upgrade (#856)
* fix(ts-utils): remove hoisted variables * build(backend): upgrade deps * feat(backend): update to new apalis version * chore(backend): remove comment * refactor(backend): do not have star import * feat(backend): change to memory storage * feat(*): remaining cleanup for new storage * ci(backend): hoist dep to workspace * feat(database): start migration collection data * feat(database): migrate all collection ids * chore(backend): change the type of collection id * chore(frontend): migrate to new collection id data type * chore(database): split steps * fix(backend): do not associate when no entity to associate to * chore(database): change migration script name * feat(database): change primary key values of review * chore(backend): adapt to new db schema * feat(*): adapt to new gql schema * fix(backend): generate new id for creating review * chore(backend): do not create ids incorrectly * feat(backend): setup correct triggers * fix(database): rebuild correct primary keys and indices * feat(database): change existing migrations * feat(database): change primary key for seen table * feat(backend): adapt to new gql schema * chore(frontend): adapt to new gql schema * chore(database): change order of new migrations * feat(database): change default value for calendar event * feat(backend): adapt to new database schema * chore(backend): remove useless binding * chore(database): change order of migrations * fix(database): change default prefix * feat(database): migrate data of import report * Revert "fix(database): change default prefix" This reverts commit 7c99a19. * fix(frontend): add a data import attribute to html * chore(backend): adapt to new db schema * fix(backend): use correct prefix for table * feat(database): migrate genre data * chore(database): change column types * fix(database): change name of constraint * chore(backend): additional attributes * feat(backend): adapt to new database schema * chore(frontend): adapt to new gql schema * fix(backend): cast into correct type * feat(backend): remove useless genre * fix(backend): add relation between entities * build(backend): bump version * chore(backend): remove un-needed deps * feat(database): migration for metadata group * feat(backend): adapt to new database schema * chore(frontend): adapt to new gql schema * fix(backend): create unqiue index again * feat(database): migration to change person PK * feat(backend): adapt to new database schema * chore(frontend): adapt to new gql schema * chore(frontend): remove useless event * feat(database): perform migration only when necessary * feat(database): add checks before migration * fix(database): change column types for tables * feat(database): perform migration only when necessary * feat(database): add checks before migration * fix(database): change column types for tables * fix(database): change more column types * fix(database): migrate 2 schemas * feat(database): migrate most of the tables * fix(database): set correct default values * feat(database): change order of seen table columns * chore(database): change order of columns * feat(database): change order of columns * chore(database): order of columns * feat(database): recreate constraint * chore(database): change order of columns * chore(database): change order of migrations * chore(database): change name of migration * feat(database): migration to change metadata id to text * refactor(database): change location of function * fix(database): do not set to not null * feat(database): change types of columns * chore(backend): remove sql cast * chore(database): change order of columns * chore(database): more ordering of columns * feat(database): create indices * chore(backend): adjust to new backend schema * feat(database): add reset summary migration * refactor(database): change order of fns * chore(graphql): generate new types * chore(frontend): adapt to new gql schema * fix(backend): modify partial selects * chore(backend): remove outdated volume * fix(frontend): use correct input * chore(docs): remove warning * chore(database): change name of migration * chore(backend): change wording * chore(database/migrations): show trace warnings and infos * refactor(backend): change location of enum * feat(database): add migration to change enums * chore(database): change names of migrations * feat(*): upgrade sea-orm version * fix(frontend): revert to old sort by * fix(frontend): correct filter type * fix(backend): correct types for filter * fix(backend): use correct filter for seen state * chore(backend): remove state * fix(database): remove useless attribute * feat(backend): prefix new workouts with `wor_` * feat(database): new prefix for workouts * feat(backend): do not generate workout id in hook * chore(database): change name of migration * fix(backend): correct logic for last updated and id * fix(backend): no more useless processing of old workouts * build(backend): remove dependency on git branch * chore: change name of migrations * feat(database): change casing of core enum * fix(database): update one enum correctly * fix(database): do not set summary * feat(database,backend): change casing of stuff * fix(database): more casing handling * fix(database): update bests correctly * build(backend): bump version * fix(database): reset state changes for people * Revert "build(backend): bump version" This reverts commit 380b68e. * chore(database): add logging to chaning enum * chore(database): remove comment * feat(database,backend): change migration names * build(backend): bump version * feat(database): add new v6 migration * feat(database,backend): change order of migrations * chore(database): remove useless function * fix(database): add first v6 migration * chore(database): remove useless files * feat(database): migration to change boolean columns * feat(backend): change names of boolean columns * chore(frontend): adapt to new gql schema * fix(database): change migration to take boolean column into account * fix(frontend): do not show collection entity * feat(backend): change type of user primary key * feat(database): change primary keys of stuff * fix(database): add new indices and constraints * chore(database): change order of columns * merge main * fix(backend): use correct value of last migration * feat(backend): adapt to new database schema * refactor(backend): move model into mod * feat(database): start implementing user changes for reviews * chore(database): start reviews * chore(backend): hardcode correct values * fix(backend): take out of reference * chore(docs): update included file * feat(database): reviews almost done * fix(database): get comments working * feat(database): add index for sink integrations * build(backend): remove hashing deps * feat(config): remove useless config param * refactor(backend): adjust to new database schema * feat(backend): use new url * chore: remove clippy errors * docs: change integrations url * fix(frontend): adjust to new integration urls * build(backend): un-bump version * Revert "feat(database): add index for sink integrations" This reverts commit 0cbdc80. * feat(database): add integrations table * feat(backend): generate entities for new models * build(backend,database): move dep * Revert "build(backend,database): move dep" This reverts commit fbfde51. * feat(database,backend): add enum for integration lot * feat(backend,database): add integration lot and source * refactor(backend): move import * chore(database,backend): change name of column * feat(backend): add specific for integrations * feat(backend): async graphql types * feat(database,backend): make column nullable * feat(backend): allow creating user integration * feat(backend): mutation to delete an integration * feat(frontend): slightly adapt to new schema * chore(backend,frontend): change name of mutations * chore(backend): change name of property * feat(frontend): adapt to new gql schema * chore(databases): remove index * feat(database): add two indices * feat(backend): sync users table to new integrations * feat(backend): use new integration source * feat(backend): remove old integrations code * feat(backend): get integrations query working * feat(backend): update integration when triggered * feat(frontend): display integrations * feat(frontend): close eyes when opened * chore(frontend): add space * chore(frontend): adapt to new gql schema * feat(ci): add shortcut for integrations * docs: update new webhook url * chore(frontend): adapt to new webhook format * docs: add migration instructions * docs: tell about deleted integrations * refactor(frontend): change name of variable * fix(frontend): change case of integrations * fix(frontend): deleting should not reset filter * feat(backend): add template for monitoring column * feat(frontend): respect new configuration variable * feat(database): add information template for existing user's monitoring collection * fix(frontend): data type for number input * feat(backend): remove dependency on `uuid` * chore(backend): add todo comment * chore(database): remove useless comment * feat(backend): remove entities from monitoring correctly * fix(backend): remove is_empty check for arrays * chore(backend): remove development mutation call * docs: new migration information * build(backend): minor upgrade deps * build(ts): upgrade deps * chore: enable single fetch * feat(frontend): add generics to meta types * chore(frontend): do not return bare responses from API routes * build(backend): update deps * chore(docs): update include * build(backend): pin dependency versions * chore(database): change name of migration * fix(backend): change workout related calculations * docs: change plugins to integrations * feat(database): add collection_to_entity.created_on column * chore(config): change number of days to remove from monitoring * chore(database): remove migration for monitoring * fix(backend): add trait for checking updation * feat(backend): send timezone details to tmdb * feat(backend): basic stuff * refactor(backend): move client to base * refactor(backend): change name of struct * refactor(backend): remove extra impls * feat(backend): take additional args to check for force update * feat(backend): upgrade `cached` deps * feat(backend): do not update when no changes in upstream * feat(backend): work for tmdb tv shows * feat(backend): change function to remove stuff from monitoring * fix(backend): calculate abs days before removing * feat(config): change number of days * build(backend): bump version * chore(backend): remove function invocation * docs: better link * chore(config): order of impls
1 parent cf3beb2 commit 3ef5abe

File tree

126 files changed

+3993
-5373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+3993
-5373
lines changed

Cargo.lock

+571-545
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+11-13
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ members = ["apps/backend", "libs/config", "libs/database", "libs/rs-utils"]
33
resolver = "2"
44

55
[workspace.dependencies]
6-
anyhow = "1.0.82"
7-
async-graphql = { version = "7.0.5", features = [
6+
anyhow = "=1.0.82"
7+
async-graphql = { version = "=7.0.5", features = [
88
"chrono",
99
"decimal",
1010
"log",
1111
"tracing",
12-
"uuid",
1312
] }
14-
chrono = "0.4.38"
15-
nanoid = "0.4.0"
16-
schematic = { version = "0.16", features = [
13+
chrono = "=0.4.38"
14+
nanoid = "=0.4.0"
15+
schematic = { version = "=0.16.4", features = [
1716
"config",
1817
"json",
1918
"schema",
@@ -25,7 +24,7 @@ schematic = { version = "0.16", features = [
2524
"renderer_template",
2625
"yaml",
2726
], default-features = false }
28-
sea-orm = { version = "1.0.0-rc.5", features = [
27+
sea-orm = { version = "=1.0.0-rc.5", features = [
2928
"debug-print",
3029
"postgres-array",
3130
"macros",
@@ -34,10 +33,9 @@ sea-orm = { version = "1.0.0-rc.5", features = [
3433
"with-chrono",
3534
"with-json",
3635
"with-rust_decimal",
37-
"with-uuid",
3836
], default-features = false }
39-
sea-orm-migration = "1.0.0-rc.5"
40-
serde = { version = "1.0.202", features = ["derive"] }
41-
serde_json = "1.0.116"
42-
strum = { version = "0.26.2", features = ["derive"] }
43-
tracing = { version = "0.1.40", features = ["attributes"] }
37+
sea-orm-migration = "=1.0.0-rc.5"
38+
serde = { version = "=1.0.202", features = ["derive"] }
39+
serde_json = "=1.0.117"
40+
strum = { version = "=0.26.2", features = ["derive"] }
41+
tracing = { version = "=0.1.40", features = ["attributes"] }

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
Ryot (**R**oll **Y**our **O**wn **T**racker), pronounced "riot", aims to be the only self
3232
hosted tracker you will ever need!
3333

34+
## IMPORTANT NOTE FOR `v5.*` USERS
35+
36+
If you were using `v5.*` of Ryot, please read the
37+
[migration guide](https://docs.ryot.io/migration.html#from-v5-v6) for instructions.
38+
3439
## 💻 Demo
3540

3641
You can use the demo account on the Ryot website. Login with the username `demo` and

apps/backend/Cargo.toml

+48-50
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,79 @@
11
[package]
22
name = "ryot"
3-
version = "5.5.6"
3+
version = "6.0.0"
44
edition = "2021"
55
repository = "https://github.com/IgnisDa/ryot"
66
license = "GPL-3.0"
77

88
[dependencies]
99
anyhow = { workspace = true }
10-
apalis = { version = "0.5.3", features = ["cron", "limit"] }
11-
argon2 = "0.5.3"
10+
apalis = { version = "=0.5.3", features = ["cron", "limit"] }
11+
argon2 = "=0.6.0-pre.0"
1212
async-graphql = { workspace = true }
13-
async-graphql-axum = "7.0.3"
14-
async-trait = "0.1.80"
15-
aws-sdk-s3 = { version = "1.23.0", features = ["behavior-version-latest"] }
16-
axum = { version = "0.7.5", features = ["macros", "multipart"] }
17-
boilermates = "0.3.0"
18-
cached = { version = "0.49.3", features = ["disk_store"] }
13+
async-graphql-axum = "=7.0.5"
14+
async-trait = "=0.1.80"
15+
aws-sdk-s3 = { version = "=1.34.0", features = ["behavior-version-latest"] }
16+
axum = { version = "=0.7.5", features = ["macros", "multipart"] }
17+
boilermates = "=0.3.0"
18+
cached = { version = "=0.51.4", features = ["disk_store"] }
1919
chrono = { workspace = true }
20-
chrono-tz = "0.9.0"
20+
chrono-tz = "=0.9.0"
2121
config = { path = "../../libs/config" }
22-
convert_case = "0.6.0"
23-
const-str = "0.5.7"
24-
csv = "1.3.0"
22+
convert_case = "=0.6.0"
23+
const-str = "=0.5.7"
24+
csv = "=1.3.0"
2525
database = { path = "../../libs/database" }
26-
data-encoding = "2.5.0"
27-
derive_more = { version = "1.0.0-beta.6", features = [
26+
data-encoding = "=2.6.0"
27+
derive_more = { version = "=1.0.0-beta.6", features = [
2828
"add",
2929
"sum",
3030
"add_assign",
3131
], default-features = false }
32-
dotenvy = "0.15.7"
33-
enum_meta = "0.6.0"
34-
flate2 = "1.0.28"
35-
futures = "0.3.30"
36-
graphql_client = "0.14.0"
37-
harsh = "0.2.2"
38-
hashbag = "0.1.12"
39-
http = "1.1.0"
40-
http-types = "2.12.0"
41-
isolang = { version = "2.4.0", features = ["list_languages"] }
42-
itertools = "0.12.1"
43-
jsonwebtoken = { version = "9.3.0", default-features = false }
44-
kinded = "0.3.0"
45-
lettre = { version = "0.11.6", features = [
32+
dotenvy = "=0.15.7"
33+
enum_meta = "=0.6.0"
34+
flate2 = "=1.0.30"
35+
futures = "=0.3.30"
36+
graphql_client = "=0.14.0"
37+
hashbag = "=0.1.12"
38+
http = "=1.1.0"
39+
http-types = "=2.12.0"
40+
isolang = { version = "=2.4.0", features = ["list_languages"] }
41+
itertools = "=0.13.0"
42+
jsonwebtoken = { version = "=9.3.0", default-features = false }
43+
kinded = "=0.3.0"
44+
lettre = { version = "=0.11.7", features = [
4645
"rustls-tls",
4746
"smtp-transport",
4847
"builder",
4948
], default-features = false }
50-
markdown = "1.0.0-alpha.15"
49+
markdown = "=1.0.0-alpha.17"
5150
nanoid = { workspace = true }
52-
openidconnect = "3.5.0"
53-
paginate = "1.1.11"
54-
rand = "0.8.5"
55-
regex = "1.10.4"
51+
openidconnect = "=3.5.0"
52+
paginate = "=1.1.11"
53+
rand = "=0.9.0-alpha.1"
54+
regex = "=1.10.4"
5655
rs-utils = { path = "../../libs/rs-utils" }
57-
rust_decimal = "1.35.0"
58-
rust_decimal_macros = "1.34.2"
59-
rust_iso3166 = "0.1.12"
56+
rust_decimal = "=1.35.0"
57+
rust_decimal_macros = "=1.34.2"
58+
rust_iso3166 = "=0.1.13"
6059
schematic = { workspace = true }
61-
scraper = "0.19.0"
60+
scraper = "=0.19.0"
6261
sea-orm = { workspace = true }
6362
sea-orm-migration = { workspace = true }
64-
sea-query = "0.31.0-rc.6"
63+
sea-query = "=0.31.0-rc.7"
6564
serde = { workspace = true }
6665
serde_json = { workspace = true }
67-
serde_with = { version = "3.7.0", features = ["chrono_0_4"] }
68-
serde-xml-rs = "0.6.0"
69-
slug = "0.1.5"
66+
serde_with = { version = "=3.8.1", features = ["chrono_0_4"] }
67+
serde-xml-rs = "=0.6.0"
68+
slug = "=0.1.5"
7069
strum = { workspace = true }
71-
struson = { version = "0.5.0", features = ["serde"] }
72-
surf = { version = "2.3.2", features = [
70+
struson = { version = "=0.5.0", features = ["serde"] }
71+
surf = { version = "=2.3.2", features = [
7372
"h1-client-rustls",
7473
], default-features = false }
75-
tokio = { version = "1.37.0", features = ["full"] }
76-
tower = { version = "0.4.13", features = ["buffer"] }
77-
tower-http = { version = "0.5.2", features = ["catch-panic", "cors", "trace"] }
74+
tokio = { version = "=1.38.0", features = ["full"] }
75+
tower = { version = "=0.4.13", features = ["buffer"] }
76+
tower-http = { version = "=0.5.2", features = ["catch-panic", "cors", "trace"] }
7877
tracing = { workspace = true }
79-
tracing-subscriber = "0.3.18"
80-
logs-wheel = "0.3.1"
81-
uuid = "1.8.0"
78+
tracing-subscriber = "=0.3.18"
79+
logs-wheel = "=0.3.1"

apps/backend/src/background.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ pub async fn yank_integrations_data(
6363
// The background jobs which cannot be throttled.
6464
#[derive(Debug, Deserialize, Serialize, Display)]
6565
pub enum CoreApplicationJob {
66-
YankIntegrationsData(i32),
67-
BulkProgressUpdate(i32, Vec<ProgressUpdateInput>),
66+
YankIntegrationsData(String),
67+
BulkProgressUpdate(String, Vec<ProgressUpdateInput>),
6868
}
6969

7070
impl Message for CoreApplicationJob {
@@ -80,7 +80,7 @@ pub async fn perform_core_application_job(
8080
let start = Instant::now();
8181
let status = match information {
8282
CoreApplicationJob::YankIntegrationsData(user_id) => misc_service
83-
.yank_integrations_data_for_user(user_id)
83+
.yank_integrations_data_for_user(&user_id)
8484
.await
8585
.is_ok(),
8686
CoreApplicationJob::BulkProgressUpdate(user_id, input) => misc_service
@@ -100,16 +100,16 @@ pub async fn perform_core_application_job(
100100
// The background jobs which can be deployed by the application.
101101
#[derive(Debug, Deserialize, Serialize, Display)]
102102
pub enum ApplicationJob {
103-
ImportFromExternalSource(i32, Box<DeployImportJobInput>),
104-
ReEvaluateUserWorkouts(i32),
105-
UpdateMetadata(String),
103+
ImportFromExternalSource(String, Box<DeployImportJobInput>),
104+
ReEvaluateUserWorkouts(String),
105+
UpdateMetadata(String, bool),
106106
UpdateGithubExerciseJob(Exercise),
107107
UpdatePerson(String),
108108
RecalculateCalendarEvents,
109109
AssociateGroupWithMetadata(MediaLot, MediaSource, String),
110110
ReviewPosted(ReviewPostedEvent),
111-
PerformExport(i32, Vec<ExportItem>),
112-
RecalculateUserSummary(i32),
111+
PerformExport(String, Vec<ExportItem>),
112+
RecalculateUserSummary(String),
113113
PerformBackgroundTasks,
114114
}
115115

@@ -133,15 +133,15 @@ pub async fn perform_application_job(
133133
.await
134134
.is_ok(),
135135
ApplicationJob::RecalculateUserSummary(user_id) => misc_service
136-
.calculate_user_summary(user_id, true)
136+
.calculate_user_summary(&user_id, true)
137137
.await
138138
.is_ok(),
139139
ApplicationJob::ReEvaluateUserWorkouts(user_id) => exercise_service
140140
.re_evaluate_user_workouts(user_id)
141141
.await
142142
.is_ok(),
143-
ApplicationJob::UpdateMetadata(metadata_id) => misc_service
144-
.update_metadata_and_notify_users(&metadata_id)
143+
ApplicationJob::UpdateMetadata(metadata_id, force_update) => misc_service
144+
.update_metadata_and_notify_users(&metadata_id, force_update)
145145
.await
146146
.is_ok(),
147147
ApplicationJob::UpdatePerson(person_id) => misc_service

apps/backend/src/entities/collection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct Model {
1919
pub last_updated_on: DateTimeUtc,
2020
pub name: String,
2121
pub description: Option<String>,
22-
pub user_id: i32,
22+
pub user_id: String,
2323
#[sea_orm(column_type = "Json")]
2424
pub information_template: Option<Vec<CollectionExtraInformation>>,
2525
}

apps/backend/src/entities/collection_to_entity.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use serde::{Deserialize, Serialize};
88
pub struct Model {
99
#[sea_orm(primary_key)]
1010
pub id: i32,
11+
pub created_on: DateTimeUtc,
1112
pub last_updated_on: DateTimeUtc,
1213
pub collection_id: String,
1314
pub metadata_id: Option<String>,

apps/backend/src/entities/exercise.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub struct Model {
4646
pub muscles: Vec<ExerciseMuscle>,
4747
pub attributes: ExerciseAttributes,
4848
#[graphql(skip_input)]
49-
pub created_by_user_id: Option<i32>,
49+
pub created_by_user_id: Option<String>,
5050
}
5151

5252
#[async_trait]

apps/backend/src/entities/import_report.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ use crate::importer::ImportResultResponse;
1515
pub struct Model {
1616
#[sea_orm(primary_key, auto_increment = false)]
1717
pub id: String,
18-
pub user_id: i32,
18+
pub user_id: String,
1919
pub source: ImportSource,
2020
pub started_on: DateTimeUtc,
2121
pub finished_on: Option<DateTimeUtc>,
2222
pub details: Option<ImportResultResponse>,
23-
pub success: Option<bool>,
23+
pub was_success: Option<bool>,
2424
}
2525

2626
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
2+
3+
use async_graphql::{InputObject, SimpleObject};
4+
use async_trait::async_trait;
5+
use database::{IntegrationLot, IntegrationSource};
6+
use nanoid::nanoid;
7+
use sea_orm::{entity::prelude::*, ActiveValue};
8+
9+
use crate::models::media::IntegrationSourceSpecifics;
10+
11+
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, SimpleObject, InputObject)]
12+
#[sea_orm(table_name = "integration")]
13+
#[graphql(name = "Integration", input_name = "IntegrationInput")]
14+
pub struct Model {
15+
#[sea_orm(primary_key, auto_increment = false)]
16+
#[graphql(skip_input)]
17+
pub id: String,
18+
#[graphql(skip)]
19+
pub user_id: String,
20+
pub lot: IntegrationLot,
21+
pub source: IntegrationSource,
22+
#[graphql(skip_input)]
23+
pub created_on: DateTimeUtc,
24+
#[graphql(skip_input)]
25+
pub last_triggered_on: Option<DateTimeUtc>,
26+
#[sea_orm(column_type = "Json")]
27+
pub source_specifics: Option<IntegrationSourceSpecifics>,
28+
}
29+
30+
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
31+
pub enum Relation {
32+
#[sea_orm(
33+
belongs_to = "super::user::Entity",
34+
from = "Column::UserId",
35+
to = "super::user::Column::Id",
36+
on_update = "Cascade",
37+
on_delete = "Cascade"
38+
)]
39+
User,
40+
}
41+
42+
impl Related<super::user::Entity> for Entity {
43+
fn to() -> RelationDef {
44+
Relation::User.def()
45+
}
46+
}
47+
48+
#[async_trait]
49+
impl ActiveModelBehavior for ActiveModel {
50+
async fn before_save<C>(mut self, _db: &C, insert: bool) -> Result<Self, DbErr>
51+
where
52+
C: ConnectionTrait,
53+
{
54+
if insert {
55+
self.id = ActiveValue::Set(format!("int_{}", nanoid!(12)));
56+
}
57+
Ok(self)
58+
}
59+
}

apps/backend/src/entities/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub mod collection_to_entity;
88
pub mod exercise;
99
pub mod genre;
1010
pub mod import_report;
11+
pub mod integration;
1112
pub mod metadata;
1213
pub mod metadata_group;
1314
pub mod metadata_to_genre;

apps/backend/src/entities/prelude.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub use super::collection_to_entity::Entity as CollectionToEntity;
66
pub use super::exercise::Entity as Exercise;
77
pub use super::genre::Entity as Genre;
88
pub use super::import_report::Entity as ImportReport;
9+
pub use super::integration::Entity as Integration;
910
pub use super::metadata::Entity as Metadata;
1011
pub use super::metadata_group::Entity as MetadataGroup;
1112
pub use super::metadata_to_genre::Entity as MetadataToGenre;

apps/backend/src/entities/queued_notification.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub struct Model {
1010
#[sea_orm(primary_key, auto_increment = false)]
1111
pub id: String,
1212
pub message: String,
13-
pub user_id: i32,
13+
pub user_id: String,
1414
}
1515

1616
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

apps/backend/src/entities/review.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ pub struct Model {
2424
pub rating: Option<Decimal>,
2525
pub text: Option<String>,
2626
pub visibility: Visibility,
27-
pub spoiler: bool,
28-
pub user_id: i32,
27+
pub is_spoiler: bool,
28+
pub user_id: String,
2929
pub metadata_id: Option<String>,
3030
pub person_id: Option<String>,
3131
pub metadata_group_id: Option<String>,

apps/backend/src/entities/seen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct Model {
3030
pub progress: Decimal,
3131
pub started_on: Option<NaiveDate>,
3232
pub finished_on: Option<NaiveDate>,
33-
pub user_id: i32,
33+
pub user_id: String,
3434
pub metadata_id: String,
3535
pub state: SeenState,
3636
pub provider_watched_on: Option<String>,

0 commit comments

Comments
 (0)