remove sqlite extensions to fix docker issue
UUIDs are now generated in the backend before insertion
This commit is contained in:
@@ -32,7 +32,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let warren = self
|
||||
.create_warren(&mut connection, request.name(), request.path())
|
||||
@@ -47,7 +47,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let warren = self
|
||||
.edit_warren(
|
||||
@@ -70,7 +70,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let warren = self
|
||||
.delete_warren(&mut connection, request.id())
|
||||
@@ -88,7 +88,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let warrens = self
|
||||
.fetch_warrens(&mut connection, request.ids())
|
||||
@@ -106,7 +106,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let warrens = self
|
||||
.fetch_all_warrens(&mut connection)
|
||||
@@ -121,7 +121,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let warren = self
|
||||
.get_warren(&mut connection, request.id())
|
||||
@@ -144,7 +144,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
super::share::get_share(&mut connection, request)
|
||||
.await
|
||||
@@ -159,7 +159,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
super::share::create_share(&mut connection, request)
|
||||
.await
|
||||
@@ -177,7 +177,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
let path = request.path().clone();
|
||||
|
||||
@@ -195,7 +195,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
super::share::delete_share(&mut connection, request)
|
||||
.await
|
||||
@@ -211,7 +211,7 @@ impl WarrenRepository for Sqlite {
|
||||
.pool
|
||||
.acquire()
|
||||
.await
|
||||
.context("Failed to get a PostgreSQL connection")?;
|
||||
.context("Failed to get a Sqlite connection")?;
|
||||
|
||||
super::share::verify_password(&mut connection, request)
|
||||
.await
|
||||
@@ -232,16 +232,19 @@ impl Sqlite {
|
||||
let warren: Warren = sqlx::query_as(
|
||||
"
|
||||
INSERT INTO warrens (
|
||||
id,
|
||||
name,
|
||||
path
|
||||
) VALUES (
|
||||
$1,
|
||||
$2
|
||||
$2,
|
||||
$3
|
||||
)
|
||||
RETURNING
|
||||
*
|
||||
",
|
||||
)
|
||||
.bind(Uuid::new_v4())
|
||||
.bind(name)
|
||||
.bind(path)
|
||||
.fetch_one(&mut *tx)
|
||||
|
||||
Reference in New Issue
Block a user