Use PCR for migrations (#385)

* use pcr migrations branch

* use 0.6.2 branch with migrations

* use latest prisma stuff

* allow force reset of db in dev

* remove .spacedrive file

* update rspc in apps/server

* use rspc 0.0.5 in all crates

* add os to prisma client cache key

* add runner os to clippy prisma cache
This commit is contained in:
Brendan Allan 2022-09-22 15:50:21 +08:00 committed by GitHub
parent 57ca822d84
commit 6e07435a15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 367 additions and 204 deletions

View file

@ -122,7 +122,7 @@ jobs:
uses: actions/cache@v3
with:
path: ./core/src/prisma.rs
key: prisma-${{ hashFiles('./core/prisma/Cargo.toml', './core/prisma/schema.prisma', './core/prisma/src/main.rs') }}
key: prisma-${{ runner.os }}-${{ hashFiles('./core/prisma/Cargo.toml', './core/prisma/schema.prisma', './core/prisma/src/main.rs') }}
- name: Generate Prisma client
working-directory: core

View file

@ -3,6 +3,8 @@ name: Rust Clippy check
on:
pull_request:
push:
branches:
- main
paths:
- '**.rs'
- '**.toml'
@ -42,7 +44,7 @@ jobs:
uses: actions/cache@v3
with:
path: ./core/src/prisma.rs
key: prisma-${{ hashFiles('./core/prisma/Cargo.toml', './core/prisma/schema.prisma', './core/prisma/src/main.rs') }}
key: prisma-${{ runner.os }}-${{ hashFiles('./core/prisma/Cargo.toml', './core/prisma/schema.prisma', './core/prisma/src/main.rs') }}
- name: Generate Prisma client
working-directory: core

1
.gitignore vendored
View file

@ -62,3 +62,4 @@ examples/*/*.lock
/target
/sdserver_data
.spacedrive

390
Cargo.lock generated
View file

@ -965,25 +965,25 @@ checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"
[[package]]
name = "datamodel"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"bigdecimal 0.2.2",
"chrono",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"dml 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"dml 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"either",
"enumflags2",
"indoc",
"itertools",
"mongodb-datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"mongodb-datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"once_cell",
"parser-database 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"parser-database 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"regex",
"schema-ast 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"schema-ast 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde",
"serde_json",
"sql-datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"sql-datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
@ -1013,12 +1013,12 @@ dependencies = [
[[package]]
name = "datamodel-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"enumflags2",
"lsp-types",
"parser-database 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"parser-database 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde_json",
"url",
]
@ -1084,7 +1084,7 @@ dependencies = [
[[package]]
name = "diagnostics"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"colored",
"pest",
@ -1169,14 +1169,14 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
[[package]]
name = "dml"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"chrono",
"cuid",
"enumflags2",
"indoc",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde",
"serde_json",
"uuid 0.8.2",
@ -1199,10 +1199,10 @@ dependencies = [
[[package]]
name = "dmmf"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"bigdecimal 0.2.2",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"indexmap",
"prisma-models",
"schema",
@ -1575,6 +1575,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "fuchsia-cprng"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]]
name = "funty"
version = "2.0.0"
@ -2548,6 +2554,17 @@ dependencies = [
"treediff",
]
[[package]]
name = "json-rpc-api-build"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"backtrace",
"heck 0.3.3",
"serde",
"toml",
]
[[package]]
name = "json-rpc-api-build"
version = "0.1.0"
@ -3017,6 +3034,20 @@ dependencies = [
"sketches-ddsketch",
]
[[package]]
name = "migration-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"chrono",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"enumflags2",
"sha2 0.9.9",
"tracing",
"tracing-error",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
name = "migration-connector"
version = "0.1.0"
@ -3031,6 +3062,30 @@ dependencies = [
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
]
[[package]]
name = "migration-core"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"async-trait",
"chrono",
"enumflags2",
"json-rpc-api-build 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"jsonrpc-core",
"migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"mongodb-migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"psl 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde",
"serde_json",
"sql-migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"tokio",
"tracing",
"tracing-futures",
"tracing-subscriber",
"url",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
name = "migration-core"
version = "0.1.0"
@ -3039,14 +3094,14 @@ dependencies = [
"async-trait",
"chrono",
"enumflags2",
"json-rpc-api-build",
"json-rpc-api-build 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"jsonrpc-core",
"migration-connector",
"mongodb-migration-connector",
"psl",
"migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"mongodb-migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"psl 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"serde",
"serde_json",
"sql-migration-connector",
"sql-migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"tokio",
"tracing",
"tracing-futures",
@ -3155,7 +3210,7 @@ dependencies = [
[[package]]
name = "mongodb-client"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"mongodb",
"once_cell",
@ -3177,11 +3232,11 @@ dependencies = [
[[package]]
name = "mongodb-datamodel-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"enumflags2",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"once_cell",
"serde_json",
]
@ -3198,6 +3253,23 @@ dependencies = [
"serde_json",
]
[[package]]
name = "mongodb-migration-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"enumflags2",
"futures",
"migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"mongodb",
"mongodb-client 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"mongodb-schema-describer 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde_json",
"tokio",
"tracing",
]
[[package]]
name = "mongodb-migration-connector"
version = "0.1.0"
@ -3206,10 +3278,10 @@ dependencies = [
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"enumflags2",
"futures",
"migration-connector",
"migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"mongodb",
"mongodb-client 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"mongodb-schema-describer",
"mongodb-schema-describer 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"serde_json",
"tokio",
"tracing",
@ -3218,24 +3290,24 @@ dependencies = [
[[package]]
name = "mongodb-query-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"anyhow",
"async-trait",
"bigdecimal 0.2.2",
"chrono",
"cuid",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"futures",
"indexmap",
"itertools",
"metrics 0.18.1",
"metrics-util 0.12.1",
"mongodb",
"mongodb-client 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"mongodb-client 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"prisma-models",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"query-connector",
"rand 0.7.3",
"regex",
@ -3245,10 +3317,20 @@ dependencies = [
"tokio",
"tracing",
"tracing-futures",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"uuid 0.8.2",
]
[[package]]
name = "mongodb-schema-describer"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"futures",
"mongodb",
"serde",
]
[[package]]
name = "mongodb-schema-describer"
version = "0.1.0"
@ -3366,7 +3448,7 @@ dependencies = [
[[package]]
name = "native-types"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"serde",
"serde_json",
@ -3875,13 +3957,13 @@ dependencies = [
[[package]]
name = "parser-database"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"either",
"enumflags2",
"indexmap",
"schema-ast 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"schema-ast 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
@ -4254,15 +4336,17 @@ dependencies = [
[[package]]
name = "prisma-client-rust"
version = "0.6.0"
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=8447fe493414471a23a38d780b3db246266f558f#8447fe493414471a23a38d780b3db246266f558f"
version = "0.6.1"
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=43fd489cd817efc061096978030241bbf7ad3fb9#43fd489cd817efc061096978030241bbf7ad3fb9"
dependencies = [
"base64 0.13.0",
"bigdecimal 0.2.2",
"chrono",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"dmmf",
"include_dir",
"indexmap",
"migration-core 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"prisma-models",
"query-connector",
"query-core",
@ -4271,17 +4355,20 @@ dependencies = [
"serde",
"serde-value",
"serde_json",
"tempdir",
"thiserror",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"tokio",
"tracing",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"uuid 0.8.2",
]
[[package]]
name = "prisma-client-rust-cli"
version = "0.6.0"
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=8447fe493414471a23a38d780b3db246266f558f#8447fe493414471a23a38d780b3db246266f558f"
version = "0.6.1"
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=43fd489cd817efc061096978030241bbf7ad3fb9#43fd489cd817efc061096978030241bbf7ad3fb9"
dependencies = [
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"prisma-client-rust-sdk",
"prisma-models",
"proc-macro2",
@ -4296,11 +4383,11 @@ dependencies = [
[[package]]
name = "prisma-client-rust-sdk"
version = "0.6.0"
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=8447fe493414471a23a38d780b3db246266f558f#8447fe493414471a23a38d780b3db246266f558f"
version = "0.6.1"
source = "git+https://github.com//Brendonovich/prisma-client-rust.git?rev=43fd489cd817efc061096978030241bbf7ad3fb9#43fd489cd817efc061096978030241bbf7ad3fb9"
dependencies = [
"convert_case 0.5.0",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"directories",
"dmmf",
"flate2",
@ -4321,14 +4408,14 @@ dependencies = [
[[package]]
name = "prisma-models"
version = "0.0.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"bigdecimal 0.2.2",
"chrono",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"itertools",
"once_cell",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde",
"serde_derive",
"serde_json",
@ -4338,7 +4425,7 @@ dependencies = [
[[package]]
name = "prisma-value"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"base64 0.12.3",
"bigdecimal 0.2.2",
@ -4424,6 +4511,14 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "psl"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
name = "psl"
version = "0.1.0"
@ -4513,7 +4608,7 @@ dependencies = [
[[package]]
name = "query-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"anyhow",
"async-trait",
@ -4522,18 +4617,18 @@ dependencies = [
"indexmap",
"itertools",
"prisma-models",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"serde",
"serde_json",
"thiserror",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"uuid 0.8.2",
]
[[package]]
name = "query-core"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"async-trait",
"base64 0.12.3",
@ -4542,8 +4637,8 @@ dependencies = [
"connection-string",
"crossbeam-queue",
"cuid",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"futures",
"im",
"indexmap",
@ -4553,7 +4648,7 @@ dependencies = [
"metrics 0.18.1",
"metrics-exporter-prometheus",
"metrics-util 0.12.1",
"mongodb-client 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"mongodb-client 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"mongodb-query-connector",
"once_cell",
"opentelemetry",
@ -4561,7 +4656,7 @@ dependencies = [
"petgraph",
"pin-utils",
"prisma-models",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"query-connector",
"schema",
"schema-builder",
@ -4575,7 +4670,7 @@ dependencies = [
"tracing-opentelemetry",
"tracing-subscriber",
"url",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"uuid 0.8.2",
]
@ -4610,6 +4705,19 @@ dependencies = [
"nibble_vec",
]
[[package]]
name = "rand"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
dependencies = [
"fuchsia-cprng",
"libc",
"rand_core 0.3.1",
"rdrand",
"winapi",
]
[[package]]
name = "rand"
version = "0.7.3"
@ -4655,6 +4763,21 @@ dependencies = [
"rand_core 0.6.3",
]
[[package]]
name = "rand_core"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
dependencies = [
"rand_core 0.4.2",
]
[[package]]
name = "rand_core"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
[[package]]
name = "rand_core"
version = "0.5.1"
@ -4742,6 +4865,15 @@ dependencies = [
"num_cpus",
]
[[package]]
name = "rdrand"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
dependencies = [
"rand_core 0.3.1",
]
[[package]]
name = "redox_syscall"
version = "0.1.57"
@ -4806,11 +4938,11 @@ dependencies = [
[[package]]
name = "request-handlers"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"bigdecimal 0.2.2",
"connection-string",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"dmmf",
"futures",
"graphql-parser",
@ -4822,7 +4954,7 @@ dependencies = [
"thiserror",
"tracing",
"url",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
@ -4951,8 +5083,9 @@ dependencies = [
[[package]]
name = "rspc"
version = "0.0.4"
source = "git+https://github.com/oscartbeaumont/rspc?rev=1b2a299e9061c81ff90706923a6d2389ea7c107e#1b2a299e9061c81ff90706923a6d2389ea7c107e"
version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "443633b1d8808c9b4e27dce8797b9062f86ae214999c825fd9133a73d6550333"
dependencies = [
"axum",
"futures",
@ -5109,9 +5242,9 @@ dependencies = [
[[package]]
name = "schema"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"once_cell",
"prisma-models",
]
@ -5119,9 +5252,9 @@ dependencies = [
[[package]]
name = "schema-ast"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"diagnostics 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"pest",
"pest_derive",
]
@ -5139,9 +5272,9 @@ dependencies = [
[[package]]
name = "schema-builder"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"itertools",
"lazy_static",
"once_cell",
@ -5197,7 +5330,7 @@ dependencies = [
"include_dir",
"int-enum",
"itertools",
"migration-core",
"migration-core 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"once_cell",
"prisma-client-rust",
"quaint 0.2.0-alpha.13 (git+https://github.com/prisma/quaint.git)",
@ -5207,7 +5340,7 @@ dependencies = [
"rspc",
"serde",
"serde_json",
"sql-migration-connector",
"sql-migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"sysinfo",
"tempfile",
"thiserror",
@ -5642,8 +5775,9 @@ dependencies = [
[[package]]
name = "specta"
version = "0.0.2"
source = "git+https://github.com/oscartbeaumont/rspc?rev=1b2a299e9061c81ff90706923a6d2389ea7c107e#1b2a299e9061c81ff90706923a6d2389ea7c107e"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4145d41e1881c57b714f979ef01c8add58a1984b46f8858ea67f35fd01ebd1e"
dependencies = [
"chrono",
"convert_case 0.5.0",
@ -5657,7 +5791,8 @@ dependencies = [
[[package]]
name = "specta-macros"
version = "0.0.2"
source = "git+https://github.com/oscartbeaumont/rspc?rev=1b2a299e9061c81ff90706923a6d2389ea7c107e#1b2a299e9061c81ff90706923a6d2389ea7c107e"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5ad5db5dea9fa5816615d722b682781214fed875fe56c1bcd0a67ee9c477d84"
dependencies = [
"Inflector",
"proc-macro2",
@ -5684,14 +5819,14 @@ dependencies = [
[[package]]
name = "sql-datamodel-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"connection-string",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"either",
"enumflags2",
"lsp-types",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"once_cell",
"regex",
"serde_json",
@ -5713,11 +5848,43 @@ dependencies = [
"serde_json",
]
[[package]]
name = "sql-ddl"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
[[package]]
name = "sql-ddl"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines.git#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
[[package]]
name = "sql-migration-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"chrono",
"connection-string",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"either",
"enumflags2",
"indoc",
"migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"once_cell",
"quaint 0.2.0-alpha.13 (git+https://github.com/prisma/quaint?rev=fb4fe90682b4fecb485fd0d6975dd15a3bc9616b)",
"regex",
"serde_json",
"sql-ddl 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"sql-schema-describer 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"tokio",
"tracing",
"tracing-futures",
"url",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"uuid 0.8.2",
]
[[package]]
name = "sql-migration-connector"
version = "0.1.0"
@ -5729,14 +5896,14 @@ dependencies = [
"either",
"enumflags2",
"indoc",
"migration-connector",
"migration-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"once_cell",
"quaint 0.2.0-alpha.13 (git+https://github.com/prisma/quaint?rev=fb4fe90682b4fecb485fd0d6975dd15a3bc9616b)",
"regex",
"serde_json",
"sql-ddl",
"sql-schema-describer",
"sql-ddl 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"sql-schema-describer 0.1.0 (git+https://github.com/Brendonovich/prisma-engines.git)",
"tokio",
"tracing",
"tracing-futures",
@ -5748,35 +5915,57 @@ dependencies = [
[[package]]
name = "sql-query-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"anyhow",
"async-trait",
"bigdecimal 0.2.2",
"chrono",
"cuid",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"datamodel 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"futures",
"itertools",
"once_cell",
"opentelemetry",
"prisma-models",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"quaint 0.2.0-alpha.13 (git+https://github.com/prisma/quaint?rev=fb4fe90682b4fecb485fd0d6975dd15a3bc9616b)",
"query-connector",
"rand 0.7.3",
"serde",
"serde_json",
"sql-datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"sql-datamodel-connector 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"thiserror",
"tokio",
"tracing",
"tracing-futures",
"tracing-opentelemetry",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"user-facing-errors 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"uuid 0.8.2",
]
[[package]]
name = "sql-schema-describer"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"async-trait",
"bigdecimal 0.2.2",
"enumflags2",
"indexmap",
"indoc",
"native-types 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"once_cell",
"prisma-value 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
"quaint 0.2.0-alpha.13 (git+https://github.com/prisma/quaint?rev=fb4fe90682b4fecb485fd0d6975dd15a3bc9616b)",
"regex",
"serde",
"serde_json",
"tracing",
"tracing-error",
"tracing-futures",
]
[[package]]
name = "sql-schema-describer"
version = "0.1.0"
@ -6234,6 +6423,16 @@ dependencies = [
"windows 0.37.0",
]
[[package]]
name = "tempdir"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
dependencies = [
"rand 0.4.6",
"remove_dir_all",
]
[[package]]
name = "tempfile"
version = "3.3.0"
@ -6785,8 +6984,8 @@ version = "1.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if 1.0.0",
"rand 0.8.5",
"cfg-if 0.1.10",
"rand 0.7.3",
"static_assertions",
]
@ -6876,7 +7075,7 @@ dependencies = [
[[package]]
name = "user-facing-error-macros"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"proc-macro2",
"quote",
@ -6896,7 +7095,7 @@ dependencies = [
[[package]]
name = "user-facing-errors"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804#dcea2c532cb777afb290a613f769140647a16804"
source = "git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada#1a9235ce5c50bb629cb63235ca8b5ca82198cada"
dependencies = [
"backtrace",
"indoc",
@ -6904,7 +7103,7 @@ dependencies = [
"serde",
"serde_json",
"tracing",
"user-facing-error-macros 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=dcea2c532cb777afb290a613f769140647a16804)",
"user-facing-error-macros 0.1.0 (git+https://github.com/Brendonovich/prisma-engines?rev=1a9235ce5c50bb629cb63235ca8b5ca82198cada)",
]
[[package]]
@ -7632,3 +7831,8 @@ name = "xml-rs"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
[[patch.unused]]
name = "rspc"
version = "0.0.4"
source = "git+https://github.com/oscartbeaumont/rspc?rev=1b2a299e9061c81ff90706923a6d2389ea7c107e#1b2a299e9061c81ff90706923a6d2389ea7c107e"

View file

@ -14,5 +14,13 @@ openssl-sys = { git = "https://github.com/spacedriveapp/rust-openssl" }
rspc = { git = "https://github.com/oscartbeaumont/rspc", rev = "1b2a299e9061c81ff90706923a6d2389ea7c107e" }
[patch."https://github.com/Brendonovich/prisma-client-rust.git"]
prisma-client-rust = { git = "https://github.com//Brendonovich/prisma-client-rust.git", rev = "8447fe493414471a23a38d780b3db246266f558f" }
prisma-client-rust-cli = { git = "https://github.com//Brendonovich/prisma-client-rust.git", rev = "8447fe493414471a23a38d780b3db246266f558f" }
prisma-client-rust = { git = "https://github.com//Brendonovich/prisma-client-rust.git", rev = "43fd489cd817efc061096978030241bbf7ad3fb9", features = [
"migrations",
"rspc",
"sqlite-create-many",
] }
prisma-client-rust-cli = { git = "https://github.com//Brendonovich/prisma-client-rust.git", rev = "43fd489cd817efc061096978030241bbf7ad3fb9", features = [
"migrations",
"rspc",
"sqlite-create-many",
] }

View file

@ -11,7 +11,7 @@ build = "build.rs"
[dependencies]
tauri = { version = "1.0.4", features = ["api-all", "macos-private-api"] }
rspc = { version = "0.0.4", features = ["tauri"] }
rspc = { version = "0.0.5", features = ["tauri"] }
sdcore = { path = "../../../core" }
tokio = { version = "1.17.0", features = ["sync"] }
window-shadows = "0.1.2"

View file

@ -10,12 +10,19 @@ crate-type = ["staticlib", "cdylib"] # staticlib for IOS and cdylib for Android
[dependencies]
once_cell = "1.13.0"
sdcore = { path = "../../../core", features = ["mobile", "p2p"], default-features = false }
rspc = { version = "0.0.4", features = [] }
sdcore = { path = "../../../core", features = [
"mobile",
"p2p",
], default-features = false }
rspc = { version = "0.0.5", features = [] }
serde_json = "1.0.83"
tokio = "1.20.1"
openssl = { version = "0.10.41", features = ["vendored"] } # Override features of transitive dependencies
openssl-sys = { version = "0.9.75", features = ["vendored"] } # Override features of transitive dependencies to support IOS Simulator on M1
openssl = { version = "0.10.41", features = [
"vendored",
] } # Override features of transitive dependencies
openssl-sys = { version = "0.9.75", features = [
"vendored",
] } # Override features of transitive dependencies to support IOS Simulator on M1
[target.'cfg(target_os = "ios")'.dependencies]
objc = "0.2.7"

View file

@ -5,7 +5,7 @@ edition = "2021"
[dependencies]
sdcore = { path = "../../core", features = [] }
rspc = { version = "0.0.4", features = ["axum"] }
rspc = { version = "0.0.5", features = ["axum"] }
axum = "0.5.13"
tokio = { version = "1.17.0", features = ["sync", "rt-multi-thread", "signal"] }
tracing = "0.1.35"

View file

@ -33,11 +33,15 @@ rmp-serde = "^1.1.0"
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", tag = "0.6.0", features = [
"rspc",
"sqlite-create-many",
"migrations",
] }
quaint = { git = "https://github.com/prisma/quaint.git", features = [
"sqlite",
"uuid",
] }
quaint = { git = "https://github.com/prisma/quaint.git", features = ["sqlite", "uuid"] }
migration-core = { git = "https://github.com/Brendonovich/prisma-engines.git" }
sql-migration-connector = { git = "https://github.com/Brendonovich/prisma-engines.git" }
rspc = { version = "0.0.4", features = ["uuid", "chrono", "tracing"] }
rspc = { version = "0.0.5", features = ["uuid", "chrono", "tracing"] }
uuid = { version = "1.1.2", features = ["v4", "serde"] }
sysinfo = "0.23.9"
thiserror = "1.0.30"

View file

@ -7,4 +7,5 @@ edition = "2021"
prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust.git", tag = "0.6.0", features = [
"rspc",
"sqlite-create-many",
"migrations",
] }

View file

@ -29,8 +29,8 @@ pub enum ExplorerContext {
// Space(object_in_space::Data),
}
file_path::include!(pub file_path_with_file { file });
file::include!(pub file_with_paths { paths });
file_path::include!(file_path_with_file { file });
file::include!(file_with_paths { paths });
#[derive(Serialize, Deserialize, Type, Debug)]
#[serde(tag = "type")]

View file

@ -37,7 +37,7 @@ pub struct ThumbnailJobState {
root_path: PathBuf,
}
file_path::include!(pub image_path_with_file { file });
file_path::include!(image_path_with_file { file });
#[async_trait::async_trait]
impl StatefulJob for ThumbnailJob {

View file

@ -225,17 +225,12 @@ impl LibraryManager {
) -> Result<LibraryContext, LibraryManagerError> {
let db_path = db_path.as_ref();
let db = Arc::new(
load_and_migrate(
db_path.parent().ok_or_else(|| {
load_and_migrate(&format!(
"file:{}",
db_path.as_os_str().to_str().ok_or_else(|| {
LibraryManagerError::InvalidDatabasePath(db_path.to_path_buf())
})?,
&format!(
"file:{}",
db_path.as_os_str().to_str().ok_or_else(|| {
LibraryManagerError::InvalidDatabasePath(db_path.to_path_buf())
})?
),
)
})?
))
.await
.unwrap(),
);

View file

@ -32,7 +32,7 @@ pub enum ScanProgress {
/// batches of [`BATCH_SIZE`]. Then for each chunk it write the file metadata to the database.
pub struct IndexerJob;
location::include!(pub indexer_job_location {
location::include!(indexer_job_location {
indexer_rules: select { indexer_rule }
});
@ -226,11 +226,13 @@ impl StatefulJob for IndexerJob {
ctx: WorkerContext,
state: &mut JobState<Self::Init, Self::Data, Self::Step>,
) -> Result<(), JobError> {
let location_path = &state
let data = &state
.data
.as_ref()
.expect("critical error: missing data on job state")
.location_path;
.expect("critical error: missing data on job state");
let location_path = &data.location_path;
let location_id = state.init.location.id;
let count = ctx
.library_ctx()
@ -262,12 +264,12 @@ impl StatefulJob for IndexerJob {
file_path::create(
entry.file_id,
location_id,
materialized_path,
name,
vec![
file_path::is_dir::set(entry.is_dir),
file_path::extension::set(Some(extension)),
file_path::location_id::set(state.init.location.id),
file_path::parent_id::set(entry.parent_id),
file_path::date_created::set(entry.created_at.into()),
],

View file

@ -4,7 +4,7 @@ use crate::{
invalidate_query,
job::Job,
library::LibraryContext,
prisma::{indexer_rule, indexer_rules_in_location, location, node},
prisma::{indexer_rules_in_location, location, node},
};
use rspc::Type;
@ -222,13 +222,7 @@ async fn link_location_and_indexer_rules(
.create_many(
rules_ids
.iter()
.map(|id| {
indexer_rules_in_location::create(
location::id::equals(location_id),
indexer_rule::id::equals(*id),
vec![],
)
})
.map(|id| indexer_rules_in_location::create(location_id, *id, vec![]))
.collect(),
)
.exec()

View file

@ -1,92 +1,37 @@
use crate::prisma::{self, PrismaClient};
use enumflags2::BitFlags;
use include_dir::{include_dir, Dir};
use migration_core::{
commands::apply_migrations,
json_rpc::types::ApplyMigrationsInput,
migration_connector::{ConnectorError, ConnectorParams},
};
use prisma_client_rust::NewClientError;
use quaint::prelude::*;
use sql_migration_connector::SqlMigrationConnector;
use std::path::Path;
use prisma_client_rust::{migrations::*, NewClientError};
use thiserror::Error;
use tokio::fs::{create_dir, remove_dir_all};
use tracing::debug;
static MIGRATIONS_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/prisma/migrations");
/// MigrationError represents an error that occurring while opening a initialising and running migrations on the database.
#[derive(Error, Debug)]
pub enum MigrationError {
#[error("An error occurred while initialising a new database connection: {0}")]
NewClient(#[from] Box<NewClientError>),
#[error("The temporary file path for the database migrations is invalid.")]
InvalidDirectory,
#[error("An error occurred creating the temporary directory for the migrations: {0}")]
CreateDir(std::io::Error),
#[error("An error occurred extracting the migrations to the temporary directory: {0}")]
ExtractMigrations(std::io::Error),
#[error("An error occurred creating the database connection for migrations: {0}")]
Quiant(#[from] quaint::error::Error),
#[error("An error occurred running the migrations: {0}")]
Connector(#[from] ConnectorError),
#[error("An error occurred removing the temporary directory for the migrations: {0}")]
RemoveDir(std::io::Error),
#[cfg(debug_assertions)]
#[error("An error occured during migartion: {0}")]
MigrateFailed(#[from] DbPushError),
#[cfg(not(debug_assertions))]
#[error("An error occured during migration: {0}")]
MigrateFailed(#[from] MigrateDeployError),
}
/// load_and_migrate will load the database from the given path and migrate it to the latest version of the schema.
pub async fn load_and_migrate(
base_path: &Path,
db_url: &str,
) -> Result<PrismaClient, MigrationError> {
pub async fn load_and_migrate(db_url: &str) -> Result<PrismaClient, MigrationError> {
let client = prisma::new_client_with_url(db_url)
.await
.map_err(Box::new)?;
let temp_migrations_dir = base_path.join("./migrations_temp");
let migrations_directory_path = temp_migrations_dir
.to_str()
.ok_or(MigrationError::InvalidDirectory)?
.to_string();
if temp_migrations_dir.exists() {
remove_dir_all(&migrations_directory_path)
.await
.map_err(MigrationError::RemoveDir)?;
}
#[cfg(debug_assertions)]
client
._db_push(
std::env::var("SD_FORCE_RESET_DB")
.map(|v| v == "true")
.unwrap_or(false),
)
.await?;
create_dir(&temp_migrations_dir)
.await
.map_err(MigrationError::CreateDir)?;
MIGRATIONS_DIR
.extract(&temp_migrations_dir)
.map_err(MigrationError::ExtractMigrations)?;
let mut connector = match &ConnectionInfo::from_url(db_url)? {
ConnectionInfo::Sqlite { .. } => SqlMigrationConnector::new_sqlite(),
ConnectionInfo::InMemorySqlite { .. } => unreachable!(), // This is how it is in the Prisma Rust tests
};
connector.set_params(ConnectorParams {
connection_string: db_url.to_string(),
preview_features: BitFlags::empty(),
shadow_database_connection_string: None,
})?;
let output = apply_migrations(
ApplyMigrationsInput {
migrations_directory_path,
},
&mut connector,
)
.await?;
remove_dir_all(temp_migrations_dir)
.await
.map_err(MigrationError::RemoveDir)?;
for migration in output.applied_migration_names {
debug!("Applied migration '{}'", migration);
}
#[cfg(not(debug_assertions))]
client._migrate_deploy().await?;
Ok(client)
}