diff options
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | src/database.rs | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -1585,7 +1585,7 @@ dependencies = [ [[package]] name = "rss-watcher" -version = "0.1.0" +version = "0.3.2" dependencies = [ "chrono", "env_logger", diff --git a/src/database.rs b/src/database.rs index cd097eb..83d3fea 100644 --- a/src/database.rs +++ b/src/database.rs @@ -75,6 +75,10 @@ fn table_create(conn: &mut Conn) { error!("Could not create table! ({:#?}", x); process::exit(1); } + if let Err(x) = tx.query_drop("SET SESSION sql_mode='NO_AUTO_VALUE_ON_ZERO'") { + error!("Could not set NO_AUTO_VALUE_ON_ZERO sql_mode for session, you might have to change the id of this row manually from 1 to 0! ({:#?}", x); + process::exit(1); + } q = "INSERT INTO `rss-watcher-feeds` (id, url, last_fetch, |