Store room times as epoch time

Resets migrations because nobody except me is using cove anyways and
this is easier than keeping backwards compatibility.
This commit is contained in:
Joscha 2022-08-03 00:22:07 +02:00
parent cbe2b2e10e
commit b57c70dd01
3 changed files with 13 additions and 18 deletions

View file

@ -86,7 +86,7 @@ impl EuphVault {
&self.room
}
pub fn join(&self, time: OffsetDateTime) {
pub fn join(&self, time: Time) {
let request = EuphRequest::Join {
room: self.room.clone(),
time,
@ -221,7 +221,7 @@ pub(super) enum EuphRequest {
},
Join {
room: String,
time: OffsetDateTime,
time: Time,
},
Delete {
room: String,
@ -382,7 +382,7 @@ impl EuphRequest {
Ok(())
}
fn join(conn: &mut Connection, room: String, time: OffsetDateTime) -> rusqlite::Result<()> {
fn join(conn: &mut Connection, room: String, time: Time) -> rusqlite::Result<()> {
conn.execute(
"
INSERT INTO euph_rooms (room, first_joined, last_joined)