feat(gpodder_sqlite): add signup links table
parent
2514aa8413
commit
c48d2a78ca
|
@ -15,8 +15,15 @@ tracing = { workspace = true }
|
|||
chrono = { workspace = true, features = ["serde"] }
|
||||
|
||||
libsqlite3-sys = { version = "0.31.0", features = ["bundled"] }
|
||||
diesel = { version = "2.2.7", features = ["r2d2", "sqlite", "returning_clauses_for_sqlite_3_35"] }
|
||||
diesel_migrations = { version = "2.2.0", features = ["sqlite"] }
|
||||
|
||||
[dependencies.diesel]
|
||||
version = "2.2.7"
|
||||
features = [
|
||||
"r2d2",
|
||||
"sqlite",
|
||||
"returning_clauses_for_sqlite_3_35",
|
||||
]
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.5.1"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
drop table signup_links;
|
|
@ -0,0 +1,5 @@
|
|||
-- Your SQL goes here
|
||||
create table signup_links (
|
||||
id bigint primary key not null,
|
||||
created_at bigint not null
|
||||
);
|
|
@ -2,5 +2,6 @@ pub mod device;
|
|||
pub mod device_subscription;
|
||||
pub mod episode_action;
|
||||
pub mod session;
|
||||
pub mod signup_link;
|
||||
pub mod sync_group;
|
||||
pub mod user;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
use diesel::prelude::*;
|
||||
|
||||
use crate::schema::*;
|
||||
|
||||
#[derive(Clone, Queryable, Selectable, Insertable)]
|
||||
#[diesel(table_name = signup_links)]
|
||||
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
|
||||
pub struct SignupLink {
|
||||
pub id: i64,
|
||||
pub created_at: i64,
|
||||
}
|
|
@ -47,6 +47,13 @@ diesel::table! {
|
|||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
signup_links (id) {
|
||||
id -> BigInt,
|
||||
created_at -> BigInt,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
sync_groups (id) {
|
||||
id -> BigInt,
|
||||
|
@ -74,6 +81,7 @@ diesel::allow_tables_to_appear_in_same_query!(
|
|||
devices,
|
||||
episode_actions,
|
||||
sessions,
|
||||
signup_links,
|
||||
sync_groups,
|
||||
users,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue