@package-broker/main 0.10.12 → 0.12.0
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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- Tokens: make rate_limit_max default NULL (unlimited)
|
|
2
|
+
-- D1/SQLite doesn't support altering column defaults directly, so rebuild the table.
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS tokens_new (
|
|
5
|
+
id TEXT PRIMARY KEY,
|
|
6
|
+
description TEXT NOT NULL,
|
|
7
|
+
token_hash TEXT NOT NULL,
|
|
8
|
+
permissions TEXT NOT NULL DEFAULT 'readonly',
|
|
9
|
+
rate_limit_max INTEGER,
|
|
10
|
+
created_at INTEGER NOT NULL,
|
|
11
|
+
expires_at INTEGER,
|
|
12
|
+
last_used_at INTEGER
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
INSERT INTO tokens_new (id, description, token_hash, permissions, rate_limit_max, created_at, expires_at, last_used_at)
|
|
16
|
+
SELECT id, description, token_hash, permissions, rate_limit_max, created_at, expires_at, last_used_at
|
|
17
|
+
FROM tokens;
|
|
18
|
+
|
|
19
|
+
DROP TABLE tokens;
|
|
20
|
+
ALTER TABLE tokens_new RENAME TO tokens;
|
|
21
|
+
|
|
22
|
+
CREATE INDEX IF NOT EXISTS idx_tokens_token_hash ON tokens(token_hash);
|
|
23
|
+
|
|
24
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Add is_manual_upload flag to packages table
|
|
2
|
+
-- This field marks packages that were manually uploaded vs synced from repositories
|
|
3
|
+
|
|
4
|
+
ALTER TABLE packages ADD COLUMN is_manual_upload INTEGER DEFAULT 0 NOT NULL;
|
|
5
|
+
|
|
6
|
+
-- Index for filtering manual uploads
|
|
7
|
+
CREATE INDEX idx_packages_manual_upload ON packages(is_manual_upload);
|
|
8
|
+
|