diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 72dc6a031..6d3187854 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -8,7 +8,8 @@ "vite": "vite", "dev": "tauri dev", "tauri": "tauri", - "build": "tauri build" + "build": "tauri build", + "dmg": "open ../../target/release/bundle/dmg/" }, "dependencies": { "@rspc/tauri": "^0.0.0-main-7c0a67c1", diff --git a/core/prisma/migrations/20221024204936_fix_migrations/migration.sql b/core/prisma/migrations/20221024204936_fix_migrations/migration.sql new file mode 100644 index 000000000..12bb46a7f --- /dev/null +++ b/core/prisma/migrations/20221024204936_fix_migrations/migration.sql @@ -0,0 +1,40 @@ +/* + Warnings: + + - You are about to drop the column `checksum` on the `key` table. All the data in the column will be lost. + - You are about to alter the column `algorithm` on the `key` table. The data in that column could be lost. The data in that column will be cast from `Int` to `Binary`. + - Added the required column `content_salt` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `default` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `hashing_algorithm` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `key` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `key_nonce` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `master_key` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `master_key_nonce` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `salt` to the `key` table without a default value. This is not possible if the table is not empty. + - Added the required column `uuid` to the `key` table without a default value. This is not possible if the table is not empty. + - Made the column `algorithm` on table `key` required. This step will fail if there are existing NULL values in that column. + +*/ +-- RedefineTables +PRAGMA foreign_keys=OFF; +CREATE TABLE "new_key" ( + "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + "uuid" TEXT NOT NULL, + "name" TEXT, + "default" BOOLEAN NOT NULL, + "date_created" DATETIME DEFAULT CURRENT_TIMESTAMP, + "algorithm" BLOB NOT NULL, + "hashing_algorithm" BLOB NOT NULL, + "salt" BLOB NOT NULL, + "content_salt" BLOB NOT NULL, + "master_key" BLOB NOT NULL, + "master_key_nonce" BLOB NOT NULL, + "key_nonce" BLOB NOT NULL, + "key" BLOB NOT NULL +); +INSERT INTO "new_key" ("algorithm", "date_created", "id", "name") SELECT "algorithm", "date_created", "id", "name" FROM "key"; +DROP TABLE "key"; +ALTER TABLE "new_key" RENAME TO "key"; +CREATE UNIQUE INDEX "key_uuid_key" ON "key"("uuid"); +PRAGMA foreign_key_check; +PRAGMA foreign_keys=ON; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8f97758e..06a65226d 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ