diff --git a/migrations/2025-08-04-180235_add_status_to_user/down.sql b/migrations/2025-08-04-180235_add_status_to_user/down.sql new file mode 100644 index 0000000..163f7f1 --- /dev/null +++ b/migrations/2025-08-04-180235_add_status_to_user/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +ALTER TABLE users DROP COLUMN online_status; diff --git a/migrations/2025-08-04-180235_add_status_to_user/up.sql b/migrations/2025-08-04-180235_add_status_to_user/up.sql new file mode 100644 index 0000000..ac16d77 --- /dev/null +++ b/migrations/2025-08-04-180235_add_status_to_user/up.sql @@ -0,0 +1,2 @@ +-- Your SQL goes here +ALTER TABLE users ADD COLUMN online_status INT2 NOT NULL DEFAULT 0; diff --git a/src/schema.rs b/src/schema.rs index 413f3f1..88f6155 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -157,6 +157,7 @@ diesel::table! { pronouns -> Nullable, #[max_length = 200] about -> Nullable, + online_status -> Int2, } }