forge-sql-orm
Version:
Drizzle ORM integration for Atlassian @forge/sql. Provides a custom driver, schema migration, two levels of caching (local and global via @forge/kvs), optimistic locking, and query analysis.
28 lines • 1.37 kB
TypeScript
import { TriggerResponse } from "./index";
/**
* ⚠️ DEVELOPMENT ONLY WEB TRIGGER ⚠️
*
* This web trigger is designed for development environments only and will permanently delete all data in the specified tables and sequences.
* It generates and executes SQL statements to drop tables, their associated constraints, and sequences.
*
* @warning This trigger should NEVER be used in production environments because:
* - It permanently deletes all data in the specified tables and sequences
* - The operation cannot be undone
* - It may affect application functionality
* - It could lead to data loss and system instability
*
* @note This function is automatically disabled in production environments and will return a 500 error if called.
*
* @returns {Promise<TriggerResponse<string>>} A response containing:
* - On success: 200 status with warning message about permanent deletion of tables and sequences
* - On failure: 500 status with error message (including when called in production)
*
* @example
* ```typescript
* // Example usage in development only
* await dropSchemaMigrations();
* // ⚠️ Warning: This will permanently delete all data in users and orders tables and their sequences
* ```
*/
export declare function dropSchemaMigrations(): Promise<TriggerResponse<string>>;
//# sourceMappingURL=dropMigrationWebTrigger.d.ts.map