Creates the database schema in the specified D1 database
Parameters
d1: D1Database
The D1 database instance to create schema in
schema: string
The SQL schema definition to execute
Returns Promise<void>
Promise that resolves when schema creation is complete
Throws
If schema creation fails
Example
constuserSchema = ` CREATE TABLE users ( id TEXT PRIMARY KEY, name TEXT NOT NULL, email TEXT UNIQUE ); `; awaitcreateSchema(env.DB_NEW_SHARD, userSchema);
Creates the database schema in the specified D1 database