feat(billing): record subscription-covered token usage in usage records (#46)
Memind CI / Test, build, and release guards (push) Successful in 2m52s
Memind CI / Test, build, and release guards (push) Successful in 2m52s
This commit was merged in pull request #46.
This commit is contained in:
@@ -194,6 +194,12 @@ export async function migrateSchema(pool) {
|
||||
`ALTER TABLE h5_usage_records ADD UNIQUE KEY uniq_h5_usage_request_id (request_id)`,
|
||||
);
|
||||
}
|
||||
if (!(await columnExists(pool, 'h5_usage_records', 'billing_source'))) {
|
||||
await pool.query(
|
||||
`ALTER TABLE h5_usage_records
|
||||
ADD COLUMN billing_source VARCHAR(16) NOT NULL DEFAULT 'wallet' AFTER balance_after_cents`,
|
||||
);
|
||||
}
|
||||
|
||||
const assetForeignKeys = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user