Add migration for threads. Add ability to load .env from wd
This commit is contained in:
parent
4416e5d175
commit
6e831c8253
2
migrations/20230511125236_reminder_threads.sql
Normal file
2
migrations/20230511125236_reminder_threads.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-- Add migration script here
|
||||||
|
ALTER TABLE reminders ADD COLUMN `thread_id` BIGINT DEFAULT NULL;
|
@ -90,6 +90,8 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
|
|||||||
|
|
||||||
if Path::new("/etc/reminder-rs/config.env").exists() {
|
if Path::new("/etc/reminder-rs/config.env").exists() {
|
||||||
dotenv::from_path("/etc/reminder-rs/config.env")?;
|
dotenv::from_path("/etc/reminder-rs/config.env")?;
|
||||||
|
} else {
|
||||||
|
dotenv::from_path(".env")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let discord_token = env::var("DISCORD_TOKEN").expect("Missing DISCORD_TOKEN from environment");
|
let discord_token = env::var("DISCORD_TOKEN").expect("Missing DISCORD_TOKEN from environment");
|
||||||
|
Loading…
Reference in New Issue
Block a user