My personal-knowledge-system, with deeply integrated task tracking and long term goal planning capabilities.
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat/db: run migrations on each connection

+320 -3
+313 -1
Cargo.lock
··· 303 303 ] 304 304 305 305 [[package]] 306 + name = "async-attributes" 307 + version = "1.1.2" 308 + source = "registry+https://github.com/rust-lang/crates.io-index" 309 + checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" 310 + dependencies = [ 311 + "quote", 312 + "syn 1.0.109", 313 + ] 314 + 315 + [[package]] 316 + name = "async-channel" 317 + version = "1.9.0" 318 + source = "registry+https://github.com/rust-lang/crates.io-index" 319 + checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" 320 + dependencies = [ 321 + "concurrent-queue", 322 + "event-listener 2.5.3", 323 + "futures-core", 324 + ] 325 + 326 + [[package]] 327 + name = "async-channel" 328 + version = "2.5.0" 329 + source = "registry+https://github.com/rust-lang/crates.io-index" 330 + checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" 331 + dependencies = [ 332 + "concurrent-queue", 333 + "event-listener-strategy", 334 + "futures-core", 335 + "pin-project-lite", 336 + ] 337 + 338 + [[package]] 339 + name = "async-executor" 340 + version = "1.14.0" 341 + source = "registry+https://github.com/rust-lang/crates.io-index" 342 + checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" 343 + dependencies = [ 344 + "async-task", 345 + "concurrent-queue", 346 + "fastrand", 347 + "futures-lite", 348 + "pin-project-lite", 349 + "slab", 350 + ] 351 + 352 + [[package]] 353 + name = "async-global-executor" 354 + version = "2.4.1" 355 + source = "registry+https://github.com/rust-lang/crates.io-index" 356 + checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" 357 + dependencies = [ 358 + "async-channel 2.5.0", 359 + "async-executor", 360 + "async-io", 361 + "async-lock", 362 + "blocking", 363 + "futures-lite", 364 + "once_cell", 365 + "tokio", 366 + ] 367 + 368 + [[package]] 369 + name = "async-io" 370 + version = "2.6.0" 371 + source = "registry+https://github.com/rust-lang/crates.io-index" 372 + checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" 373 + dependencies = [ 374 + "autocfg", 375 + "cfg-if", 376 + "concurrent-queue", 377 + "futures-io", 378 + "futures-lite", 379 + "parking", 380 + "polling", 381 + "rustix", 382 + "slab", 383 + "windows-sys 0.61.2", 384 + ] 385 + 386 + [[package]] 387 + name = "async-lock" 388 + version = "3.4.2" 389 + source = "registry+https://github.com/rust-lang/crates.io-index" 390 + checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" 391 + dependencies = [ 392 + "event-listener 5.4.1", 393 + "event-listener-strategy", 394 + "pin-project-lite", 395 + ] 396 + 397 + [[package]] 398 + name = "async-std" 399 + version = "1.13.2" 400 + source = "registry+https://github.com/rust-lang/crates.io-index" 401 + checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b" 402 + dependencies = [ 403 + "async-attributes", 404 + "async-channel 1.9.0", 405 + "async-global-executor", 406 + "async-io", 407 + "async-lock", 408 + "crossbeam-utils", 409 + "futures-channel", 410 + "futures-core", 411 + "futures-io", 412 + "futures-lite", 413 + "gloo-timers", 414 + "kv-log-macro", 415 + "log", 416 + "memchr", 417 + "once_cell", 418 + "pin-project-lite", 419 + "pin-utils", 420 + "slab", 421 + "wasm-bindgen-futures", 422 + ] 423 + 424 + [[package]] 306 425 name = "async-stream" 307 426 version = "0.3.6" 308 427 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 323 442 "quote", 324 443 "syn 2.0.117", 325 444 ] 445 + 446 + [[package]] 447 + name = "async-task" 448 + version = "4.7.1" 449 + source = "registry+https://github.com/rust-lang/crates.io-index" 450 + checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" 326 451 327 452 [[package]] 328 453 name = "async-trait" ··· 352 477 dependencies = [ 353 478 "bytemuck", 354 479 ] 480 + 481 + [[package]] 482 + name = "atomic-waker" 483 + version = "1.1.2" 484 + source = "registry+https://github.com/rust-lang/crates.io-index" 485 + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 355 486 356 487 [[package]] 357 488 name = "autocfg" ··· 516 647 checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" 517 648 dependencies = [ 518 649 "hybrid-array", 650 + ] 651 + 652 + [[package]] 653 + name = "blocking" 654 + version = "1.6.2" 655 + source = "registry+https://github.com/rust-lang/crates.io-index" 656 + checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" 657 + dependencies = [ 658 + "async-channel 2.5.0", 659 + "async-task", 660 + "futures-io", 661 + "futures-lite", 662 + "piper", 519 663 ] 520 664 521 665 [[package]] ··· 1039 1183 name = "db" 1040 1184 version = "0.1.0" 1041 1185 dependencies = [ 1186 + "migration", 1042 1187 "sea-orm", 1043 1188 "thiserror 2.0.18", 1044 1189 "tokio", ··· 1264 1409 1265 1410 [[package]] 1266 1411 name = "event-listener" 1412 + version = "2.5.3" 1413 + source = "registry+https://github.com/rust-lang/crates.io-index" 1414 + checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 1415 + 1416 + [[package]] 1417 + name = "event-listener" 1267 1418 version = "5.4.1" 1268 1419 source = "registry+https://github.com/rust-lang/crates.io-index" 1269 1420 checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" ··· 1274 1425 ] 1275 1426 1276 1427 [[package]] 1428 + name = "event-listener-strategy" 1429 + version = "0.5.4" 1430 + source = "registry+https://github.com/rust-lang/crates.io-index" 1431 + checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" 1432 + dependencies = [ 1433 + "event-listener 5.4.1", 1434 + "pin-project-lite", 1435 + ] 1436 + 1437 + [[package]] 1277 1438 name = "eyre" 1278 1439 version = "0.6.12" 1279 1440 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1487 1648 version = "0.3.32" 1488 1649 source = "registry+https://github.com/rust-lang/crates.io-index" 1489 1650 checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" 1651 + 1652 + [[package]] 1653 + name = "futures-lite" 1654 + version = "2.6.1" 1655 + source = "registry+https://github.com/rust-lang/crates.io-index" 1656 + checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" 1657 + dependencies = [ 1658 + "fastrand", 1659 + "futures-core", 1660 + "futures-io", 1661 + "parking", 1662 + "pin-project-lite", 1663 + ] 1490 1664 1491 1665 [[package]] 1492 1666 name = "futures-macro" ··· 2320 2494 ] 2321 2495 2322 2496 [[package]] 2497 + name = "glob" 2498 + version = "0.3.3" 2499 + source = "registry+https://github.com/rust-lang/crates.io-index" 2500 + checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" 2501 + 2502 + [[package]] 2503 + name = "gloo-timers" 2504 + version = "0.3.0" 2505 + source = "registry+https://github.com/rust-lang/crates.io-index" 2506 + checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" 2507 + dependencies = [ 2508 + "futures-channel", 2509 + "futures-core", 2510 + "js-sys", 2511 + "wasm-bindgen", 2512 + ] 2513 + 2514 + [[package]] 2323 2515 name = "half" 2324 2516 version = "2.7.1" 2325 2517 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2409 2601 checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 2410 2602 2411 2603 [[package]] 2604 + name = "hermit-abi" 2605 + version = "0.5.2" 2606 + source = "registry+https://github.com/rust-lang/crates.io-index" 2607 + checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" 2608 + 2609 + [[package]] 2412 2610 name = "hex" 2413 2611 version = "0.4.3" 2414 2612 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2778 2976 ] 2779 2977 2780 2978 [[package]] 2979 + name = "kv-log-macro" 2980 + version = "1.0.7" 2981 + source = "registry+https://github.com/rust-lang/crates.io-index" 2982 + checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 2983 + dependencies = [ 2984 + "log", 2985 + ] 2986 + 2987 + [[package]] 2781 2988 name = "lab" 2782 2989 version = "0.11.0" 2783 2990 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2937 3144 version = "0.4.29" 2938 3145 source = "registry+https://github.com/rust-lang/crates.io-index" 2939 3146 checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 3147 + dependencies = [ 3148 + "value-bag", 3149 + ] 2940 3150 2941 3151 [[package]] 2942 3152 name = "lru" ··· 3029 3239 ] 3030 3240 3031 3241 [[package]] 3242 + name = "migration" 3243 + version = "0.1.0" 3244 + dependencies = [ 3245 + "async-std", 3246 + "sea-orm-migration", 3247 + ] 3248 + 3249 + [[package]] 3032 3250 name = "minimal-lexical" 3033 3251 version = "0.2.1" 3034 3252 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3453 3671 checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" 3454 3672 3455 3673 [[package]] 3674 + name = "pin-utils" 3675 + version = "0.1.0" 3676 + source = "registry+https://github.com/rust-lang/crates.io-index" 3677 + checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 3678 + 3679 + [[package]] 3680 + name = "piper" 3681 + version = "0.2.5" 3682 + source = "registry+https://github.com/rust-lang/crates.io-index" 3683 + checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" 3684 + dependencies = [ 3685 + "atomic-waker", 3686 + "fastrand", 3687 + "futures-io", 3688 + ] 3689 + 3690 + [[package]] 3456 3691 name = "pkcs1" 3457 3692 version = "0.7.5" 3458 3693 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3496 3731 ] 3497 3732 3498 3733 [[package]] 3734 + name = "polling" 3735 + version = "3.11.0" 3736 + source = "registry+https://github.com/rust-lang/crates.io-index" 3737 + checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" 3738 + dependencies = [ 3739 + "cfg-if", 3740 + "concurrent-queue", 3741 + "hermit-abi", 3742 + "pin-project-lite", 3743 + "rustix", 3744 + "windows-sys 0.61.2", 3745 + ] 3746 + 3747 + [[package]] 3499 3748 name = "portable-atomic" 3500 3749 version = "1.13.1" 3501 3750 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4058 4307 ] 4059 4308 4060 4309 [[package]] 4310 + name = "sea-orm-cli" 4311 + version = "2.0.0-rc.37" 4312 + source = "registry+https://github.com/rust-lang/crates.io-index" 4313 + checksum = "cd9b34d4c8e615079c04eb7863a429c2d2a8bf9c934eb9eeb580f51f36367124" 4314 + dependencies = [ 4315 + "chrono", 4316 + "clap", 4317 + "dotenvy", 4318 + "glob", 4319 + "indoc", 4320 + "regex", 4321 + "tracing", 4322 + "tracing-subscriber", 4323 + "url", 4324 + ] 4325 + 4326 + [[package]] 4061 4327 name = "sea-orm-macros" 4062 4328 version = "2.0.0-rc.37" 4063 4329 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4074 4340 ] 4075 4341 4076 4342 [[package]] 4343 + name = "sea-orm-migration" 4344 + version = "2.0.0-rc.37" 4345 + source = "registry+https://github.com/rust-lang/crates.io-index" 4346 + checksum = "b3ceb928aac8be83332d34d1fdbc827d43696135a800723ffeb2e0b33b7b495e" 4347 + dependencies = [ 4348 + "async-trait", 4349 + "clap", 4350 + "dotenvy", 4351 + "sea-orm", 4352 + "sea-orm-cli", 4353 + "sea-schema", 4354 + "tracing", 4355 + "tracing-subscriber", 4356 + ] 4357 + 4358 + [[package]] 4077 4359 name = "sea-query" 4078 4360 version = "1.0.0-rc.31" 4079 4361 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4440 4722 "crc", 4441 4723 "crossbeam-queue", 4442 4724 "either", 4443 - "event-listener", 4725 + "event-listener 5.4.1", 4444 4726 "futures-core", 4445 4727 "futures-intrusive", 4446 4728 "futures-io", ··· 5261 5543 checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 5262 5544 5263 5545 [[package]] 5546 + name = "value-bag" 5547 + version = "1.12.0" 5548 + source = "registry+https://github.com/rust-lang/crates.io-index" 5549 + checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" 5550 + 5551 + [[package]] 5264 5552 name = "vcpkg" 5265 5553 version = "0.2.15" 5266 5554 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5376 5664 ] 5377 5665 5378 5666 [[package]] 5667 + name = "wasm-bindgen-futures" 5668 + version = "0.4.64" 5669 + source = "registry+https://github.com/rust-lang/crates.io-index" 5670 + checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" 5671 + dependencies = [ 5672 + "cfg-if", 5673 + "futures-util", 5674 + "js-sys", 5675 + "once_cell", 5676 + "wasm-bindgen", 5677 + "web-sys", 5678 + ] 5679 + 5680 + [[package]] 5379 5681 name = "wasm-bindgen-macro" 5380 5682 version = "0.2.114" 5381 5683 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5439 5741 "hashbrown 0.15.5", 5440 5742 "indexmap", 5441 5743 "semver", 5744 + ] 5745 + 5746 + [[package]] 5747 + name = "web-sys" 5748 + version = "0.3.91" 5749 + source = "registry+https://github.com/rust-lang/crates.io-index" 5750 + checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" 5751 + dependencies = [ 5752 + "js-sys", 5753 + "wasm-bindgen", 5442 5754 ] 5443 5755 5444 5756 [[package]]
+1
crates/db/Cargo.toml
··· 14 14 sea-orm = {version = "2.0.0-rc", features = ["sqlx-sqlite", "runtime-tokio", "macros", "with-chrono"]} 15 15 tracing = {workspace = true} 16 16 thiserror = "2.0.18" 17 + migration = {path="migration"} 17 18 18 19 19 20
+2 -2
crates/db/migration/Cargo.toml
··· 1 1 [package] 2 2 name = "migration" 3 3 version = "0.1.0" 4 - edition = "2021" 4 + edition = "2024" 5 5 publish = false 6 6 7 7 [lib] ··· 12 12 async-std = { version = "1", features = ["attributes", "tokio1"] } 13 13 14 14 [dependencies.sea-orm-migration] 15 - version = "1.1.0" 15 + version = "2.0.0-rc" 16 16 features = [ 17 17 # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. 18 18 # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
+4
crates/db/src/lib.rs
··· 3 3 4 4 use std::path::Path; 5 5 6 + use migration::{Migrator, MigratorTrait}; 6 7 use sea_orm::{Database, DatabaseConnection}; 7 8 use tracing::debug; 8 9 ··· 35 36 debug!("connecting to {connection_string}"); 36 37 37 38 let conn = Database::connect(connection_string).await?; 39 + 40 + // run all migrations on connection 41 + Migrator::up(&conn, None).await?; 38 42 39 43 Ok(Self { conn }) 40 44 }