@hot-updater/postgres 1.2.0-rc.11 → 1.2.0-rc.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/sql/bundles.sql +3 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/postgres",
3
3
  "type": "module",
4
- "version": "1.2.0-rc.11",
4
+ "version": "1.2.0-rc.13",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
@@ -34,9 +34,9 @@
34
34
  "dependencies": {
35
35
  "kysely": "0.28.17",
36
36
  "pg": "8.13.1",
37
- "@hot-updater/protocol": "1.2.0-rc.11",
38
- "@hot-updater/plugin-core": "1.2.0-rc.11",
39
- "@hot-updater/server": "1.2.0-rc.11"
37
+ "@hot-updater/protocol": "1.2.0-rc.13",
38
+ "@hot-updater/server": "1.2.0-rc.13",
39
+ "@hot-updater/plugin-core": "1.2.0-rc.13"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@electric-sql/pglite": "0.4.1",
@@ -45,7 +45,7 @@
45
45
  "camelcase-keys": "^9.1.3",
46
46
  "kysely-pglite-dialect": "1.2.0",
47
47
  "pg-minify": "^1.6.5",
48
- "@hot-updater/test-utils": "1.2.0-rc.11"
48
+ "@hot-updater/test-utils": "1.2.0-rc.13"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsdown",
package/sql/bundles.sql CHANGED
@@ -34,12 +34,14 @@ CREATE UNIQUE INDEX IF NOT EXISTS "channels_name" ON "channels" ("name");
34
34
 
35
35
  CREATE TABLE IF NOT EXISTS "bundle_totals" ("platform_key" varchar(16) COLLATE "C" NOT NULL, "_shard" bigint NOT NULL, "bundles" bigint NOT NULL, "_v" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("platform_key", "_shard"));
36
36
 
37
- CREATE TABLE IF NOT EXISTS "native_builds" ("id" varchar(36) COLLATE "C" NOT NULL, "scope_key" varchar(2048) COLLATE "C" NOT NULL, "platform" varchar(16) COLLATE "C" NOT NULL, "channel_id" varchar(1408) COLLATE "C" NOT NULL, "fingerprint_hash" varchar(255) COLLATE "C", "app_version" text COLLATE "C", "min_bundle_id" varchar(36) COLLATE "C" NOT NULL, "artifact_kind" varchar(16) COLLATE "C" NOT NULL, "artifact_storage_uri" text COLLATE "C" NOT NULL, "byte_size" bigint NOT NULL, "git_commit_hash" varchar(255) COLLATE "C", "created_at_ms" bigint NOT NULL, "build_key" varchar(69) COLLATE "C", "build_number" varchar(64) COLLATE "C", "submitted_to" varchar(16) COLLATE "C", "submitted_at_ms" bigint, "submitted_version" varchar(255) COLLATE "C", "_v" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
37
+ CREATE TABLE IF NOT EXISTS "native_builds" ("id" varchar(36) COLLATE "C" NOT NULL, "scope_key" varchar(2048) COLLATE "C" NOT NULL, "platform" varchar(16) COLLATE "C" NOT NULL, "channel_id" varchar(1408) COLLATE "C" NOT NULL, "fingerprint_hash" varchar(255) COLLATE "C", "app_version" text COLLATE "C", "min_bundle_id" varchar(36) COLLATE "C" NOT NULL, "artifact_kind" varchar(16) COLLATE "C" NOT NULL, "artifact_storage_uri" text COLLATE "C" NOT NULL, "byte_size" bigint NOT NULL, "git_commit_hash" varchar(255) COLLATE "C", "created_at_ms" bigint NOT NULL, "build_key" varchar(69) COLLATE "C", "build_number" varchar(64) COLLATE "C", "submitted_to" varchar(16) COLLATE "C", "submitted_at_ms" bigint, "submitted_version" varchar(255) COLLATE "C", "store_build" boolean, "_v" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
38
38
 
39
39
  CREATE INDEX IF NOT EXISTS "native_builds_byScope" ON "native_builds" ("scope_key", "id");
40
40
 
41
41
  CREATE INDEX IF NOT EXISTS "native_builds_byBuildKey" ON "native_builds" ("scope_key", "build_key", "id");
42
42
 
43
+ CREATE UNIQUE INDEX IF NOT EXISTS "native_builds_byStoreBuild" ON "native_builds" ("scope_key", "store_build");
44
+
43
45
  CREATE INDEX IF NOT EXISTS "native_builds_byChannel" ON "native_builds" ("channel_id", "id");
44
46
 
45
47
  CREATE UNIQUE INDEX IF NOT EXISTS "native_builds_min_bundle_id" ON "native_builds" ("min_bundle_id");