mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 20:32:48 +00:00
rename DAV Push subscription table
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "DELETE FROM subscriptions WHERE id = ? ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "589d9e38730b484d594bab8c7e013860427f51a185229ac6a9b36832321b9db7"
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "INSERT OR REPLACE INTO subscriptions (id, topic, expiration, push_resource) VALUES (?, ?, ?, ?)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 4
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "6a8e5ba48d72ad1d6e761c8f050ddb76480b19589fcab0283cac823ce90f94bf"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "SELECT id, topic, expiration, push_resource\n FROM subscriptions\n WHERE (id) = (?)",
|
||||
"query": "SELECT id, topic, expiration, push_resource\n FROM davpush_subscriptions\n WHERE (id) = (?)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -34,5 +34,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "4d89c9973ea3318085749b5982c544c2a337305491ff410ed6e72f0c609af423"
|
||||
"hash": "8159ceb84de9016e738e5fdc9a5203a4c4cbc583483241e3cdee542232c1bc35"
|
||||
}
|
||||
12
.sqlx/query-84772106cd7461119dfaf0e60908f6523860b35c06010bb0a85a531ceeeadede.json
generated
Normal file
12
.sqlx/query-84772106cd7461119dfaf0e60908f6523860b35c06010bb0a85a531ceeeadede.json
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "INSERT OR REPLACE INTO davpush_subscriptions (id, topic, expiration, push_resource) VALUES (?, ?, ?, ?)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 4
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "84772106cd7461119dfaf0e60908f6523860b35c06010bb0a85a531ceeeadede"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "SELECT id, topic, expiration, push_resource\n FROM subscriptions\n WHERE (topic) = (?)",
|
||||
"query": "SELECT id, topic, expiration, push_resource\n FROM davpush_subscriptions\n WHERE (topic) = (?)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -34,5 +34,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "5d882981e72c3610d4ef2f4997ec3f783774cac46b6787e447c74a315f9bdbb8"
|
||||
"hash": "851fdb63dfffde80b8793c08fa6c81ecae1d70b33dd63c8bd5b296eae330b522"
|
||||
}
|
||||
12
.sqlx/query-e912be3352702bbf035b3ee6e9f239bf75a1ffef20211f1b1e895a67a2310960.json
generated
Normal file
12
.sqlx/query-e912be3352702bbf035b3ee6e9f239bf75a1ffef20211f1b1e895a67a2310960.json
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "DELETE FROM davpush_subscriptions WHERE id = ? ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "e912be3352702bbf035b3ee6e9f239bf75a1ffef20211f1b1e895a67a2310960"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
CREATE TABLE subscriptions (
|
||||
CREATE TABLE davpush_subscriptions (
|
||||
id TEXT NOT NULL,
|
||||
topic TEXT NOT NULL,
|
||||
expiration DATETIME NOT NULL,
|
||||
|
||||
@@ -8,7 +8,7 @@ impl SubscriptionStore for SqliteStore {
|
||||
Ok(sqlx::query_as!(
|
||||
Subscription,
|
||||
r#"SELECT id, topic, expiration, push_resource
|
||||
FROM subscriptions
|
||||
FROM davpush_subscriptions
|
||||
WHERE (topic) = (?)"#,
|
||||
topic
|
||||
)
|
||||
@@ -21,7 +21,7 @@ impl SubscriptionStore for SqliteStore {
|
||||
Ok(sqlx::query_as!(
|
||||
Subscription,
|
||||
r#"SELECT id, topic, expiration, push_resource
|
||||
FROM subscriptions
|
||||
FROM davpush_subscriptions
|
||||
WHERE (id) = (?)"#,
|
||||
id
|
||||
)
|
||||
@@ -32,7 +32,7 @@ impl SubscriptionStore for SqliteStore {
|
||||
|
||||
async fn upsert_subscription(&self, sub: Subscription) -> Result<bool, Error> {
|
||||
sqlx::query!(
|
||||
r#"INSERT OR REPLACE INTO subscriptions (id, topic, expiration, push_resource) VALUES (?, ?, ?, ?)"#,
|
||||
r#"INSERT OR REPLACE INTO davpush_subscriptions (id, topic, expiration, push_resource) VALUES (?, ?, ?, ?)"#,
|
||||
sub.id,
|
||||
sub.topic,
|
||||
sub.expiration,
|
||||
@@ -42,7 +42,7 @@ impl SubscriptionStore for SqliteStore {
|
||||
Ok(false)
|
||||
}
|
||||
async fn delete_subscription(&self, id: &str) -> Result<(), Error> {
|
||||
sqlx::query!(r#"DELETE FROM subscriptions WHERE id = ? "#, id)
|
||||
sqlx::query!(r#"DELETE FROM davpush_subscriptions WHERE id = ? "#, id)
|
||||
.execute(&self.db)
|
||||
.await
|
||||
.map_err(crate::Error::from)?;
|
||||
|
||||
Reference in New Issue
Block a user