fix: drop local quota store package table

Agent-Profile: https://agent-kanban.dev/agents/1dc839c09b5ee5e5
This commit is contained in:
Jasper Van
2026-05-06 17:50:34 -04:00
committed by GitHub
parent bf0bf99ef4
commit 9908953252
5 changed files with 2629 additions and 36 deletions
@@ -0,0 +1 @@
DROP TABLE `quota_store_packages`;
File diff suppressed because it is too large Load Diff
+7
View File
@@ -162,6 +162,13 @@
"when": 1778091420434,
"tag": "0023_add-quota-delivery-code",
"breakpoints": true
},
{
"idx": 24,
"version": "6",
"when": 1778101953600,
"tag": "0024_remove_quota_store_packages",
"breakpoints": true
}
]
}
-20
View File
@@ -54,26 +54,6 @@ export const quotaStoreSettings = sqliteTable('quota_store_settings', {
updatedAt: integer('updated_at', { mode: 'timestamp_ms' }).notNull(),
})
export const quotaStorePackages = sqliteTable(
'quota_store_packages',
{
id: text('id').primaryKey(),
name: text('name').notNull(),
description: text('description').notNull().default(''),
bytes: integer('bytes').notNull(),
amount: integer('amount').notNull(),
currency: text('currency').notNull(),
active: integer('active', { mode: 'boolean' }).notNull().default(true),
sortOrder: integer('sort_order').notNull().default(0),
cloudPackageId: text('cloud_package_id'),
syncStatus: text('sync_status').notNull().default('pending'),
syncError: text('sync_error'),
createdAt: integer('created_at', { mode: 'timestamp_ms' }).notNull(),
updatedAt: integer('updated_at', { mode: 'timestamp_ms' }).notNull(),
},
(t) => [index('quota_store_packages_active_sort_idx').on(t.active, t.sortOrder)],
)
export const quotaGrants = sqliteTable(
'quota_grants',
{
-16
View File
@@ -143,22 +143,6 @@ const APP_SCHEMA_SQL = `
created_at INTEGER NOT NULL,
updated_at INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS quota_store_packages (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
description TEXT NOT NULL DEFAULT '',
bytes INTEGER NOT NULL,
amount INTEGER NOT NULL,
currency TEXT NOT NULL,
active INTEGER NOT NULL DEFAULT 1,
sort_order INTEGER NOT NULL DEFAULT 0,
cloud_package_id TEXT,
sync_status TEXT NOT NULL DEFAULT 'pending',
sync_error TEXT,
created_at INTEGER NOT NULL,
updated_at INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS quota_store_packages_active_sort_idx ON quota_store_packages(active, sort_order);
CREATE TABLE IF NOT EXISTS quota_grants (
id TEXT PRIMARY KEY,
org_id TEXT NOT NULL,