npm package diff

Package: @forge/sql

Versions: 2.0.1-next.1 - 2.1.0-next.2

File: package/README.md

Index: package/README.md
===================================================================
--- package/README.md
+++ package/README.md
@@ -1,12 +1,21 @@
 Library for Forge environment.
 
 Usage example:
 ```typescript
-import sql from "@forge/sql";
+import sql, { migrationRunner } from "@forge/sql";
 
-const result = await sql.executeRaw('SELECT * FROM example');
+const migrationResults = await migrationRunner
+  .enqueue(
+    'v001_create_example_table',
+    `CREATE TABLE IF NOT EXISTS example (id INT PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL);`
+  )
+  .enqueue('v002_alter_example_table_add_age', `ALTER TABLE example ADD COLUMN age INT NOT NULL;`)
+  .enqueue('v003_alter_example_table_add_index_age', `CREATE INDEX idx_example_age ON example (age);`)
+  .run();
 
-const statement = sql.prepare('INSERT INTO test VALUES (?, ?)');
+const listExamples = await sql.executeRaw('SELECT * FROM example');
 
-const result = await statement.bindParams('John Doe', 42).execute();
+const statement = sql.prepare('INSERT INTO test example(name, age) VALUES (?, ?)');
+
+const insertUserResult = await statement.bindParams('John Doe', 42).execute();
 ```