Major version update. Major bugfixes. Security vulnerabilites fixed
This commit is contained in:
Vendored
+36
-2
@@ -1353,14 +1353,19 @@ export type BunSQLiteConfig = {
|
||||
db_name: string;
|
||||
/**
|
||||
* The Name of the Database Schema File. Eg `db_schema.ts`. This is
|
||||
* relative to `db_dir`, or root dir if `db_dir` is not provided
|
||||
* relative to `db_dir`, or root dir if `db_dir` is not provided. When
|
||||
* omitted, `schema.ts|js|json|yaml|yml` in `db_dir` is used.
|
||||
*/
|
||||
db_schema_file_name: string;
|
||||
db_schema_file_name?: string;
|
||||
/**
|
||||
* The Directory for backups. Relative to db_dir.
|
||||
*/
|
||||
db_backup_dir?: string;
|
||||
max_backups?: number;
|
||||
/**
|
||||
* Max number of archives kept in `{db_dir}/.exports` by `export`
|
||||
*/
|
||||
max_exports?: number;
|
||||
/**
|
||||
* The Root Directory for the DB file and schema
|
||||
*/
|
||||
@@ -1382,6 +1387,35 @@ export type BunSQLiteConfigReturn = {
|
||||
config: BunSQLiteConfig;
|
||||
dbSchema: BUN_SQLITE_DatabaseSchemaType;
|
||||
};
|
||||
/**
|
||||
* Params shared by the schema sync functions in `lib/schema`.
|
||||
*/
|
||||
export type CreateDBSchemaParams = {
|
||||
db: import("bun:sqlite").Database;
|
||||
db_schema: BUN_SQLITE_DatabaseSchemaType;
|
||||
recreate_vector_table?: boolean;
|
||||
/**
|
||||
* Run the sync inside a transaction and roll it back. The planned
|
||||
* changes are recorded in `changes`.
|
||||
*/
|
||||
dry_run?: boolean;
|
||||
/**
|
||||
* Collects every change made (or planned) by the sync
|
||||
*/
|
||||
changes?: SchemaChange[];
|
||||
/**
|
||||
* Destructive changes that may run. `true` (or unset) allows all of
|
||||
* them; otherwise only changes whose `description` is in the set.
|
||||
*/
|
||||
allow_destructive?: true | Set<string>;
|
||||
};
|
||||
/**
|
||||
* A change made by the schema sync. Destructive changes discard data.
|
||||
*/
|
||||
export type SchemaChange = {
|
||||
description: string;
|
||||
destructive?: boolean;
|
||||
};
|
||||
/**
|
||||
* Default fields automatically suggested for new tables.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user