move prisma schema and migrations to /core (#392)

* move prisma schema and migrations to /core

* fix prisma updates
This commit is contained in:
Brendan Allan 2022-10-04 17:32:46 +08:00 committed by GitHub
parent 7f442f39dc
commit 66dd9aa28b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 28 deletions

6
Cargo.lock generated
View file

@ -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",

View file

@ -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" }

View file

@ -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"

View file

@ -5,7 +5,7 @@ datasource db {
generator client {
provider = "cargo prisma"
output = "../../core/src/prisma.rs"
output = "../src/prisma.rs"
}
model Migration {

View file

@ -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,

View file

@ -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()

View file

@ -0,0 +1,7 @@
[package]
name = "prisma-cli"
version = "0.1.0"
edition = "2021"
[dependencies]
prisma-client-rust-cli = { workspace = true }

View file

@ -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 }