@earth-app/collegedb
    Preparing search index...

    Function dropSchema

    • Removes all tables that are part of the default CollegeDB schema from the specified database. This is a destructive operation that cannot be undone.

      DANGER: This operation permanently deletes all data in the affected tables. Only use during development, testing, or complete system resets.

      Parameters

      • d1: D1Database

        The D1 database instance to drop tables from

      • ...tables: string[]

        The table schemas to drop

      Returns Promise<void>

      Promise that resolves when all tables are dropped

      // Only use in development/testing environments!
      if (process.env.NODE_ENV === 'development') {
      await dropSchema(env.DB_TEST);
      console.log('Test database reset completed');
      }