mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
move prisma schema and migrations to /core (#392)
* move prisma schema and migrations to /core * fix prisma updates
This commit is contained in:
parent
7f442f39dc
commit
66dd9aa28b
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -3391,7 +3391,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "prisma-client-rust"
|
||||
version = "0.6.1"
|
||||
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6#6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6"
|
||||
source = "git+https://github.com/Brendonovich/prisma-client-rust.git?rev=f9e0579c1b70727b6f030095da264a885b13f0c6#f9e0579c1b70727b6f030095da264a885b13f0c6"
|
||||
dependencies = [
|
||||
"base64 0.13.0",
|
||||
"bigdecimal",
|
||||
|
@ -3420,7 +3420,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "prisma-client-rust-cli"
|
||||
version = "0.6.1"
|
||||
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6#6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6"
|
||||
source = "git+https://github.com/Brendonovich/prisma-client-rust.git?rev=f9e0579c1b70727b6f030095da264a885b13f0c6#f9e0579c1b70727b6f030095da264a885b13f0c6"
|
||||
dependencies = [
|
||||
"datamodel",
|
||||
"prisma-client-rust-sdk",
|
||||
|
@ -3435,7 +3435,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "prisma-client-rust-sdk"
|
||||
version = "0.6.1"
|
||||
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6#6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6"
|
||||
source = "git+https://github.com/Brendonovich/prisma-client-rust.git?rev=f9e0579c1b70727b6f030095da264a885b13f0c6#f9e0579c1b70727b6f030095da264a885b13f0c6"
|
||||
dependencies = [
|
||||
"convert_case 0.5.0",
|
||||
"datamodel",
|
||||
|
|
18
Cargo.toml
18
Cargo.toml
|
@ -8,10 +8,20 @@ members = [
|
|||
]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", rev = "f9e0579c1b70727b6f030095da264a885b13f0c6", features = [
|
||||
"rspc",
|
||||
"sqlite-create-many",
|
||||
"migrations",
|
||||
"sqlite",
|
||||
], default-features = false }
|
||||
prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust.git", rev = "f9e0579c1b70727b6f030095da264a885b13f0c6", features = [
|
||||
"rspc",
|
||||
"sqlite-create-many",
|
||||
"migrations",
|
||||
"sqlite",
|
||||
], default-features = false }
|
||||
|
||||
[patch.crates-io]
|
||||
# We use this patch so we can compile for the IOS simulator on M1
|
||||
openssl-sys = { git = "https://github.com/spacedriveapp/rust-openssl" }
|
||||
|
||||
[patch."https://github.com/Brendonovich/prisma-client-rust.git"]
|
||||
prisma-client-rust = { git = "https://github.com//Brendonovich/prisma-client-rust.git", rev = "6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6" }
|
||||
prisma-client-rust-cli = { git = "https://github.com//Brendonovich/prisma-client-rust.git", rev = "6b59d9f0a07c4c5df1f5c97f2c6c1df7082ccac6" }
|
||||
|
|
|
@ -35,12 +35,7 @@ rmp = "^0.8.11"
|
|||
rmp-serde = "^1.1.0"
|
||||
|
||||
# Project dependencies
|
||||
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", tag = "0.6.0", features = [
|
||||
"rspc",
|
||||
"sqlite-create-many",
|
||||
"migrations",
|
||||
"sqlite",
|
||||
], default-features = false }
|
||||
prisma-client-rust = { workspace = true }
|
||||
rspc = { version = "0.0.5", features = ["uuid", "chrono", "tracing"] }
|
||||
uuid = { version = "1.1.2", features = ["v4", "serde"] }
|
||||
sysinfo = "0.23.9"
|
||||
|
|
|
@ -5,7 +5,7 @@ datasource db {
|
|||
|
||||
generator client {
|
||||
provider = "cargo prisma"
|
||||
output = "../../core/src/prisma.rs"
|
||||
output = "../src/prisma.rs"
|
||||
}
|
||||
|
||||
model Migration {
|
|
@ -262,7 +262,7 @@ impl StatefulJob for IndexerJob {
|
|||
.to_string_lossy()
|
||||
.to_string();
|
||||
|
||||
file_path::create(
|
||||
file_path::create_unchecked(
|
||||
entry.file_id,
|
||||
location_id,
|
||||
materialized_path,
|
||||
|
|
|
@ -224,7 +224,7 @@ async fn link_location_and_indexer_rules(
|
|||
.create_many(
|
||||
rules_ids
|
||||
.iter()
|
||||
.map(|id| indexer_rules_in_location::create(location_id, *id, vec![]))
|
||||
.map(|id| indexer_rules_in_location::create_unchecked(location_id, *id, vec![]))
|
||||
.collect(),
|
||||
)
|
||||
.exec()
|
||||
|
|
7
crates/prisma-cli/Cargo.toml
Normal file
7
crates/prisma-cli/Cargo.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
[package]
|
||||
name = "prisma-cli"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
prisma-client-rust-cli = { workspace = true }
|
|
@ -1,12 +0,0 @@
|
|||
[package]
|
||||
name = "prisma-cli"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust.git", tag = "0.6.0", features = [
|
||||
"rspc",
|
||||
"sqlite-create-many",
|
||||
"migrations",
|
||||
"sqlite",
|
||||
], default-features = false }
|
Loading…
Reference in a new issue