MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / up

Method up

tests/features/migrations/Migrator.test.ts:19–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18class MigrationTest2 extends Migration {
19 async up(): Promise<void> {
20 this.addSql('select 1 + 1');
21 this.addSql(raw('select 1 + 1'));
22 this.addSql(raw('select 2 + 2 as count2'));
23 const res = await this.execute('select 1 + 1 as count1');
24 expect(res).toEqual([{ count1: 2 }]);
25 }
26
27 override async down(): Promise<void> {
28 this.addSql('select 1 - 1');

Callers

nothing calls this directly

Calls 2

rawFunction · 0.90
executeMethod · 0.65

Tested by

no test coverage detected