Performs a lightweight check to determine if the expected schema is present
in the database.
Parameters
d1: D1Database
The D1 database instance to check
table: string
The name of the table to check
Returns Promise<boolean>
Promise resolving to true if schema tables exist, false otherwise
Example
consthasSchema = awaitschemaExists(env.DB_NEW_SHARD, "users"); if (!hasSchema) { console.log('Creating schema on new shard...'); awaitcreateSchema(env.DB_NEW_SHARD, usersSchema); }
Performs a lightweight check to determine if the expected schema is present in the database.