diff --git a/Dockerfile b/Dockerfile index a7e58fee85..3eca9392f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,6 @@ ENV PATH="/root/.cargo/bin:${PATH}" COPY packages/backend/native-utils/Cargo.toml packages/backend/native-utils/Cargo.toml COPY packages/backend/native-utils/Cargo.lock packages/backend/native-utils/Cargo.lock COPY packages/backend/native-utils/src/lib.rs packages/backend/native-utils/src/ -COPY packages/backend/native-utils/migration/Cargo.toml packages/backend/native-utils/migration/Cargo.toml -COPY packages/backend/native-utils/migration/src/lib.rs packages/backend/native-utils/migration/src/ # Install cargo dependencies RUN cargo fetch --locked --manifest-path /firefish/packages/backend/native-utils/Cargo.toml diff --git a/docs/changelog.md b/docs/changelog.md index 9dd956f779..fdea020c87 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,7 @@ +# Unreleased + +- refactoring + # v20240212 - refactoring diff --git a/docs/downgrade.md b/docs/downgrade.md index 536656ce7c..9463e15b5e 100644 --- a/docs/downgrade.md +++ b/docs/downgrade.md @@ -7,6 +7,19 @@ sudo systemctl stop your-firefish-service.service ``` 1. Take a backup +1. Revert database migrations + ```sh + sudo --user=postgres psql --file=docs/downgrade.sql --dbname=database_name + ``` + + The database name can be found in `.config/default.yml`. + ```yaml + db: + port: 5432 + db: database_name # this one + user: firefish + pass: password + ``` 1. Switch back to the `v20240206` tag ```sh git switch v20240206 @@ -29,6 +42,18 @@ # or podman-compose down ``` 1. Take a backup +1. Revert database migrations + ```sh + docker-compose exec db psql --command="$(cat docs/downgrade.sql)" --user=user_name --dbname=database_name + # or docker-compose exec db psql --command="$(cat docs/revert.sql)" --user=user_name --dbname=database_name + ``` + + The user and database name can be found in `.config/docker.env`. + ```env + POSTGRES_PASSWORD=password + POSTGRES_USER=user_name # user name + POSTGRES_DB=database_name # database name + ``` 1. Change the image tag to `registry.firefish.dev/firefish/firefish:v20240206` ```sh vim docker-compose.yml diff --git a/docs/downgrade.sql b/docs/downgrade.sql new file mode 100644 index 0000000000..ef4ff31d93 --- /dev/null +++ b/docs/downgrade.sql @@ -0,0 +1,22 @@ +BEGIN; + +DELETE FROM "migrations" WHERE name IN ( + 'RemoveNativeUtilsMigration1705877093218' +); + +-- remove-native-utils-migration +CREATE TABLE "seaql_migrations" ( + version character varying NOT NULL, + applied_at bigint NOT NULL +); +INSERT INTO "seaql_migrations" (version, applied_at) +VALUES + ('m20230531_180824_drop_reversi', 1705876632), + ('m20230627_185451_index_note_url', 1705876632), + ('m20230709_000510_move_antenna_to_cache', 1705876632), + ('m20230806_170616_fix_antenna_stream_ids', 1705876632), + ('m20230904_013244_is_indexable', 1705876632), + ('m20231002_143323_remove_integrations', 1705876632) +; + +COMMIT; diff --git a/packages/backend/migration/1705877093218-remove-native-utils-migration.js b/packages/backend/migration/1705877093218-remove-native-utils-migration.js new file mode 100644 index 0000000000..bf6bec01b0 --- /dev/null +++ b/packages/backend/migration/1705877093218-remove-native-utils-migration.js @@ -0,0 +1,152 @@ +export class RemoveNativeUtilsMigration1705877093218 { + name = "RemoveNativeUtilsMigration1705877093218"; + + async up(queryRunner) { + await queryRunner.query(`DROP TABLE IF EXISTS "reversi_game"`); + await queryRunner.query(`DROP TABLE IF EXISTS "reversi_matching"`); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_note_url" ON "note" ("text")`, + ); + await queryRunner.query(`DROP TABLE IF EXISTS "antenna_note"`); + await queryRunner.query( + `ALTER TABLE "user" ADD COLUMN IF NOT EXISTS "isIndexable" boolean NOT NULL DEFAULT true`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD COLUMN IF NOT EXISTS "isIndexable" boolean NOT NULL DEFAULT true`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "enableTwitterIntegration"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "twitterConsumerKey"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "twitterConsumerSecret"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "enableGithubIntegration"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "githubClientId"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "githubClientSecret"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "enableDiscordIntegration"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "discordClientId"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN IF EXISTS "discordClientSecret"`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN IF EXISTS "integrations"`, + ); + await queryRunner.query(`DROP TABLE IF EXISTS "seaql_migrations"`); + } + + async down(queryRunner) { + await queryRunner.query( + `CREATE TABLE IF NOT EXISTS "seaql_migrations" (version character varying NOT NULL, applied_at bigint NOT NULL)`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD COLUMN IF NOT EXISTS "integrations" jsonb DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "discordClientSecret" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "discordClientId" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "enableDiscordIntegration" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "githubClientSecret" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "githubClientId" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "enableGithubIntegration" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "twitterConsumerSecret" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "twitterConsumerKey" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD COLUMN IF NOT EXISTS "enableTwitterIntegration" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN IF EXISTS "isIndexable"`, + ); + await queryRunner.query( + `ALTER TABLE "user" DROP COLUMN IF EXISTS "isIndexable"`, + ); + await queryRunner.query( + `CREATE TABLE IF NOT EXISTS "antenna_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "antennaId" character varying(32) NOT NULL, "read" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_fb28d94d0989a3872df19fd6ef8" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_0d775946662d2575dfd2068a5f" ON "antenna_note" ("antennaId")`, + ); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_bd0397be22147e17210940e125" ON "antenna_note" ("noteId")`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX IF NOT EXISTS "IDX_335a0bf3f904406f9ef3dd51c2" ON "antenna_note" ("noteId", "antennaId")`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9937ea48d7ae97ffb4f3f063a4" ON "antenna_note" ("read")`, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" ADD CONSTRAINT IF NOT EXISTS "FK_0d775946662d2575dfd2068a5f5" FOREIGN KEY ("antennaId") REFERENCES "antenna"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" ADD CONSTRAINT IF NOT EXISTS "FK_bd0397be22147e17210940e125b" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query(`DROP INDEX IF EXISTS "IDX_note_url"`); + await queryRunner.query( + `CREATE TABLE IF NOT EXISTS "reversi_matching" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "parentId" character varying(32) NOT NULL, "childId" character varying(32) NOT NULL, CONSTRAINT "PK_880bd0afbab232f21c8b9d146cf" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_b604d92d6c7aec38627f6eaf16" ON "reversi_matching" ("createdAt")`, + ); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_3b25402709dd9882048c2bbade" ON "reversi_matching" ("parentId")`, + ); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_e247b23a3c9b45f89ec1299d06" ON "reversi_matching" ("childId")`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_matching" ADD CONSTRAINT IF NOT EXISTS "FK_3b25402709dd9882048c2bbade0" FOREIGN KEY ("parentId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_matching" ADD CONSTRAINT IF NOT EXISTS "FK_e247b23a3c9b45f89ec1299d066" FOREIGN KEY ("childId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_matching"."createdAt" IS 'The created date of the ReversiMatching.'`, + ); + await queryRunner.query( + `CREATE TABLE IF NOT EXISTS "reversi_game" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "startedAt" TIMESTAMP WITH TIME ZONE, "user1Id" character varying(32) NOT NULL, "user2Id" character varying(32) NOT NULL, "user1Accepted" boolean NOT NULL DEFAULT false, "user2Accepted" boolean NOT NULL DEFAULT false, "black" integer, "isStarted" boolean NOT NULL DEFAULT false, "isEnded" boolean NOT NULL DEFAULT false, "winnerId" character varying(32), "surrendered" character varying(32), "logs" jsonb NOT NULL DEFAULT '[]', "map" character varying(64) array NOT NULL, "bw" character varying(32) NOT NULL, "isLlotheo" boolean NOT NULL DEFAULT false, "canPutEverywhere" boolean NOT NULL DEFAULT false, "loopedBoard" boolean NOT NULL DEFAULT false, "form1" jsonb DEFAULT null, "form2" jsonb DEFAULT null, "crc32" character varying(32), CONSTRAINT "PK_76b30eeba71b1193ad7c5311c3f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX IF NOT EXISTS "IDX_b46ec40746efceac604142be1c" ON "reversi_game" ("createdAt")`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_game" ADD CONSTRAINT IF NOT EXISTS "FK_f7467510c60a45ce5aca6292743" FOREIGN KEY ("user1Id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_game" ADD CONSTRAINT IF NOT EXISTS "FK_6649a4e8c5d5cf32fb03b5da9f6" FOREIGN KEY ("user2Id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_game"."createdAt" IS 'The created date of the ReversiGame.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_game"."startedAt" IS 'The started date of the ReversiGame.'`, + ); + } +} diff --git a/packages/backend/native-utils/Cargo.lock b/packages/backend/native-utils/Cargo.lock index 673ed87ead..3538aea2da 100644 --- a/packages/backend/native-utils/Cargo.lock +++ b/packages/backend/native-utils/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "getrandom", @@ -80,9 +80,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -94,9 +94,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.77" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d19de80eff169429ac1e9f48fffb163916b448a44e8e046186232046d9e1f9" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arrayvec" @@ -157,18 +157,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.75" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -213,9 +213,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -263,9 +263,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -293,9 +293,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ "borsh-derive", "cfg_aliases", @@ -303,15 +303,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "syn_derive", ] @@ -323,9 +323,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -334,9 +334,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", @@ -384,9 +384,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", @@ -394,14 +394,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] name = "clap" -version = "4.4.12" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -409,9 +409,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", @@ -421,21 +421,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -443,33 +443,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "console" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.45.0", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -509,9 +482,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -533,22 +506,18 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crossbeam-queue" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-common" @@ -567,7 +536,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -601,9 +570,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -665,19 +634,13 @@ checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" dependencies = [ "serde", ] -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encoding_rs" version = "0.8.33" @@ -792,7 +755,6 @@ checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -843,17 +805,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.43", -] - [[package]] name = "futures-sink" version = "0.3.30" @@ -875,7 +826,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-macro", "futures-sink", "futures-task", "memchr", @@ -896,9 +846,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -913,17 +863,11 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -944,7 +888,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -953,7 +897,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.8", "allocator-api2", ] @@ -977,9 +921,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" [[package]] name = "hex" @@ -1065,7 +1009,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tower-service", "tracing", @@ -1074,9 +1018,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1107,47 +1051,24 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown 0.14.3", "serde", ] -[[package]] -name = "indicatif" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "tokio", - "unicode-width", -] - [[package]] name = "inherent" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce243b1bfa62ffc028f1cc3b6034ec63d649f3031bc8a4fbbb004e1ac17d1f68" +checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", + "syn 2.0.48", ] [[package]] @@ -1167,9 +1088,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -1182,9 +1103,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -1195,7 +1116,7 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.8", "anyhow", "base64", "bytecount", @@ -1221,9 +1142,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -1239,9 +1160,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -1272,9 +1193,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1292,15 +1213,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - [[package]] name = "md-5" version = "0.10.6" @@ -1313,28 +1225,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "migration" -version = "0.1.0" -dependencies = [ - "basen", - "futures", - "indicatif", - "native-utils", - "redis", - "sea-orm", - "sea-orm-migration", - "serde", - "serde_json", - "serde_yaml", - "tokio", - "url", - "urlencoding", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" @@ -1350,9 +1243,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -1370,11 +1263,11 @@ dependencies = [ [[package]] name = "napi" -version = "2.14.1" +version = "2.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1133249c46e92da921bafc8aba4912bf84d6c475f7625183772ed2d0844dc3a7" +checksum = "43792514b0c95c5beec42996da0c1b39265b02b75c97baa82d163d3ef55cbfa7" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "ctor", "napi-derive", "napi-sys", @@ -1390,23 +1283,23 @@ checksum = "d4b4532cf86bfef556348ac65e561e3123879f0e7566cca6d43a6ff5326f13df" [[package]] name = "napi-derive" -version = "2.14.6" +version = "2.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e61bec1ee990ae3e9a5f443484c65fb38e571a898437f0ad283ed69c82fc59c0" +checksum = "8d56bb899c164ab1be5e542ae7db8b26750c864bf2eef07295f17754e6358777" dependencies = [ "cfg-if", "convert_case 0.6.0", "napi-derive-backend", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "napi-derive-backend" -version = "1.0.58" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2314f777bc9cde51705d991c44466cee4de4a3f41c6d3d019fcbbebb5cdd47c4" +checksum = "6cf2d74ac66fd1cccb646be75fdd1c1dce8acfe20a68f61566a31da0d3eb9786" dependencies = [ "convert_case 0.6.0", "once_cell", @@ -1414,7 +1307,7 @@ dependencies = [ "quote", "regex", "semver", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1459,7 +1352,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "libc", ] @@ -1524,28 +1417,33 @@ checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "num-traits", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -1566,9 +1464,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -1584,12 +1482,6 @@ dependencies = [ "libc", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" version = "0.32.2" @@ -1605,12 +1497,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - [[package]] name = "ordered-float" version = "3.9.2" @@ -1641,7 +1527,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1690,7 +1576,7 @@ dependencies = [ "regex", "regex-syntax 0.7.5", "structmeta", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1749,15 +1635,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "powerfmt" @@ -1783,11 +1663,10 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_datetime", "toml_edit", ] @@ -1817,9 +1696,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -1846,9 +1725,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1889,32 +1768,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redis" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c580d9cbbe1d1b479e8d67cf9daf6a62c957e6846048408b80b43ac3f6af84cd" -dependencies = [ - "async-trait", - "bytes", - "combine", - "futures-util", - "itoa", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "rustls-webpki", - "ryu", - "sha1_smol", - "socket2 0.4.10", - "tokio", - "tokio-rustls", - "tokio-util", - "url", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -1926,42 +1779,27 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata", "regex-syntax 0.8.2", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", "regex-syntax 0.8.2", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.7.5" @@ -1976,18 +1814,18 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "base64", "bytes", @@ -2008,6 +1846,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tower-service", @@ -2034,9 +1873,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", @@ -2052,9 +1891,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -2083,9 +1922,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.33.1" +version = "1.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" +checksum = "b39449a79f45e8da28c57c341891b69a183044b29518bb8f86dbac9df60bb7df" dependencies = [ "arrayvec", "borsh", @@ -2114,11 +1953,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", @@ -2131,24 +1970,11 @@ version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "log", "ring", "rustls-webpki", "sct", ] -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -2174,15 +2000,6 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "schemars" version = "0.8.16" @@ -2234,14 +2051,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "sea-orm" -version = "0.12.10" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9195a2b2a182cbee3f76cf2a97c20204022f91259bdf8a48b537788202775b" +checksum = "6632f499b80cc6aaa781b302e4c9fae663e0e3dcf2640e9d80034d5b10731efe" dependencies = [ "async-stream", "async-trait", @@ -2265,59 +2082,25 @@ dependencies = [ "uuid", ] -[[package]] -name = "sea-orm-cli" -version = "0.12.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acc21813f3a91462280bee40632298a555eafe9dd8feb74917f9c24514214c2e" -dependencies = [ - "chrono", - "clap", - "dotenvy", - "glob", - "regex", - "sea-schema", - "tracing", - "tracing-subscriber", - "url", -] - [[package]] name = "sea-orm-macros" -version = "0.12.10" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c6acfe3d49625c679955c7e7e7cd2d72b512a5c77bcd535a74aa41590b9f28" +checksum = "ec13bfb4c4aef208f68dbea970dd40d13830c868aa8dcb4e106b956e6bb4f2fa" dependencies = [ "heck", "proc-macro2", "quote", "sea-bae", - "syn 2.0.43", + "syn 2.0.48", "unicode-ident", ] -[[package]] -name = "sea-orm-migration" -version = "0.12.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d06dac448288ceb630994b420cd8d5410543c0b09367f40ed505c2f03b266a" -dependencies = [ - "async-trait", - "clap", - "dotenvy", - "futures", - "sea-orm", - "sea-orm-cli", - "sea-schema", - "tracing", - "tracing-subscriber", -] - [[package]] name = "sea-query" -version = "0.30.5" +version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40446e3c048cec0802375f52462a05cc774b9ea6af1dffba6c646b7825e4cf9" +checksum = "4166a1e072292d46dc91f31617c2a1cdaf55a8be4b5c9f4bf2ba248e3ac4999b" dependencies = [ "bigdecimal", "chrono", @@ -2325,7 +2108,6 @@ dependencies = [ "inherent", "ordered-float", "rust_decimal", - "sea-query-derive", "serde_json", "time", "uuid", @@ -2347,95 +2129,36 @@ dependencies = [ "uuid", ] -[[package]] -name = "sea-query-derive" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a82fcb49253abcb45cdcb2adf92956060ec0928635eb21b4f7a6d8f25ab0bc" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.43", - "thiserror", -] - -[[package]] -name = "sea-schema" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cd9561232bd1b82ea748b581f15909d11de0db6563ddcf28c5d908aee8282f1" -dependencies = [ - "futures", - "sea-query", - "sea-schema-derive", -] - -[[package]] -name = "sea-schema-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f686050f76bffc4f635cda8aea6df5548666b830b52387e8bc7de11056d11e" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "seahash" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2451,9 +2174,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -2472,19 +2195,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_yaml" -version = "0.9.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "sha1" version = "0.10.6" @@ -2496,12 +2206,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.10.8" @@ -2523,15 +2227,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -2568,19 +2263,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" @@ -2647,7 +2332,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.8", "atoi", "bigdecimal", "byteorder", @@ -2738,7 +2423,7 @@ dependencies = [ "atoi", "base64", "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.4.2", "byteorder", "bytes", "chrono", @@ -2785,7 +2470,7 @@ dependencies = [ "atoi", "base64", "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.4.2", "byteorder", "chrono", "crc", @@ -2866,9 +2551,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "structmeta" @@ -2879,7 +2564,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2890,7 +2575,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2918,9 +2603,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.43" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -2936,9 +2621,15 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "system-configuration" version = "0.5.1" @@ -2968,55 +2659,45 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.52" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a48fd946b02c0a526b2e9481c8e2a17755e47039164a86c4070446e3a4614d" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.52" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", -] - -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", + "syn 2.0.48", ] [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -3031,10 +2712,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -3055,9 +2737,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -3067,7 +2749,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -3080,17 +2762,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", + "syn 2.0.48", ] [[package]] @@ -3120,15 +2792,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", @@ -3161,7 +2833,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -3173,21 +2845,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "once_cell", - "regex", - "sharded-slab", - "thread_local", - "tracing", - "tracing-core", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -3202,9 +2859,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3223,15 +2880,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode_categories" @@ -3239,12 +2890,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - [[package]] name = "untrusted" version = "0.9.0" @@ -3260,7 +2905,6 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -3277,9 +2921,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utoipa" -version = "4.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff05e3bac2c9428f57ade702667753ca3f5cf085e2011fe697de5bfd49aa72d" +checksum = "272ebdfbc99111033031d2f10e018836056e4d2c8e2acda76450ec7974269fa7" dependencies = [ "indexmap", "serde", @@ -3289,21 +2933,21 @@ dependencies = [ [[package]] name = "utoipa-gen" -version = "4.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0b6f4667edd64be0e820d6631a60433a269710b6ee89ac39525b872b76d61d" +checksum = "d3c9f4d08338c1bfa70dde39412a040a884c6f318b3d09aaaf3437a1e52027fc" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "serde", ] @@ -3337,9 +2981,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3347,24 +2991,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -3374,9 +3018,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3384,28 +3028,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -3413,9 +3057,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "whoami" @@ -3423,44 +3067,13 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", + "windows-targets 0.52.0", ] [[package]] @@ -3481,21 +3094,6 @@ dependencies = [ "windows-targets 0.52.0", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -3526,12 +3124,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -3544,12 +3136,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3562,12 +3148,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3580,12 +3160,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3598,12 +3172,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3616,12 +3184,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -3634,12 +3196,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3654,9 +3210,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.31" +version = "0.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" +checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29" dependencies = [ "memchr", ] @@ -3703,7 +3259,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] diff --git a/packages/backend/native-utils/Cargo.toml b/packages/backend/native-utils/Cargo.toml index f84d99980d..a85dba0148 100644 --- a/packages/backend/native-utils/Cargo.toml +++ b/packages/backend/native-utils/Cargo.toml @@ -3,9 +3,6 @@ edition = "2021" name = "native-utils" version = "0.0.0" -[workspace] -members = ["migration"] - [features] default = [] napi = ["dep:napi", "dep:napi-derive"] diff --git a/packages/backend/native-utils/migration/Cargo.toml b/packages/backend/native-utils/migration/Cargo.toml deleted file mode 100644 index 39047906f0..0000000000 --- a/packages/backend/native-utils/migration/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "migration" -version = "0.1.0" -edition = "2021" -publish = false - -[lib] -name = "migration" -path = "src/lib.rs" - -[features] -default = [] -convert = ["dep:native-utils", "dep:indicatif", "dep:futures"] - -[dependencies] -serde_json = "1.0.108" -native-utils = { path = "../", optional = true } -indicatif = { version = "0.17.7", features = ["tokio"], optional = true } -tokio = { version = "1.35.1", features = ["full"] } -futures = { version = "0.3.30", optional = true } -serde_yaml = "0.9.29" -serde = { version = "1.0.193", features = ["derive"] } -urlencoding = "2.1.3" -redis = { version = "0.24.0", features = ["tokio-rustls-comp"] } -sea-orm = "0.12.10" -url = { version = "2.5.0", features = ["serde"] } -basen = "0.1.0" - -[dependencies.sea-orm-migration] -version = "0.12.10" -features = [ - # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. - # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. - # e.g. - "runtime-tokio-rustls", # `ASYNC_RUNTIME` feature - "sqlx-postgres", # `DATABASE_DRIVER` feature -] diff --git a/packages/backend/native-utils/migration/README.md b/packages/backend/native-utils/migration/README.md deleted file mode 100644 index 1ac338d743..0000000000 --- a/packages/backend/native-utils/migration/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Making migrations - -For more information, please read https://www.sea-ql.org/SeaORM/docs/migration/setting-up-migration/ - -- Install `sea-orm-cli` - ```sh - cargo install sea-orm-cli - ``` - -- Generate - ```sh - sea-orm-cli migrate generate **** - ``` - -# Running Migrator CLI - -- Generate a new migration file - ```sh - cargo run -- migrate generate MIGRATION_NAME - ``` -- Apply all pending migrations - ```sh - cargo run - ``` - ```sh - cargo run -- up - ``` -- Apply first 10 pending migrations - ```sh - cargo run -- up -n 10 - ``` -- Rollback last applied migrations - ```sh - cargo run -- down - ``` -- Rollback last 10 applied migrations - ```sh - cargo run -- down -n 10 - ``` -- Drop all tables from the database, then reapply all migrations - ```sh - cargo run -- fresh - ``` -- Rollback all applied migrations, then reapply all migrations - ```sh - cargo run -- refresh - ``` -- Rollback all applied migrations - ```sh - cargo run -- reset - ``` -- Check the status of all migrations - ```sh - cargo run -- status - ``` diff --git a/packages/backend/native-utils/migration/src/lib.rs b/packages/backend/native-utils/migration/src/lib.rs deleted file mode 100644 index a0f8fc85b4..0000000000 --- a/packages/backend/native-utils/migration/src/lib.rs +++ /dev/null @@ -1,35 +0,0 @@ -pub use sea_orm_migration::prelude::*; - -use basen::BASE36; - -mod m20230531_180824_drop_reversi; -mod m20230627_185451_index_note_url; -mod m20230709_000510_move_antenna_to_cache; -mod m20230806_170616_fix_antenna_stream_ids; -mod m20230904_013244_is_indexable; -mod m20231002_143323_remove_integrations; - -pub struct Migrator; - -#[async_trait::async_trait] -impl MigratorTrait for Migrator { - fn migrations() -> Vec> { - vec![ - Box::new(m20230531_180824_drop_reversi::Migration), - Box::new(m20230627_185451_index_note_url::Migration), - Box::new(m20230709_000510_move_antenna_to_cache::Migration), - Box::new(m20230806_170616_fix_antenna_stream_ids::Migration), - Box::new(m20230904_013244_is_indexable::Migration), - Box::new(m20231002_143323_remove_integrations::Migration), - ] - } -} - -pub fn get_timestamp(id: &str) -> i64 { - const TIME_2000: i64 = 946_684_800_000; - let n: Option = BASE36.decode_var_len(&id[0..8]); - match n { - None => -1, - Some(n) => n as i64 + TIME_2000, - } -} diff --git a/packages/backend/native-utils/migration/src/m20230531_180824_drop_reversi.rs b/packages/backend/native-utils/migration/src/m20230531_180824_drop_reversi.rs deleted file mode 100644 index 32b8dae223..0000000000 --- a/packages/backend/native-utils/migration/src/m20230531_180824_drop_reversi.rs +++ /dev/null @@ -1,51 +0,0 @@ -use sea_orm_migration::{ - prelude::*, - sea_orm::{DbBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - if manager.get_database_backend() == DbBackend::Sqlite { - return Ok(()); - } - - let db = manager.get_connection(); - db.query_one(Statement::from_string( - DbBackend::Postgres, - Table::drop() - .table(ReversiGame::Table) - .if_exists() - .to_string(PostgresQueryBuilder), - )) - .await?; - db.query_one(Statement::from_string( - DbBackend::Postgres, - Table::drop() - .table(ReversiMatching::Table) - .if_exists() - .to_string(PostgresQueryBuilder), - )) - .await?; - - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - Ok(()) - } -} - -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -enum ReversiGame { - Table, -} -#[derive(Iden)] -enum ReversiMatching { - Table, -} diff --git a/packages/backend/native-utils/migration/src/m20230627_185451_index_note_url.rs b/packages/backend/native-utils/migration/src/m20230627_185451_index_note_url.rs deleted file mode 100644 index ceffed9c41..0000000000 --- a/packages/backend/native-utils/migration/src/m20230627_185451_index_note_url.rs +++ /dev/null @@ -1,38 +0,0 @@ -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .create_index( - Index::create() - .name("IDX_note_url") - .table(Note::Table) - .col(Note::Url) - .if_not_exists() - .to_owned(), - ) - .await - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - Index::drop() - .name("IDX_note_url") - .table(Note::Table) - .to_owned(), - ) - .await - } -} - -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -enum Note { - Table, - Url, -} diff --git a/packages/backend/native-utils/migration/src/m20230709_000510_move_antenna_to_cache.rs b/packages/backend/native-utils/migration/src/m20230709_000510_move_antenna_to_cache.rs deleted file mode 100644 index 76ae721769..0000000000 --- a/packages/backend/native-utils/migration/src/m20230709_000510_move_antenna_to_cache.rs +++ /dev/null @@ -1,248 +0,0 @@ -use redis::streams::StreamMaxlen; -use sea_orm::Statement; -use sea_orm_migration::prelude::*; -use std::env; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - let cache_url = env::var("CACHE_URL").unwrap(); - let skip_copy = env::var("ANTENNA_MIGRATION_SKIP").unwrap_or_default(); - let copy_limit = env::var("ANTENNA_MIGRATION_COPY_LIMIT").unwrap_or_default(); - let read_limit: u64 = env::var("ANTENNA_MIGRATION_READ_LIMIT") - .unwrap_or("10000".to_string()) - .parse() - .unwrap(); - let copy_limit: i64 = match copy_limit.parse() { - Ok(limit) => limit, - Err(_) => 0, - }; - - if skip_copy == "true" { - println!("Skipped antenna migration"); - } else { - let prefix = env::var("CACHE_PREFIX").unwrap(); - - let db = manager.get_connection(); - let bk = manager.get_database_backend(); - - let count_stmt = - Statement::from_string(bk, "SELECT COUNT(1) FROM antenna_note".to_owned()); - let total_num = db - .query_one(count_stmt) - .await? - .unwrap() - .try_get_by_index::(0)?; - let copy_limit = if copy_limit > 0 { - copy_limit - } else { - total_num - }; - println!( - "Copying {} out of {} entries in antenna_note.", - copy_limit, total_num - ); - - let stmt_base = Query::select() - .column((AntennaNote::Table, AntennaNote::Id)) - .column(AntennaNote::AntennaId) - .column(AntennaNote::NoteId) - .from(AntennaNote::Table) - .order_by((AntennaNote::Table, AntennaNote::Id), Order::Asc) - .limit(read_limit) - .to_owned(); - - let mut stmt = stmt_base.clone(); - - let client = redis::Client::open(cache_url).unwrap(); - let mut redis_conn = client.get_connection().unwrap(); - - let mut remaining = total_num; - let mut pagination: i64 = 0; - - loop { - let res = db.query_all(bk.build(&stmt)).await?; - if res.len() == 0 { - break; - } - let val: Vec<(String, String, String)> = res - .iter() - .filter_map(|q| q.try_get_many_by_index().ok()) - .collect(); - - remaining -= val.len() as i64; - if remaining <= copy_limit { - let mut pipe = redis::pipe(); - for v in &val { - pipe.xadd_maxlen( - format!("{}:antennaTimeline:{}", prefix, v.1), - StreamMaxlen::Approx(200), - "*", - &[("note", v.2.to_owned())], - ) - .ignore(); - } - pipe.query::<()>(&mut redis_conn).unwrap_or(()); - } - - let copied = total_num - remaining; - let copied = std::cmp::min(copied, total_num); - pagination += 1; - if pagination % 10 == 0 { - println!( - "Migrating antenna [{:.2}%]", - (copied as f64 / total_num as f64) * 100_f64, - ); - } - - if let Some((last_id, _, _)) = val.last() { - stmt = stmt_base - .clone() - .and_where( - Expr::col((AntennaNote::Table, AntennaNote::Id)).gt(last_id.to_owned()), - ) - .to_owned(); - } else { - break; - } - } - - println!("Migrating antenna [100.00%]"); - } - - manager - .drop_table( - Table::drop() - .table(AntennaNote::Table) - .if_exists() - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .create_table( - Table::create() - .table(AntennaNote::Table) - .if_not_exists() - .col( - ColumnDef::new(AntennaNote::Id) - .string_len(32) - .not_null() - .primary_key(), - ) - .col( - ColumnDef::new(AntennaNote::NoteId) - .string_len(32) - .not_null(), - ) - .col( - ColumnDef::new(AntennaNote::AntennaId) - .string_len(32) - .not_null(), - ) - .col( - ColumnDef::new(AntennaNote::Read) - .boolean() - .default(false) - .not_null(), - ) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("IDX_0d775946662d2575dfd2068a5f") - .table(AntennaNote::Table) - .col(AntennaNote::AntennaId) - .if_not_exists() - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("IDX_bd0397be22147e17210940e125") - .table(AntennaNote::Table) - .col(AntennaNote::NoteId) - .if_not_exists() - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("IDX_335a0bf3f904406f9ef3dd51c2") - .table(AntennaNote::Table) - .col(AntennaNote::NoteId) - .col(AntennaNote::AntennaId) - .unique() - .if_not_exists() - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("IDX_9937ea48d7ae97ffb4f3f063a4") - .table(AntennaNote::Table) - .col(AntennaNote::Read) - .if_not_exists() - .to_owned(), - ) - .await?; - manager - .create_foreign_key( - ForeignKey::create() - .name("FK_0d775946662d2575dfd2068a5f5") - .from(AntennaNote::Table, AntennaNote::AntennaId) - .to(Antenna::Table, Antenna::Id) - .on_delete(ForeignKeyAction::Cascade) - .to_owned(), - ) - .await?; - manager - .create_foreign_key( - ForeignKey::create() - .name("FK_bd0397be22147e17210940e125b") - .from(AntennaNote::Table, AntennaNote::NoteId) - .to(Note::Table, Note::Id) - .on_delete(ForeignKeyAction::Cascade) - .to_owned(), - ) - .await?; - - Ok(()) - } -} - -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -enum AntennaNote { - Table, - Id, - #[iden = "noteId"] - NoteId, - #[iden = "antennaId"] - AntennaId, - Read, -} - -#[derive(Iden)] -enum Antenna { - Table, - Id, -} - -#[derive(Iden)] -enum Note { - Table, - Id, -} diff --git a/packages/backend/native-utils/migration/src/m20230806_170616_fix_antenna_stream_ids.rs b/packages/backend/native-utils/migration/src/m20230806_170616_fix_antenna_stream_ids.rs deleted file mode 100644 index 6d45b76139..0000000000 --- a/packages/backend/native-utils/migration/src/m20230806_170616_fix_antenna_stream_ids.rs +++ /dev/null @@ -1,60 +0,0 @@ -use std::env; - -use redis::Commands; -use sea_orm_migration::prelude::*; - -use crate::get_timestamp; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - let cache_url = env::var("CACHE_URL").unwrap(); - let prefix = env::var("CACHE_PREFIX").unwrap(); - - let client = redis::Client::open(cache_url).unwrap(); - let mut redis_conn = client.get_connection().unwrap(); - - let keys: Vec = redis_conn - .keys(format!("{}:antennaTimeline:*", prefix)) - .unwrap(); - let key_len = keys.len(); - - println!( - "Fixing corrupted stream IDs: {} timelines to be fixed", - key_len - ); - - for (i, key) in keys.iter().enumerate() { - let all_elems: Vec>> = redis_conn.xrange_all(key).unwrap(); // Get all post IDs in stream - let stream_ids = all_elems - .iter() - .map(|v| format!("{}-*", get_timestamp(&v[1][1]))); // Get correct stream id with timestamp - redis_conn.del::<_, ()>(key).unwrap(); - for (j, v) in stream_ids.enumerate() { - redis_conn - .xadd(key, v, &[("note", &all_elems[j][1][1])]) - .unwrap_or(()); - } - - if i % 10 == 0 { - println!( - "Fixing streams [{:.2}%]", - (i as f64 / key_len as f64) * 100_f64 - ); - } - } - - println!("Fixing streams [100.00%]"); - - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - Ok(()) - } -} diff --git a/packages/backend/native-utils/migration/src/m20230904_013244_is_indexable.rs b/packages/backend/native-utils/migration/src/m20230904_013244_is_indexable.rs deleted file mode 100644 index 84898fd95a..0000000000 --- a/packages/backend/native-utils/migration/src/m20230904_013244_is_indexable.rs +++ /dev/null @@ -1,74 +0,0 @@ -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(User::Table) - .add_column( - ColumnDef::new(User::IsIndexable) - .boolean() - .not_null() - .default(true), - ) - .to_owned(), - ) - .await?; - manager - .alter_table( - Table::alter() - .table(UserProfile::Table) - .add_column( - ColumnDef::new(UserProfile::IsIndexable) - .boolean() - .not_null() - .default(true), - ) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(User::Table) - .drop_column(User::IsIndexable) - .to_owned(), - ) - .await?; - manager - .alter_table( - Table::alter() - .table(UserProfile::Table) - .drop_column(UserProfile::IsIndexable) - .to_owned(), - ) - .await?; - - Ok(()) - } -} - -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -enum User { - Table, - #[iden = "isIndexable"] - IsIndexable, -} - -#[derive(Iden)] -enum UserProfile { - Table, - #[iden = "isIndexable"] - IsIndexable, -} diff --git a/packages/backend/native-utils/migration/src/m20231002_143323_remove_integrations.rs b/packages/backend/native-utils/migration/src/m20231002_143323_remove_integrations.rs deleted file mode 100644 index a8ef8fdbbd..0000000000 --- a/packages/backend/native-utils/migration/src/m20231002_143323_remove_integrations.rs +++ /dev/null @@ -1,117 +0,0 @@ -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(UserProfile::Table) - .drop_column(UserProfile::Integrations) - .to_owned(), - ) - .await?; - - manager - .alter_table( - Table::alter() - .table(Meta::Table) - .drop_column(Meta::EnableTwitterIntegration) - .drop_column(Meta::TwitterConsumerKey) - .drop_column(Meta::TwitterConsumerSecret) - .drop_column(Meta::EnableGithubIntegration) - .drop_column(Meta::GithubClientId) - .drop_column(Meta::GithubClientSecret) - .drop_column(Meta::EnableDiscordIntegration) - .drop_column(Meta::DiscordClientId) - .drop_column(Meta::DiscordClientSecret) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(Meta::Table) - .add_column(ColumnDef::new(Meta::DiscordClientSecret).string()) - .add_column(ColumnDef::new(Meta::DiscordClientId).string()) - .add_column( - ColumnDef::new(Meta::EnableDiscordIntegration) - .boolean() - .not_null() - .default(false), - ) - .add_column(ColumnDef::new(Meta::GithubClientSecret).string()) - .add_column(ColumnDef::new(Meta::GithubClientId).string()) - .add_column( - ColumnDef::new(Meta::EnableGithubIntegration) - .boolean() - .not_null() - .default(false), - ) - .add_column(ColumnDef::new(Meta::TwitterConsumerSecret).string()) - .add_column(ColumnDef::new(Meta::TwitterConsumerKey).string()) - .add_column( - ColumnDef::new(Meta::EnableTwitterIntegration) - .boolean() - .not_null() - .default(false), - ) - .to_owned(), - ) - .await?; - - manager - .alter_table( - Table::alter() - .table(UserProfile::Table) - .add_column( - ColumnDef::new(UserProfile::Integrations) - .json() - .default("{}"), - ) - .to_owned(), - ) - .await?; - - Ok(()) - } -} - -#[derive(Iden)] - -enum UserProfile { - Table, - #[iden = "integrations"] - Integrations, -} - -#[derive(Iden)] -enum Meta { - Table, - #[iden = "enableTwitterIntegration"] - EnableTwitterIntegration, - #[iden = "twitterConsumerKey"] - TwitterConsumerKey, - #[iden = "twitterConsumerSecret"] - TwitterConsumerSecret, - #[iden = "enableGithubIntegration"] - EnableGithubIntegration, - #[iden = "githubClientId"] - GithubClientId, - #[iden = "githubClientSecret"] - GithubClientSecret, - #[iden = "enableDiscordIntegration"] - EnableDiscordIntegration, - #[iden = "discordClientId"] - DiscordClientId, - #[iden = "discordClientSecret"] - DiscordClientSecret, -} diff --git a/packages/backend/native-utils/migration/src/main.rs b/packages/backend/native-utils/migration/src/main.rs deleted file mode 100644 index ca1246cf53..0000000000 --- a/packages/backend/native-utils/migration/src/main.rs +++ /dev/null @@ -1,109 +0,0 @@ -use serde::Deserialize; -use std::env; -use std::fs; -use urlencoding::encode; - -use sea_orm_migration::prelude::*; - -const DB_URL_ENV: &str = "DATABASE_URL"; -const CACHE_URL_ENV: &str = "CACHE_URL"; -const CACHE_PREFIX_ENV: &str = "CACHE_PREFIX"; - -#[cfg(feature = "convert")] -mod vec_to_json; - -#[tokio::main] -async fn main() { - let cwd = env::current_dir().unwrap(); - let yml = fs::File::open(cwd.join("../../.config/default.yml")) - .expect("Failed to open '.config/default.yml'"); - let config: Config = serde_yaml::from_reader(yml).expect("Failed to parse yaml"); - - if env::var_os(DB_URL_ENV).is_none() { - env::set_var( - DB_URL_ENV, - format!( - "postgres://{}:{}@{}:{}/{}", - config.db.user, - encode(&config.db.pass), - config.db.host, - config.db.port, - config.db.db, - ), - ); - }; - - if env::var_os(CACHE_URL_ENV).is_none() { - let redis_conf = match config.cache_server { - None => config.redis, - Some(conf) => conf, - }; - let redis_proto = match redis_conf.tls { - None => "redis", - Some(_) => "rediss", - }; - let redis_user = redis_conf.user.unwrap_or("default".to_string()); - let redis_uri_userpass = format!( - "{}:{}", - redis_user, - encode(&redis_conf.pass.unwrap_or_default()) - ); - let redis_uri_hostport = format!("{}:{}", redis_conf.host, redis_conf.port); - let redis_uri = format!( - "{}://{}@{}/{}", - redis_proto, redis_uri_userpass, redis_uri_hostport, redis_conf.db - ); - env::set_var(CACHE_URL_ENV, redis_uri); - env::set_var( - CACHE_PREFIX_ENV, - if redis_conf.prefix.is_empty() { - config.url.host_str().unwrap() - } else { - &redis_conf.prefix - }, - ); - } - - cli::run_cli(migration::Migrator).await; - - #[cfg(feature = "convert")] - vec_to_json::convert().await; -} - -#[derive(Debug, PartialEq, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct Config { - pub url: url::Url, - pub db: DbConfig, - pub redis: RedisConfig, - pub cache_server: Option, -} - -#[derive(Debug, PartialEq, Deserialize)] -pub struct DbConfig { - pub host: String, - pub port: u32, - pub db: String, - pub user: String, - pub pass: String, -} - -#[derive(Debug, PartialEq, Deserialize)] -pub struct RedisConfig { - pub host: String, - pub port: u32, - pub user: Option, - pub pass: Option, - pub tls: Option, - #[serde(default)] - pub db: u32, - #[serde(default)] - pub prefix: String, -} - -#[derive(Debug, PartialEq, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct TlsConfig { - pub host: String, - pub reject_unauthorized: bool, -} diff --git a/packages/backend/native-utils/migration/src/vec_to_json.rs b/packages/backend/native-utils/migration/src/vec_to_json.rs deleted file mode 100644 index 104357a496..0000000000 --- a/packages/backend/native-utils/migration/src/vec_to_json.rs +++ /dev/null @@ -1,498 +0,0 @@ -use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; -use native_utils::model::entity::newtype::{I32Vec, StringVec}; -use sea_orm_migration::{ - prelude::*, - sea_orm::{Database, DbBackend, DbConn, Statement, TryGetable}, -}; -use serde_json::json; -use std::env; -use std::time::Duration; - -pub async fn convert() { - let uri = env::var("DATABASE_URL").expect("Environment variable 'DATABASE_URL' not set"); - - let db = Database::connect(uri).await.expect("Unable to connect"); - let mp = MultiProgress::new(); - - let handlers = vec![ - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - AccessToken::Table, - AccessToken::Id, - AccessToken::Permission, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Antenna::Table, - Antenna::Id, - Antenna::Users, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - App::Table, - App::Id, - App::Permission, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Emoji::Table, - Emoji::Id, - Emoji::Aliases, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - GalleryPost::Table, - GalleryPost::Id, - GalleryPost::FileIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - GalleryPost::Table, - GalleryPost::Id, - GalleryPost::Tags, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Hashtag::Table, - Hashtag::Id, - Hashtag::MentionedUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Hashtag::Table, - Hashtag::Id, - Hashtag::MentionedLocalUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Hashtag::Table, - Hashtag::Id, - Hashtag::MentionedRemoteUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Hashtag::Table, - Hashtag::Id, - Hashtag::AttachedUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Hashtag::Table, - Hashtag::Id, - Hashtag::AttachedLocalUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Hashtag::Table, - Hashtag::Id, - Hashtag::AttachedRemoteUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - MessagingMessage::Table, - MessagingMessage::Id, - MessagingMessage::Reads, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::Langs, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::BlockedHosts, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::HiddenTags, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::PinnedUsers, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::PinnedPages, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::RecommendedInstances, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Meta::Table, - Meta::Id, - Meta::SilencedHosts, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Note::Table, - Note::Id, - Note::FileIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Note::Table, - Note::Id, - Note::AttachedFileTypes, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Note::Table, - Note::Id, - Note::VisibleUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Note::Table, - Note::Id, - Note::Mentions, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Note::Table, - Note::Id, - Note::Emojis, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Note::Table, - Note::Id, - Note::Tags, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - NoteEdit::Table, - NoteEdit::Id, - NoteEdit::FileIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Page::Table, - Page::Id, - Page::VisibleUserIds, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - RegistryItem::Table, - RegistryItem::Id, - RegistryItem::Scope, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - User::Table, - User::Id, - User::Tags, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - User::Table, - User::Id, - User::Emojis, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Webhook::Table, - Webhook::Id, - Webhook::On, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - Poll::Table, - Poll::NoteId, - Poll::Choices, - )), - tokio::spawn(to_json::, I32Vec>( - db.clone(), - mp.clone(), - Poll::Table, - Poll::NoteId, - Poll::Votes, - )), - tokio::spawn(to_json::, StringVec>( - db.clone(), - mp.clone(), - UserProfile::Table, - UserProfile::UserId, - UserProfile::MutingNotificationTypes, - )), - ]; - - futures::future::join_all(handlers).await; -} - -fn select_query(table: T, id: T, col: T) -> String { - Query::select() - .column(id) - .column(col) - .from(table) - .to_string(PostgresQueryBuilder) -} - -async fn get_vec(db: &DbConn, query: String) -> Result, DbErr> { - let res: Vec<(String, T)> = db - .query_all(Statement::from_string(DbBackend::Postgres, query)) - .await? - .iter() - .filter_map(|r| r.try_get_many_by_index().ok()) - .collect(); - Ok(res) -} - -async fn convert_col( - db: &DbConn, - table: T, - col: T, -) -> Result<(), DbErr> { - let stmt = Table::alter() - .table(table) - .drop_column(col.to_owned()) - .add_column( - ColumnDef::new(col.to_owned()) - .json_binary() - .not_null() - .default(json!([])), - ) - .to_string(PostgresQueryBuilder); - db.query_one(Statement::from_string(DbBackend::Postgres, stmt)) - .await?; - Ok(()) -} - -async fn to_json( - db: DbConn, - mp: MultiProgress, - table: T, - id: T, - col: T, -) -> Result<(), DbErr> -where - T: Iden + Clone + 'static, - U: TryGetable + IntoIterator + Clone, - V: From + Into, -{ - let query = select_query(table.clone(), id.clone(), col.clone()); - let loading = ProgressBar::new_spinner() - .with_style(ProgressStyle::with_template("{prefix} {msg} {spinner}").unwrap()) - .with_prefix("[-]") - .with_message(format!( - "Loading data from {}.{}", - table.to_string(), - col.to_string() - )); - let loading = mp.add(loading); - loading.enable_steady_tick(Duration::from_millis(100)); - let res = get_vec::(&db, query).await?; - let models: Vec<(String, V)> = res - .iter() - .filter(|(_, r)| r.clone().into_iter().count() > 0) - .map(|(id, r)| (id.clone(), ::from(r.clone()))) - .collect(); - loading.finish_and_clear(); - convert_col(&db, table.clone(), col.clone()).await?; - - let progress = ProgressBar::new(models.len() as u64) - .with_style( - ProgressStyle::with_template("{prefix} {msg} {wide_bar} {pos}/{len}") - .unwrap() - .progress_chars("##-"), - ) - .with_prefix("[*]") - .with_message(format!("Copying {}.{}", table.to_string(), col.to_string())); - let progress = mp.add(progress); - - for model in models { - progress.inc(1); - let q = Query::update() - .table(table.clone()) - .values([(col.clone(), model.1.into())]) - .and_where(Expr::col(id.clone()).eq(model.0)) - .to_string(PostgresQueryBuilder); - db.query_one(Statement::from_string(DbBackend::Postgres, q)) - .await?; - } - progress.finish_with_message(format!("Done {}.{}", table.to_string(), col.to_string())); - - Ok(()) -} - -#[derive(Iden, Clone)] -enum AccessToken { - Table, - Id, - Permission, -} -#[derive(Iden, Clone)] -enum Antenna { - Table, - Id, - Users, -} -#[derive(Iden, Clone)] -enum App { - Table, - Id, - Permission, -} -#[derive(Iden, Clone)] -enum Emoji { - Table, - Id, - Aliases, -} -#[derive(Iden, Clone)] -enum GalleryPost { - Table, - Id, - #[iden = "fileIds"] - FileIds, - Tags, -} -#[derive(Iden, Clone)] -enum Hashtag { - Table, - Id, - #[iden = "mentionedUserIds"] - MentionedUserIds, - #[iden = "mentionedLocalUserIds"] - MentionedLocalUserIds, - #[iden = "mentionedRemoteUserIds"] - MentionedRemoteUserIds, - #[iden = "attachedUserIds"] - AttachedUserIds, - #[iden = "attachedLocalUserIds"] - AttachedLocalUserIds, - #[iden = "attachedRemoteUserIds"] - AttachedRemoteUserIds, -} -#[derive(Iden, Clone)] -enum MessagingMessage { - Table, - Id, - Reads, -} -#[derive(Iden, Clone)] -enum Meta { - Table, - Id, - Langs, - #[iden = "hiddenTags"] - HiddenTags, - #[iden = "blockedHosts"] - BlockedHosts, - #[iden = "pinnedUsers"] - PinnedUsers, - #[iden = "pinnedPages"] - PinnedPages, - #[iden = "recommendedInstances"] - RecommendedInstances, - #[iden = "silencedHosts"] - SilencedHosts, -} -#[derive(Iden, Clone)] -enum Note { - Table, - Id, - #[iden = "fileIds"] - FileIds, - #[iden = "attachedFileTypes"] - AttachedFileTypes, - #[iden = "visibleUserIds"] - VisibleUserIds, - Mentions, - Emojis, - Tags, -} -#[derive(Iden, Clone)] -enum NoteEdit { - Table, - Id, - #[iden = "fileIds"] - FileIds, -} -#[derive(Iden, Clone)] -enum Page { - Table, - Id, - #[iden = "visibleUserIds"] - VisibleUserIds, -} -#[derive(Iden, Clone)] -enum Poll { - Table, - #[iden = "noteId"] - NoteId, - Choices, - Votes, // I32Vec -} -#[derive(Iden, Clone)] -enum RegistryItem { - Table, - Id, - Scope, -} -#[derive(Iden, Clone)] -enum User { - Table, - Id, - Tags, - Emojis, -} -#[derive(Iden, Clone)] -enum UserProfile { - Table, - #[iden = "userId"] - UserId, - #[iden = "mutingNotificationTypes"] - MutingNotificationTypes, -} -#[derive(Iden, Clone)] -enum Webhook { - Table, - Id, - On, -} diff --git a/packages/backend/native-utils/package.json b/packages/backend/native-utils/package.json index 08d9e721bf..90274de685 100644 --- a/packages/backend/native-utils/package.json +++ b/packages/backend/native-utils/package.json @@ -34,10 +34,8 @@ }, "scripts": { "artifacts": "napi artifacts", - "build": "pnpm run build:napi && pnpm run build:migration", - "build:napi": "napi build --features napi --platform --release ./built/", - "build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp -v ./target/release/migration ./built/migration", - "build:debug": "napi build --features napi --platform ./built/ && cargo build --locked --manifest-path ./migration/Cargo.toml && cp -v ./target/debug/migration ./built/migration", + "build": "napi build --features napi --platform --release ./built/", + "build:debug": "napi build --features napi --platform ./built/", "prepublishOnly": "napi prepublish -t npm", "test": "pnpm run cargo:test && pnpm run build:napi && ava", "universal": "napi universal", diff --git a/packages/backend/package.json b/packages/backend/package.json index b03d52c67a..944f608427 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -6,12 +6,8 @@ "scripts": { "start": "pnpm node ./built/index.js", "start:test": "NODE_ENV=test pnpm node ./built/index.js", - "migrate": "pnpm run migrate:typeorm && pnpm run migrate:cargo", - "migrate:typeorm": "typeorm migration:run -d ormconfig.js", - "migrate:cargo": "./native-utils/built/migration up", - "revertmigration": "pnpm run revertmigration:cargo && pnpm run revertmigration:typeorm", - "revertmigration:typeorm": "typeorm migration:revert -d ormconfig.js", - "revertmigration:cargo": "./native-utils/built/migration down", + "migrate": "typeorm migration:run -d ormconfig.js", + "revertmigration": "typeorm migration:revert -d ormconfig.js", "check:connect": "node ./check_connect.js", "build": "pnpm swc src -d built -D", "build:debug": "pnpm swc src -d built -s -D",